/* Trendyfy card detail full-media hotfix v1.
   Scoped to the detail modal: catalog/home teaser tiles remain untouched. */
#modalRoot .product-detail-modal .product-detail-sheet .product-detail-hero {
  position: relative !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto !important;
  align-items: center !important;
  justify-items: stretch !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  overflow: hidden !important;
  background: #f5f3fb !important;
}
/* The AFTER image or video is the grid's natural-size element. Its own
   aspect ratio determines hero height; do not crop like a feed cover. */
#modalRoot .product-detail-modal .product-detail-sheet .product-detail-hero > .product-detail-hero__after {
  display: block !important;
  position: relative !important;
  z-index: 1 !important;
  grid-column: 1 !important;
  grid-row: 1 !important;
  inset: auto !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: min(68dvh, 760px) !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: 50% 50% !important;
  transform: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
/* BEFORE is a contained overlay, toggled without changing hero dimensions. */
#modalRoot .product-detail-modal .product-detail-sheet .product-detail-hero > .product-detail-hero__before {
  display: block !important;
  position: absolute !important;
  z-index: 2 !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center !important;
  transform: none !important;
  background: #f5f3fb !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
#modalRoot .product-detail-modal .product-detail-sheet .product-detail-hero.show-before > .product-detail-hero__before {
  opacity: 1 !important;
  visibility: visible !important;
}
#modalRoot .product-detail-modal .product-detail-sheet .product-detail-hero > .product-detail-hero__toggle {
  position: absolute !important;
  z-index: 4 !important;
  right: 12px !important;
  bottom: 12px !important;
}
/* A static fallback still works when no showcase exists. */
#modalRoot .product-detail-modal .product-detail-sheet .product-detail-hero > .product-detail-hero__fallback {
  grid-column: 1 !important;
  grid-row: 1 !important;
}
