/**
 * Zeyad For Business — Dynamic Hero Offers Carousel CSS
 * Fixed 4:5 Grand Portrait Showcase with Luxury Glass Frame & Emblem Brand Badge
 */

/* Viewport & Slider Structure with Fixed 4:5 Aspect Ratio */
.zfb-carousel-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  min-height: 380px;
  max-height: 490px;
  border-radius: 28px;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 22px 54px rgba(35, 28, 20, 0.24);
}

.zfb-hero-slide,
.zfb-home-mobile-card.zfb-hero-slide {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: 4 / 5;
  min-height: 380px;
  max-height: 490px;
  overflow: hidden;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
  align-items: stretch !important;
  gap: 0 !important;
  padding: 10px 14px 14px !important;
  border: 1px solid rgba(226, 193, 128, 0.32) !important;
  border-radius: 28px !important;
  box-shadow: 0 22px 54px rgba(35, 28, 20, 0.2) !important;
  background: #111 !important;
  isolation: isolate;
  transition: opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1), transform 0.45s cubic-bezier(0.4, 0, 0.2, 1) !important;
  will-change: opacity, transform;
}

/* Inactive slides are strictly hidden with zero opacity and inert */
.zfb-hero-slide:not(.is-active),
.zfb-home-mobile-card.zfb-hero-slide:not(.is-active) {
  opacity: 0 !important;
  visibility: hidden !important;
  transform: scale(0.985) !important;
  pointer-events: none !important;
  z-index: 1 !important;
}

/* Active slide is fully visible and elevated */
.zfb-hero-slide.is-active,
.zfb-home-mobile-card.zfb-hero-slide.is-active {
  opacity: 1 !important;
  visibility: visible !important;
  transform: scale(1) !important;
  pointer-events: auto !important;
  z-index: 2 !important;
}


/* Inner inset gold frame line preserved */
.zfb-home-mobile-card.zfb-hero-slide::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 248, 234, 0.2);
  border-radius: 22px;
  pointer-events: none;
  z-index: 3;
}

/* Direct, High-Clarity Slide Image (Natural contrast, no washout) */
.zfb-hero-slide-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: 0;
  display: block;
  pointer-events: none;
  filter: none !important;
  transition: transform 0.45s ease;
}

/* Fallback Background Image (Natural contrast, no washout) */
.zfb-hero-slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  filter: none !important;
  z-index: 0;
  transition: transform 0.45s ease;
}

/* Very subtle bottom scrim only at the very bottom so buttons have contrast without hiding the product */
.zfb-hero-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.3) 88%, rgba(0, 0, 0, 0.5) 100%);
  z-index: 1;
  pointer-events: none;
}

/* Brand Emblem Badge permanently removed */
.zfb-hero-brand-badge {
  display: none !important;
}

.zfb-brand-crest {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f5d898, #c99335);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(201, 147, 53, 0.45);
  flex-shrink: 0;
}

.zfb-brand-letter {
  color: #1a140a;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  margin-top: -1px;
}

.zfb-brand-text {
  display: flex;
  flex-direction: column;
  text-align: right;
  line-height: 1;
}

.zfb-brand-title {
  font-size: 0.85rem;
  font-weight: 900;
  color: #fff8ea;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.zfb-brand-tag {
  font-size: 0.56rem;
  font-weight: 800;
  color: #f3d48f;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-top: 2px;
}

/* Compact Action Buttons (اشترِ الآن + تصفح العروض) - Sleek & non-intrusive */
.zfb-home-mobile-card.zfb-hero-slide .zfb-home-mobile-actions {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
  max-width: 290px;
  margin: 0 auto;
}

.zfb-home-mobile-card.zfb-hero-slide .zfb-home-mobile-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  height: 34px;
  padding-inline: 10px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

/* Primary Button: اشترِ الآن */
.zfb-home-mobile-card.zfb-hero-slide .zfb-home-mobile-actions a.primary {
  color: #1a140a;
  background: linear-gradient(135deg, #f5d898, #c99335);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 14px rgba(201, 147, 53, 0.35);
}

.zfb-home-mobile-card.zfb-hero-slide .zfb-home-mobile-actions a.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(201, 147, 53, 0.45);
}

.zfb-home-mobile-card.zfb-hero-slide .zfb-home-mobile-actions a.primary:active {
  transform: scale(0.97);
}

/* Secondary Button: تصفح العروض */
.zfb-home-mobile-card.zfb-hero-slide .zfb-home-mobile-actions a:not(.primary) {
  color: #ffffff;
  background: rgba(18, 24, 20, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
}

.zfb-home-mobile-card.zfb-hero-slide .zfb-home-mobile-actions a:not(.primary):hover {
  background: rgba(226, 193, 128, 0.25);
  border-color: #f3d48f;
  transform: translateY(-1px);
}

.zfb-home-mobile-card.zfb-hero-slide .zfb-home-mobile-actions a:not(.primary):active {
  transform: scale(0.97);
}

/* Carousel Navigation Arrows - Removed per user request */
.zfb-carousel-btn {
  display: none !important;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(14, 20, 16, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(226, 193, 128, 0.55);
  color: #f3d48f;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 6;
  transition: all 0.25s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  padding: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.zfb-carousel-btn svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.zfb-carousel-btn:hover {
  background: rgba(226, 193, 128, 0.35);
  border-color: #f3d48f;
  color: #ffffff;
  transform: translateY(-50%) scale(1.1);
}

.zfb-carousel-btn:active {
  transform: translateY(-50%) scale(0.95);
}

/* RTL layout positioning: Right = Prev, Left = Next */
.zfb-carousel-prev {
  right: 12px;
}

.zfb-carousel-next {
  left: 12px;
}

/* Carousel Indicators (Dots) - Removed per user request */
.zfb-carousel-dots {
  display: none !important;
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  align-items: center;
  gap: 6px;
  z-index: 6;
  padding: 4px 9px;
  background: rgba(12, 18, 14, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  user-select: none;
}

.zfb-carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.35);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
}

.zfb-carousel-dot.is-active {
  width: 20px;
  background: linear-gradient(135deg, #f3d48f, #c9953c);
  box-shadow: 0 0 10px rgba(243, 212, 143, 0.5);
}

/* Slide Counter Badge (Top-Left) - Removed per user request */
.zfb-carousel-counter {
  display: none !important;
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 6;
  background: rgba(12, 18, 14, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(226, 193, 128, 0.28);
  border-radius: 20px;
  padding: 4px 11px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #f3d48f;
  letter-spacing: 0.5px;
  user-select: none;
}

/* Desktop Responsiveness */
@media (min-width: 769px) {
  .hero:has(.zfb-home-mobile-stage.has-dynamic-offers) .hero-panel {
    display: none !important;
  }

  .zfb-home-mobile-stage.has-dynamic-offers {
    display: grid !important;
    gap: 16px;
    padding: 16px 20px 24px;
    max-width: 1320px;
    margin: 0 auto;
  }

  .zfb-carousel-viewport,
  .zfb-hero-slide,
  .zfb-home-mobile-stage.has-dynamic-offers .zfb-home-mobile-card {
    aspect-ratio: auto !important;
    min-height: 460px !important;
    max-height: 520px !important;
  }

  .zfb-home-mobile-stage.has-dynamic-offers .zfb-home-mobile-card {
    padding: 24px 32px 24px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    align-items: center !important;
    border-radius: 32px !important;
  }

  .zfb-home-mobile-stage.has-dynamic-offers .zfb-home-mobile-actions {
    display: flex !important;
    justify-content: center !important;
    gap: 12px !important;
    width: auto !important;
    max-width: 380px !important;
  }

  .zfb-home-mobile-stage.has-dynamic-offers .zfb-home-mobile-actions a {
    min-width: 140px !important;
    min-height: 38px !important;
    height: 38px !important;
    padding: 0 20px !important;
    font-size: 0.88rem !important;
  }

  .zfb-hero-brand-badge {
    top: 22px;
    right: 24px;
    padding: 7px 16px 7px 9px;
  }

  .zfb-brand-crest {
    width: 32px;
    height: 32px;
  }

  .zfb-brand-title {
    font-size: 0.92rem;
  }

  .zfb-home-mobile-stage.has-dynamic-offers .zfb-carousel-btn {
    width: 44px;
    height: 44px;
  }

  .zfb-home-mobile-stage.has-dynamic-offers .zfb-carousel-prev {
    right: 20px;
  }

  .zfb-home-mobile-stage.has-dynamic-offers .zfb-carousel-next {
    left: 20px;
  }
}

/* Reduced Motion preference */
@media (prefers-reduced-motion: reduce) {
  .zfb-hero-slide {
    transition: opacity 0.2s ease !important;
  }
}
