/* =========================================================
   MEHFARO - PROMOTION + VIDEO RESPONSIVE LAYOUT V3
   Goal:
   - Desktop/tablet: promotion + video stay in one row (2 cards)
   - Promotion artwork is NEVER cropped
   - Video is NEVER cropped
   - Both cards use the same wide visual frame
   - Mobile: cards remain stacked full width
========================================================= */

:root {
  --mf-offer-wide-ratio: 2079 / 756;
}

/* Keep the old empty hero copy out of the media area. */
.hero.mf-commerce-hero > .hero-content {
  display: none !important;
}

.hero.mf-commerce-hero {
  min-height: 0 !important;
  align-items: start !important;
  gap: 18px !important;
  padding-top: 28px !important;
  padding-bottom: 28px !important;
}

.hero.mf-commerce-hero .mf-hero-promo-slot,
.hero.mf-commerce-hero .mf-hero-video-slot {
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  align-self: start !important;
}

/* =========================================================
   DESKTOP / TABLET - TWO EQUAL WIDE CARDS
========================================================= */
@media (min-width: 781px) {
  .hero.mf-commerce-hero.mf-has-promotions.mf-has-video {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: start !important;
  }

  .hero.mf-commerce-hero.mf-has-promotions.mf-has-video .mf-hero-promo-slot {
    grid-column: 1 !important;
    order: 1 !important;
  }

  .hero.mf-commerce-hero.mf-has-promotions.mf-has-video .mf-hero-video-slot {
    grid-column: 2 !important;
    order: 2 !important;
  }

  /* One common banner-shaped frame for BOTH cards. */
  .hero.mf-commerce-hero.mf-has-promotions.mf-has-video .mf-promo-frame,
  .hero.mf-commerce-hero.mf-has-promotions.mf-has-video .mf-premium-video-card,
  .hero.mf-commerce-hero.mf-has-promotions.mf-has-video .mf-premium-video-media {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: var(--mf-offer-wide-ratio) !important;
    border-radius: 24px !important;
    overflow: hidden !important;
  }

  .hero.mf-commerce-hero.mf-has-promotions.mf-has-video .mf-promo-frame {
    background: rgba(255, 248, 238, .90) !important;
  }

  .hero.mf-commerce-hero.mf-has-promotions.mf-has-video .mf-promo-slide {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
    border-radius: inherit !important;
    overflow: hidden !important;
  }

  .hero.mf-commerce-hero.mf-has-promotions.mf-has-video .mf-promo-slide img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
    border-radius: inherit !important;
  }

  .hero.mf-commerce-hero.mf-has-promotions.mf-has-video .mf-premium-video-media {
    background: #0e1514 !important;
  }

  .hero.mf-commerce-hero.mf-has-promotions.mf-has-video .mf-premium-video-media video,
  .hero.mf-commerce-hero.mf-has-promotions.mf-has-video .mf-premium-video-media iframe {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
    border: 0 !important;
  }

  /* If only one offer type exists, keep it centered and naturally wide. */
  .hero.mf-commerce-hero.mf-has-promotions:not(.mf-has-video),
  .hero.mf-commerce-hero.mf-has-video:not(.mf-has-promotions) {
    grid-template-columns: 1fr !important;
  }

  .hero.mf-commerce-hero.mf-has-promotions:not(.mf-has-video) .mf-hero-promo-slot,
  .hero.mf-commerce-hero.mf-has-video:not(.mf-has-promotions) .mf-hero-video-slot {
    grid-column: 1 / -1 !important;
    width: min(100%, 1120px) !important;
    justify-self: center !important;
  }

  .hero.mf-commerce-hero.mf-has-promotions:not(.mf-has-video) .mf-promo-frame,
  .hero.mf-commerce-hero.mf-has-promotions:not(.mf-has-video) .mf-promo-slide,
  .hero.mf-commerce-hero.mf-has-promotions:not(.mf-has-video) .mf-promo-slide img {
    height: auto !important;
    min-height: 0 !important;
  }

  .hero.mf-commerce-hero.mf-has-promotions:not(.mf-has-video) .mf-promo-slide img {
    object-fit: contain !important;
  }
}

/* =========================================================
   MOBILE - STACK FULL WIDTH, KEEP ENTIRE MEDIA VISIBLE
========================================================= */
@media (max-width: 780px) {
  .hero.mf-commerce-hero,
  .hero.mf-commerce-hero.mf-has-promotions.mf-has-video,
  .hero.mf-commerce-hero.mf-has-promotions:not(.mf-has-video),
  .hero.mf-commerce-hero.mf-has-video:not(.mf-has-promotions) {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    padding: 18px 12px 22px !important;
  }

  .hero.mf-commerce-hero .mf-hero-promo-slot,
  .hero.mf-commerce-hero .mf-hero-video-slot {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: none !important;
    justify-self: stretch !important;
  }

  .hero.mf-commerce-hero .mf-hero-promo-slot {
    order: 1 !important;
  }

  .hero.mf-commerce-hero .mf-hero-video-slot {
    order: 2 !important;
  }

  /* Promotion follows uploaded artwork's own ratio on phone. */
  .hero.mf-commerce-hero .mf-promo-frame,
  .hero.mf-commerce-hero .mf-promo-slide,
  .hero.mf-commerce-hero .mf-promo-slide img {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
    border-radius: 18px !important;
  }

  .hero.mf-commerce-hero .mf-promo-slide img {
    display: block !important;
    max-width: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
  }

  /* Video remains a clean 16:9 block on phone. */
  .hero.mf-commerce-hero .mf-premium-video-card,
  .hero.mf-commerce-hero .mf-premium-video-media {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    border-radius: 18px !important;
  }

  .hero.mf-commerce-hero .mf-premium-video-media {
    aspect-ratio: 16 / 9 !important;
    background: #0e1514 !important;
  }

  .hero.mf-commerce-hero .mf-premium-video-media video,
  .hero.mf-commerce-hero .mf-premium-video-media iframe {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    object-fit: contain !important;
    object-position: center !important;
    border: 0 !important;
  }

  .hero.mf-commerce-hero .mf-promo-overlay {
    padding: 12px !important;
    gap: 6px !important;
  }

  .hero.mf-commerce-hero .mf-promo-shop-button,
  .hero.mf-commerce-hero .mf-premium-video-shop {
    min-height: 36px !important;
    padding: 0 13px !important;
    font-size: 9px !important;
  }
}

@media (max-width: 480px) {
  .hero.mf-commerce-hero {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .hero.mf-commerce-hero .mf-promo-nav {
    width: 28px !important;
    height: 28px !important;
  }
}


/* =========================================================
   V4 POLISH - SAME FRAME FEEL + TIGHTER SECTION SPACING
   - Keep promotion and video in same visual frame style
   - Reduce empty gap before New Arrivals on desktop
========================================================= */
@media (min-width: 781px) {
  .hero.mf-commerce-hero {
    gap: 12px !important;
    padding-top: 18px !important;
    padding-bottom: 10px !important;
    margin-bottom: 0 !important;
  }

  .hero.mf-commerce-hero.mf-has-promotions.mf-has-video {
    column-gap: 18px !important;
    row-gap: 12px !important;
  }

  .hero.mf-commerce-hero.mf-has-promotions.mf-has-video .mf-promo-frame,
  .hero.mf-commerce-hero.mf-has-promotions.mf-has-video .mf-premium-video-card {
    border-radius: 26px !important;
    border: 1px solid rgba(255, 255, 255, 0.76) !important;
    box-shadow: 0 18px 46px rgba(39, 27, 8, 0.16) !important;
  }

  .hero.mf-commerce-hero.mf-has-promotions.mf-has-video .mf-premium-video-media {
    border-radius: 26px !important;
    background: #0e1514 !important;
  }

  /* Pull the next visible section closer so empty gap does not feel oversized. */
  #new-arrivals.section {
    margin-top: 4px !important;
    padding-top: 6px !important;
  }

  #new-arrivals .section-heading {
    margin-top: 0 !important;
  }
}


/* =========================================================
   V5 MEDIA CONTROLS + MOBILE FRAME MATCH
   - Mobile video frame matches promotion banner height/ratio
   - Discount badge stays at top-right
   - Shop Now is smaller and softer gold on all screens
========================================================= */
.hero.mf-commerce-hero .mf-promo-overlay,
.hero.mf-commerce-hero .mf-premium-video-overlay {
  position: absolute !important;
  inset: 0 !important;
  padding: 12px !important;
  pointer-events: none !important;
}

.hero.mf-commerce-hero .mf-premium-video-overlay {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: flex-start !important;
}

.hero.mf-commerce-hero .mf-offer-discount-badge {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  left: auto !important;
  bottom: auto !important;
  min-height: 25px !important;
  padding: 0 9px !important;
  font-size: 8px !important;
  z-index: 7 !important;
}

.hero.mf-commerce-hero .mf-promo-shop-button,
.hero.mf-commerce-hero .mf-premium-video-shop {
  min-height: 34px !important;
  height: 34px !important;
  padding: 0 13px !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #e4b65e, #efd08f) !important;
  color: #2b210c !important;
  font-size: 9px !important;
  font-weight: 900 !important;
  box-shadow: 0 6px 16px rgba(82, 55, 9, .16) !important;
  pointer-events: auto !important;
}

@media (max-width: 780px) {
  .hero.mf-commerce-hero .mf-premium-video-card,
  .hero.mf-commerce-hero .mf-premium-video-media {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: var(--mf-offer-wide-ratio) !important;
    border-radius: 18px !important;
    overflow: hidden !important;
  }

  .hero.mf-commerce-hero .mf-premium-video-media video,
  .hero.mf-commerce-hero .mf-premium-video-media iframe {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
  }
}


/* =========================================================
   V6 OFFER BADGE COLOR MATCH
   Exact same soft-gold treatment as Shop Now on all screens.
========================================================= */
.hero.mf-commerce-hero .mf-offer-discount-badge,
.hero.mf-commerce-hero .mf-premium-video-discount {
  background: linear-gradient(135deg, #e4b65e, #efd08f) !important;
  color: #2b210c !important;
  border: 1px solid rgba(177, 125, 36, .22) !important;
  box-shadow: 0 5px 14px rgba(82, 55, 9, .13) !important;
}
