/*
  Mobile-only product card layer.
  This file is linked with media="(max-width: 680px)", so desktop does not
  download or apply these purchase-panel layout rules.
*/
/* Main mobile product photo: 326 × 480 at a 326px content width. */
#productModal .product-gallery-stage {
  width: 100%;
  height: auto;
  aspect-ratio: 326 / 480;
}
#productModal .product-gallery-stage img.product-gallery-main {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
}

/* Mobile checkout starts from the cart; the immediate checkout action is desktop-only. */
#productModal #modalCheckoutButton { display: none; }
#productModal .modal-actions { grid-template-columns: 1fr; }

/* Keep the mobile header focused on browsing and closing the product card. */
#productModal .product-modal-favorite,
#productModal .product-share-button { display: none; }

/* Recommendations distract from completing the selected product on mobile. */
#productModalRelatedTitle,
#productModalRelated { display: none; }

/* Full-screen photo inspection is intentionally mobile-only. */
.product-image-viewer {
  position: fixed;
  z-index: 240;
  inset: 0;
  display: none;
  place-items: center;
  padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom));
  background: rgba(9, 11, 16, .94);
}
.product-image-viewer.open { display: grid; }
.product-image-viewer-dialog {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
}
.product-image-viewer img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 12px;
  background: #fff;
}
.product-image-viewer-close,
.product-image-viewer-nav {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.3);
  background: rgba(20,22,27,.78);
  color: #fff;
  box-shadow: 0 10px 26px rgba(0,0,0,.3);
}
.product-image-viewer-close {
  top: 6px;
  right: 6px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 32px;
  line-height: 1;
}
.product-image-viewer-nav {
  top: 50%;
  width: 42px;
  height: 56px;
  border-radius: 14px;
  font-size: 42px;
  line-height: 1;
  transform: translateY(-50%);
}
.product-image-viewer-nav.prev { left: 4px; }
.product-image-viewer-nav.next { right: 4px; }
.product-image-viewer-counter {
  position: absolute;
  bottom: 14px;
  left: 50%;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(20,22,27,.78);
  color: #fff;
  font-size: 13px;
  font-weight: 850;
  transform: translateX(-50%);
}
