/* ============================================
   SAFANDY PRODUCTS HERO — Option 3
   Featured Hero Carousel + Bundle Banner
   ============================================ */

:root {
  --sf-orange: #F65300;
  --sf-orange-light: #FFF3ED;
  --sf-orange-glow: #FF7A33;
  --sf-green: #82B735;
  --sf-green-light: #F0F7E4;
  --sf-teal: #00B4D8;
  --sf-teal-light: #E8F8FC;
  --sf-dark: #242424;
  --sf-gray: #484848;
  --sf-light: #F8F8F8;
  --sf-radius: 16px;
  --sf-radius-sm: 12px;
}

/* Section wrapper */
.sf-products-hero {
  padding: 40px 0 48px;
  background: #FFFFFF;
  position: relative;
  overflow: hidden;
}

.sf-products-hero *,
.sf-products-hero *::before,
.sf-products-hero *::after {
  box-sizing: border-box;
}

/* Section header */
.sf-hero-header {
  padding: 0 20px;
  margin-bottom: 6px;
  text-align: center;
  direction: rtl;
}

.sf-hero-title {
  font-family: 'Cairo', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: var(--sf-dark);
  margin: 0 0 4px;
  line-height: 1.4;
}

.sf-hero-subtitle {
  font-family: 'Cairo', sans-serif;
  font-size: 14px;
  color: #999;
  margin: 0;
  font-weight: 500;
}

/* ===== CAROUSEL ===== */
.sf-carousel-wrapper {
  position: relative;
  padding: 0 20px;
  margin-bottom: 0;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}

.sf-carousel-track {
  display: flex;
  flex-wrap: nowrap;
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
  cursor: grab;
  width: 100%;
  /* Force LTR so translateX works predictably regardless of page direction */
  direction: ltr;
}

.sf-carousel-track.is-dragging {
  transition: none;
  cursor: grabbing;
}

/* Individual slide */
.sf-slide {
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  flex: 0 0 100%;
  flex-shrink: 0;
  padding: 16px 0;
  /* Restore RTL for the actual content inside each slide */
  direction: rtl;
}

/* Featured card */
.sf-featured-card {
  background: #FFFFFF;
  border-radius: var(--sf-radius);
  border: 1.5px solid #f0f0f0;
  overflow: hidden;
  transition: border-color 0.3s ease;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
  width: 100%;
  max-width: 100%;
}

.sf-featured-card:hover {
  border-color: rgba(246, 83, 0, 0.2);
}

/* Override any Elementor/Woodmart container styles that break the carousel */
.sf-products-hero .elementor-widget-container,
.sf-products-hero .elementor-shortcode {
  max-width: 100% !important;
  overflow: hidden;
}

/* Card image area */
.sf-card-image {
  position: relative;
  height: 280px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sf-card-image a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.sf-card-image img {
  max-width: 85%;
  max-height: 260px;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  pointer-events: none;
}

.sf-featured-card:hover .sf-card-image img {
  transform: scale(1.05) rotate(-1deg);
}

/* Background accent per product */
.sf-card-image[data-color="warm"] {
  background: linear-gradient(160deg, #FFF5EE 0%, #FFEEDD 100%);
}

.sf-card-image[data-color="cool"] {
  background: linear-gradient(160deg, #EEF5FF 0%, #E0EEFF 100%);
}

.sf-card-image[data-color="soft"] {
  background: linear-gradient(160deg, #F5EEFF 0%, #EEDEFF 100%);
}

/* Badges */
.sf-card-badges {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}

.sf-badge {
  display: inline-block;
  font-family: 'Cairo', sans-serif;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 8px;
  line-height: 1.4;
}

.sf-badge-sale {
  background: var(--sf-orange);
  color: #fff;
}

/* Wishlist */
.sf-card-wishlist {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
}

.sf-wishlist-btn {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  color: #ccc;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.sf-wishlist-btn:hover {
  color: var(--sf-orange);
  transform: scale(1.1);
}

.sf-wishlist-btn.is-active {
  color: var(--sf-orange);
}

/* Card body */
.sf-card-body {
  padding: 20px 20px 22px;
}

.sf-card-name {
  font-family: 'Cairo', sans-serif;
  font-weight: 800;
  font-size: 22px;
  color: var(--sf-dark);
  margin: 0 0 6px;
  line-height: 1.3;
}

.sf-card-name a {
  color: inherit;
  text-decoration: none;
}

.sf-card-name a:hover {
  color: var(--sf-orange);
}

.sf-card-desc {
  font-family: 'Cairo', sans-serif;
  font-size: 14px;
  color: #777;
  line-height: 1.8;
  margin: 0 0 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Meta chips (age, players, time) */
.sf-card-meta {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.sf-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'Cairo', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--sf-gray);
  background: var(--sf-light);
  padding: 5px 12px;
  border-radius: 20px;
  white-space: nowrap;
}

.sf-meta-chip .sf-chip-icon {
  font-size: 14px;
  line-height: 1;
}

/* Card bottom (price + CTA) */
.sf-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sf-price {
  font-family: 'Cairo', sans-serif;
  font-weight: 800;
  font-size: 22px;
  color: var(--sf-orange);
  line-height: 1;
}

.sf-price .woocommerce-Price-amount,
.sf-price .woocommerce-Price-currencySymbol {
  color: var(--sf-orange) !important;
}

.sf-price-old,
.sf-price-old .woocommerce-Price-amount,
.sf-price-old .woocommerce-Price-currencySymbol {
  color: #bbb !important;
}

.sf-price-old {
  text-decoration: line-through;
  color: #bbb;
  font-weight: 500;
  font-size: 14px;
  margin-inline-start: 6px;
}

.sf-btn-cart {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--sf-orange);
  color: #fff;
  border: none;
  border-radius: var(--sf-radius-sm);
  padding: 12px 24px;
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.sf-btn-cart:hover {
  background: var(--sf-orange-glow);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(246, 83, 0, 0.3);
}

.sf-btn-cart:active {
  transform: scale(0.97);
  box-shadow: none;
}

.sf-btn-cart .sf-cart-icon {
  font-size: 16px;
}

/* ===== NAVIGATION ===== */
.sf-nav-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 4px 20px 0;
}

.sf-nav-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--sf-light);
  border: 1.5px solid #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  color: var(--sf-gray);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.sf-nav-arrow:hover {
  background: var(--sf-orange-light);
  border-color: rgba(246, 83, 0, 0.2);
  color: var(--sf-orange);
}

.sf-nav-arrow:active {
  transform: scale(0.92);
}

.sf-nav-arrow.is-disabled {
  opacity: 0.3;
  pointer-events: none;
}

.sf-nav-dots {
  display: flex;
  gap: 6px;
}

.sf-nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ddd;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s ease;
}

.sf-nav-dot.is-active {
  width: 24px;
  border-radius: 4px;
  background: var(--sf-orange);
}

/* ===== BUNDLE BANNER ===== */
.sf-bundle-banner {
  margin: 24px 20px 0;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a1a10 60%, #1a1a1a 100%);
  border-radius: var(--sf-radius);
  padding: 24px;
  color: #fff;
  position: relative;
  overflow: hidden;
  direction: rtl;
  text-align: right;
}

.sf-bundle-banner::before {
  content: '';
  position: absolute;
  top: -30px;
  left: -30px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(246, 83, 0, 0.12) 0%, transparent 70%);
  border-radius: 50%;
}

.sf-bundle-banner::after {
  content: '';
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(246, 83, 0, 0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.sf-bundle-tag {
  display: inline-block;
  background: var(--sf-orange);
  color: #fff;
  font-family: 'Cairo', sans-serif;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.sf-bundle-title {
  font-family: 'Cairo', sans-serif;
  font-weight: 800;
  font-size: 18px;
  margin: 0 0 8px;
  line-height: 1.6;
  position: relative;
  z-index: 1;
  color: #FFFFFF !important;
}

/* Force all text inside bundle banner to be white — override Woodmart/WooCommerce heading styles */
.sf-bundle-banner,
.sf-bundle-banner h1,
.sf-bundle-banner h2,
.sf-bundle-banner h3,
.sf-bundle-banner h4,
.sf-bundle-banner p,
.sf-bundle-banner span,
.sf-bundle-banner a,
.sf-bundle-banner .woocommerce-Price-amount,
.sf-bundle-banner .woocommerce-Price-currencySymbol {
  color: #FFFFFF !important;
}

.sf-bundle-banner .sf-bundle-desc {
  color: rgba(255, 255, 255, 0.55) !important;
}

.sf-bundle-banner .sf-bundle-price-old,
.sf-bundle-banner .sf-bundle-price-old * {
  color: rgba(255, 255, 255, 0.35) !important;
}

.sf-bundle-desc {
  font-family: 'Cairo', sans-serif;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.7;
  margin: 0 0 16px;
  position: relative;
  z-index: 1;
}

/* Bundle product thumbnails */
.sf-bundle-thumbs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.sf-bundle-thumb {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  transition: border-color 0.2s ease;
}

.sf-bundle-thumb:hover {
  border-color: rgba(255, 255, 255, 0.3);
}

.sf-bundle-thumb img {
  max-width: 44px;
  max-height: 44px;
  object-fit: contain;
}

/* Bundle bottom row */
.sf-bundle-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.sf-bundle-price {
  font-family: 'Cairo', sans-serif;
  font-weight: 800;
  font-size: 22px;
  color: #fff;
}

.sf-bundle-price-old {
  text-decoration: line-through;
  color: rgba(255, 255, 255, 0.35);
  font-weight: 500;
  font-size: 14px;
  margin-inline-start: 6px;
}

.sf-btn-bundle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--sf-orange);
  color: #fff;
  border: none;
  border-radius: var(--sf-radius-sm);
  padding: 12px 22px;
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
  white-space: nowrap;
}

.sf-btn-bundle:hover {
  background: var(--sf-orange-glow);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(246, 83, 0, 0.4);
}

.sf-btn-bundle:active {
  transform: scale(0.97);
}

/* More bundles link */
.sf-more-bundles {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
  padding: 0 20px;
  direction: rtl;
}

.sf-more-bundles a {
  font-family: 'Cairo', sans-serif;
  font-size: 14px;
  color: var(--sf-orange);
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.2s;
}

.sf-more-bundles a:hover {
  opacity: 0.7;
}

/* ===== RESPONSIVE ===== */

/* Tablet */
@media (min-width: 768px) {
  .sf-products-hero {
    padding: 56px 0 64px;
  }

  .sf-carousel-wrapper {
    padding: 0 40px;
  }

  .sf-card-image {
    height: 340px;
  }

  .sf-card-body {
    padding: 24px 28px 28px;
  }

  .sf-card-name {
    font-size: 26px;
  }

  .sf-bundle-banner {
    margin: 28px 40px 0;
    padding: 32px;
  }

  .sf-more-bundles {
    padding: 0 40px;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .sf-carousel-wrapper {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 20px;
  }

  .sf-card-image {
    height: 380px;
  }

  .sf-bundle-banner {
    max-width: 680px;
    margin: 32px auto 0;
  }

  .sf-more-bundles {
    max-width: 680px;
    margin: 16px auto 0;
  }

  .sf-nav-row {
    max-width: 680px;
    margin: 4px auto 0;
  }
}

/* ===== ANIMATION: Slide-in on first view ===== */
.sf-products-hero.sf-animate-in .sf-hero-header {
  animation: sfFadeUp 0.6s ease both;
}

.sf-products-hero.sf-animate-in .sf-carousel-wrapper {
  animation: sfFadeUp 0.6s 0.15s ease both;
}

.sf-products-hero.sf-animate-in .sf-nav-row {
  animation: sfFadeUp 0.6s 0.25s ease both;
}

.sf-products-hero.sf-animate-in .sf-bundle-banner {
  animation: sfFadeUp 0.7s 0.35s ease both;
}

.sf-products-hero.sf-animate-in .sf-more-bundles {
  animation: sfFadeUp 0.5s 0.5s ease both;
}

@keyframes sfFadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== WooCommerce overrides inside this section ===== */
.sf-products-hero .added_to_cart {
  display: none !important;
}

.sf-products-hero .quantity {
  display: none !important;
}
