/* Product pages share the storefront's normal document scroll. */
:root { --header-height: calc(4.75rem + env(safe-area-inset-top, 0px)); }
html { scroll-padding-top: 16px; }
body { padding-top: 0; }
.site-header {
  position: relative;
  inset: auto;
  width: min(100%, 520px);
  height: var(--header-height);
  min-height: var(--header-height);
  margin: 0 auto;
  padding: calc(.75rem + env(safe-area-inset-top, 0px)) clamp(16px, 5vw, 26px) .75rem;
  z-index: 10;
  background: var(--paper);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.shop-page { min-height: calc(100dvh - var(--header-height)); }
.product-title-row h3 a { display: inline-block; }
.product-page { padding-top: 16px; }
.product-page .back-link { margin-top: 0; margin-bottom: 12px; }
.product-gallery, .product-page-form { min-width: 0; }
.gallery-track {
  display: flex;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  border-radius: 22px;
  background: #e8e9e4;
  -webkit-overflow-scrolling: touch;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-slide {
  position: relative;
  flex: 0 0 100%;
  min-width: 0;
  aspect-ratio: 1;
  margin: 0;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.gallery-photo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: var(--photo-position, center);
  transform: scale(var(--photo-zoom, 1));
  transform-origin: var(--photo-origin, center);
  user-select: none;
  -webkit-user-drag: none;
}
.gallery-controls { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.gallery-arrow { display: grid; place-items: center; flex: 0 0 44px; height: 44px; background: #fff; border: 1px solid var(--line); border-radius: 50%; }
.gallery-arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.gallery-arrow:disabled { opacity: .3; cursor: default; }
.gallery-arrow:not(:disabled):active { background: #e9ede1; }
.gallery-status { display: flex; flex: 1; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 10px; min-width: 0; font-size: .875rem; color: #5f6657; }
#gallery-count { color: #747b6c; white-space: nowrap; }
.gallery-thumbnails { display: flex; gap: 10px; overflow-x: auto; padding: 5px 2px; margin-top: 6px; }
.gallery-thumbnail { flex: 0 0 68px; width: 68px; height: 68px; padding: 0; overflow: hidden; background: #e8e9e4; border: 2px solid transparent; border-radius: 12px; opacity: .65; }
.gallery-thumbnail[aria-current="true"] { opacity: 1; border-color: #586448; box-shadow: 0 0 0 2px var(--paper) inset; }
.gallery-thumbnail:focus-visible, .gallery-track:focus-visible { outline: 2px solid #586448; outline-offset: 3px; }
.product-page-form { margin-top: 28px; }
.product-heading .eyebrow { font-size: .875rem; }
.product-heading h1 { font-size: clamp(2rem, 9vw, 2.75rem); line-height: 1.15; letter-spacing: -.035em; margin-top: 10px; color: #353d2d; overflow-wrap: anywhere; }
#product-description { margin-top: 16px; font-size: 1rem; line-height: 1.75; color: #5d6157; }
.product-page .product-facts { font-size: .875rem; margin: 24px 0 30px; }
.product-page .product-facts > div { padding: 12px 0; }
.product-page .product-facts dd { max-width: 56%; }
.product-scent { background: #edf0e5; border: 1px solid #dce2d0; border-radius: 20px; padding: 20px 16px 16px; }
.product-scent .scent-label { align-items: baseline; flex-wrap: wrap; }
.product-scent .scent-label label { font-size: 1.125rem; }
.product-scent .scent-label span { font-size: .875rem; }
.product-scent .scent-notes { font-size: .875rem; min-height: 3em; margin-bottom: 0; }
.product-purchase { margin-top: 28px; }
.product-dimensions { margin-top: 24px; }
.product-dimensions h2 { margin: 0; font-size: 1.125rem; line-height: 1.4; letter-spacing: 0; font-weight: 500; }
.product-size-values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 12px 0 0; }
.product-size-values > div { min-width: 0; padding: 16px 12px; background: #edf0e5; border: 1px solid #dce2d0; border-radius: 16px; }
.product-size-values dt { color: #5f6657; font-size: .875rem; line-height: 1.5; }
.product-size-values dd { margin: 6px 0 0; color: #353d2d; font-size: 1rem; line-height: 1.4; font-weight: 500; overflow-wrap: anywhere; }
.product-price-row { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; }
.product-price-row > span { font-size: 1rem; color: #5f6657; }
#product-price { font-size: 1.875rem; font-weight: 500; white-space: nowrap; }
.product-purchase .full-button { margin-top: 16px; gap: 12px; }
.product-purchase .full-button svg { flex: 0 0 22px; width: 22px; height: 22px; }
@media (max-width: 359px) {
  .gallery-controls { gap: 8px; }
  .gallery-status { font-size: .875rem; gap: 6px; }
  .product-scent { padding: 16px 12px; }
}
