/* Unified customer detail-view finish.
   Scope: only the shared product/offering detail sheet.
   Homepage cards, category pages and Owner Hub are intentionally untouched. */

#sheet-backdrop:not([hidden]) {
  z-index: 419;
}

.product-sheet.rc8-product-detail-ready:not([hidden]) {
  z-index: 420;
  pointer-events: auto;
}

.product-sheet.rc8-product-detail-ready .sheet-close,
.product-sheet.rc8-product-detail-ready .rc8-sheet-favourite,
.product-sheet.rc8-product-detail-ready .sheet-actions,
.product-sheet.rc8-product-detail-ready .sheet-actions *,
.product-sheet.rc8-product-detail-ready #sheet-order {
  pointer-events: auto;
  touch-action: manipulation;
}

.product-sheet.rc8-product-detail-ready .sheet-close,
.product-sheet.rc8-product-detail-ready .rc8-sheet-favourite {
  z-index: 22;
}

.product-sheet.rc8-product-detail-ready .sheet-actions {
  z-index: 21;
}

/* All customer detail hero images finish square at the bottom.
   Applies to food, drinks, rooms, venues and services only after opening detail. */
.product-sheet.rc8-product-detail-ready .sheet-image,
.product-sheet.rc8-product-detail-ready .sheet-image.has-photo,
.product-sheet.rc8-product-detail-ready.rc8-commerce-product .sheet-image,
.product-sheet.rc8-product-detail-ready.rc8-commerce-product .sheet-image.has-photo,
.product-sheet.rc8-product-detail-ready.rc8-room-detail-long .sheet-image,
.product-sheet.rc8-product-detail-ready.rc8-venue-detail .sheet-image,
.product-sheet.rc8-product-detail-ready.rc8-service-detail .sheet-image {
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.product-sheet.rc8-product-detail-ready .sheet-image img,
.product-sheet.rc8-product-detail-ready .sheet-image .product-photo,
.product-sheet.rc8-product-detail-ready .sheet-image.has-photo .product-photo {
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

/* Bottom-anchored detail sheet: 6% breathing room above, including Safari's dynamic viewport. */
#product-sheet.product-sheet.rc8-product-detail-ready {
  position: fixed;
  top: auto;
  bottom: 0;
  height: 94vh;
  min-height: 94vh;
  max-height: 94vh;
  height: 94dvh;
  min-height: 94dvh;
  max-height: 94dvh;
  box-sizing: border-box;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -16px 48px rgba(0, 0, 0, .18);
}
#product-sheet.product-sheet.rc8-product-detail-ready:not([hidden]) {
  animation: bp-detail-rise .28s cubic-bezier(.22, .68, .3, 1) both;
}
@keyframes bp-detail-rise {
  from { transform: translate(-50%, 100%); }
  to { transform: translate(-50%, 0); }
}
@media (prefers-reduced-motion: reduce) {
  #product-sheet.product-sheet.rc8-product-detail-ready:not([hidden]) {
    animation: none;
  }
}
