/* =====================================================================
   Hoptimist Taiwan — product.css (product.html)
   Owner: Page builder — shop.  Mobile-first; breakpoints 768 / 1024.
   ===================================================================== */

.pdp-wrap { padding-top: var(--s-4); }
.pdp { display: grid; gap: var(--s-5); margin-top: var(--s-3); }
.pdp__gallery, .pdp__info { min-width: 0; }
.pdp__gallery .skeleton--tile { margin-inline: calc(var(--gutter) * -1); border-radius: 0; }
@media (min-width: 768px) { .pdp__gallery .skeleton--tile { margin-inline: 0; border-radius: var(--radius-card); } }
@media (min-width: 1024px) {
  .pdp { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: var(--s-8); align-items: start; margin-top: var(--s-4); }
  .pdp__gallery { position: sticky; top: calc(64px + var(--s-4)); }
}

/* ---------- Gallery ---------- */
.pdp-gallery { position: relative; }
.pdp-gallery__main { position: relative; margin-inline: calc(var(--gutter) * -1); background: var(--c-stage); overflow: hidden; }
@media (min-width: 768px) { .pdp-gallery__main { margin-inline: 0; border-radius: var(--radius-card); } }
.pdp-gallery__track { display: flex; aspect-ratio: 1 / 1; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.pdp-gallery__track::-webkit-scrollbar { display: none; }
.pdp-gallery__track:focus-visible { outline: 2px solid var(--c-ink); outline-offset: -4px; border-radius: inherit; }
.pdp-gallery__slide { position: relative; flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; }
.pdp-gallery__zoom { display: block; width: 100%; height: 100%; cursor: zoom-in; }
.pdp-gallery__zoom:focus-visible { outline-offset: -4px; }
.pdp-gallery__slide img { width: 100%; height: 100%; object-fit: cover; }
.pdp-gallery__slide--product { background: var(--c-stage); }
.pdp-gallery__slide--product img { object-fit: contain; mix-blend-mode: multiply; transform-origin: 50% 100%; }
.pdp-gallery__slide--photo { background: #fff; }
.pdp-gallery__slide.is-bob img { animation: hop-bob .9s var(--ease-bob) 1; }
.pdp-gallery__arrow { position: absolute; top: 50%; z-index: 2; display: none; align-items: center; justify-content: center; width: 44px; height: 44px; margin-top: -22px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--c-ink); box-shadow: var(--shadow-soft); transition: opacity var(--dur) var(--ease), background-color var(--dur) var(--ease); }
.pdp-gallery__arrow:hover { background: #fff; }
.pdp-gallery__arrow:disabled { opacity: 0; pointer-events: none; }
.pdp-gallery__arrow--prev { left: 14px; }
.pdp-gallery__arrow--next { right: 14px; }
.pdp-gallery__count { position: absolute; right: 12px; bottom: 12px; z-index: 2; padding: 2px 10px; border-radius: var(--radius-pill); background: rgba(26, 26, 25, .72); color: #fff; font-size: 12px; line-height: 20px; letter-spacing: .06em; pointer-events: none; }
.pdp-gallery__hint { position: absolute; left: 14px; bottom: 14px; z-index: 2; display: none; align-items: center; gap: 4px; padding: 2px 10px 2px 8px; border-radius: var(--radius-pill); background: rgba(255, 255, 255, .9); color: var(--c-text); font-size: 12px; line-height: 22px; pointer-events: none; opacity: 0; transition: opacity var(--dur) var(--ease); }
.pdp-gallery__hint .icon { width: 14px; height: 14px; }
.pdp-gallery__dots { display: flex; justify-content: center; gap: 6px; margin-top: var(--s-3); }
.pdp-gallery__dots span { width: 6px; height: 6px; border-radius: 3px; background: var(--c-line); transition: width var(--dur) var(--ease), background-color var(--dur) var(--ease); }
.pdp-gallery__dots span.is-active { width: 18px; background: var(--c-ink); }
.pdp-gallery__thumbs { display: none; gap: var(--s-2); margin-top: var(--s-3); flex-wrap: wrap; }
.pdp-gallery__thumb { position: relative; width: 76px; height: 76px; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: inset 0 0 0 1px var(--c-line-soft); transition: box-shadow var(--dur) var(--ease); }
.pdp-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.pdp-gallery__thumb--product { background: var(--c-stage); }
.pdp-gallery__thumb--product img { object-fit: contain; mix-blend-mode: multiply; }
/* hairline drawn above the image so white-background photos still read as a tile */
.pdp-gallery__thumb::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--c-line-soft); pointer-events: none; transition: box-shadow var(--dur) var(--ease); }
.pdp-gallery__thumb:hover::after { box-shadow: inset 0 0 0 1px var(--c-muted); }
.pdp-gallery__thumb.is-active::after { box-shadow: none; }
.pdp-gallery__thumb:hover { box-shadow: inset 0 0 0 1px var(--c-muted); }
.pdp-gallery__thumb.is-active { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--c-ink); }
@media (min-width: 768px) {
  .pdp-gallery__arrow { display: inline-flex; }
  .pdp-gallery__dots { display: none; }
  .pdp-gallery__thumbs { display: flex; }
  .pdp-gallery__count { display: none; }
}
@media (hover: hover) and (min-width: 768px) {
  .pdp-gallery__hint { display: inline-flex; }
  .pdp-gallery__main:hover .pdp-gallery__hint { opacity: 1; }
}

/* ---------- Info column ---------- */
.pdp-info { display: flex; flex-direction: column; gap: var(--s-4); }
.pdp-info__badges { display: flex; flex-wrap: wrap; gap: 6px; }
.pdp-info__series { display: inline-flex; align-items: baseline; gap: 8px; align-self: flex-start; min-height: 32px; padding-top: 4px; font-size: 13px; color: var(--c-muted); letter-spacing: .08em; }
.pdp-info__series span { font: 700 12px/1.4 "Open Sans", sans-serif; letter-spacing: .16em; text-transform: uppercase; color: var(--c-ink); }
.pdp-info__series:hover, .pdp-info__series:hover span { color: var(--c-cta-strong); }
.pdp-info__title { display: flex; flex-direction: column; gap: 6px; margin-top: calc(var(--s-2) * -1); letter-spacing: 0; }
.pdp-info__en { font-family: var(--font-display); font-weight: 300; font-size: 40px; line-height: 1.05; letter-spacing: .03em; color: var(--c-ink); }
.pdp-info__zh { font-family: var(--font-zh); font-size: 17px; font-weight: 500; line-height: 1.5; letter-spacing: .06em; color: var(--c-ink); }
@media (min-width: 768px) { .pdp-info__en { font-size: 54px; } .pdp-info__zh { font-size: 18px; } }
.pdp-info__summary { font-size: 15px; line-height: 1.8; color: var(--c-text); }
.pdp-info__summary, .pdp-perks li > span, .pdp-buy__cert p, .pdp-prose p, .pdp-heritage, .pdp-where__lead, .pdp-list li { text-wrap: pretty; } /* no one-character last lines */
.pdp-info__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.pdp-info__price .price--lg { font-size: 26px; }
.pdp-info__price .price__hidden { font-size: 18px; }
.pdp-info__tax { font-size: 12px; color: var(--c-muted); letter-spacing: .06em; }
.pdp-info__range { font-size: 13px; color: var(--c-muted); }

.pdp-opt { display: flex; flex-direction: column; gap: 10px; padding-top: var(--s-4); border-top: 1px solid var(--c-line-soft); }
.pdp-opt__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 14px; line-height: 1.6; }
.pdp-opt__label { font-weight: 500; color: var(--c-ink); letter-spacing: .06em; }
.pdp-opt__value { color: var(--c-text); }
.pdp-opt__n { margin-left: auto; font-size: 12px; color: var(--c-muted); }
.pdp-swatches { gap: 2px; margin-left: -6px; }
.pdp-styles { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.pdp-style { display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 4px 16px 4px 4px; border: 1px solid var(--c-line); border-radius: var(--radius-pill); background: #fff; color: var(--c-ink); font-size: 14px; font-weight: 500; line-height: 1.3; transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.pdp-style:hover { border-color: var(--c-ink); }
.pdp-style[aria-checked="true"] { border-color: var(--c-ink); box-shadow: inset 0 0 0 1px var(--c-ink); }
.pdp-style--out .pdp-style__img img { opacity: .45; }
.pdp-style__out { display: block; font-size: 12px; font-weight: 400; color: var(--c-muted); }
.pdp-style__img { width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%; background: var(--c-stage); overflow: hidden; }
.pdp-style__img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; transform: scale(1.25); transform-origin: 50% 55%; }
.pdp-style__price { font: 400 12px "Open Sans", sans-serif; color: var(--c-muted); }
.pdp-sizes { gap: 6px; }
.pdp-sizes .size-chip { min-width: 56px; padding: 6px 12px; }
.pdp-buy__ship:empty { display: none; }
.pdp-opt__links { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13px; }
.pdp-opt__links a { display: inline-flex; align-items: center; min-height: 32px; }

/* Buy box */
.pdp-buy { display: flex; flex-direction: column; gap: var(--s-3); padding-top: var(--s-4); border-top: 1px solid var(--c-line-soft); }
.pdp-buy__row { display: flex; align-items: center; gap: var(--s-2); }
.pdp-buy__qty { height: 48px; flex-shrink: 0; }
.pdp-buy__qty .qty__btn { height: 46px; }
.pdp-buy__qty .qty__input { height: 46px; line-height: 46px; width: 36px; }
.pdp-buy__add, .pdp-buy__now { flex: 1 1 auto; min-width: 0; padding-inline: 16px; }
.pdp-buy__wish { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 48px; height: 48px; border: 1px solid var(--c-ink); border-radius: 50%; color: var(--c-ink); transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), transform 200ms var(--ease-bob); }
.pdp-buy__wish:hover { background: var(--c-stage-2); }
.pdp-buy__wish:active { transform: scale(.94); }
.pdp-buy__wish[aria-pressed="true"] { color: var(--c-red); border-color: var(--c-red); }
.pdp-buy__wish .icon { width: 22px; height: 22px; }
@media (min-width: 768px) { .pdp-buy__qty { height: 52px; } .pdp-buy__qty .qty__btn, .pdp-buy__qty .qty__input { height: 50px; line-height: 50px; } .pdp-buy__wish { width: 52px; height: 52px; } }
.pdp-buy__ship { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--c-text); }
.pdp-buy__ship .icon { width: 18px; height: 18px; flex-shrink: 0; }
.pdp-buy__ship strong { font-family: "Open Sans", var(--font-zh); font-weight: 700; color: var(--c-ink); }
.pdp-buy__cert .icon { color: var(--c-ink); }
.pdp-buy__cert p + p { margin-top: 2px; }
.pdp-buy__cert-title { font-weight: 700; color: var(--c-ink); }
.pdp-buy__wish-block[aria-pressed="true"] { color: var(--c-red); border-color: var(--c-red); }
.pdp-buy__wish-block[aria-pressed="true"]:hover { --btn-bg: #fff; }
.pdp-notify { display: flex; flex-direction: column; gap: 6px; padding: var(--s-4); border: 1px solid var(--c-line); border-radius: 12px; }
.pdp-notify__title { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-weight: 500; color: var(--c-ink); }
.pdp-notify__title .icon { width: 20px; height: 20px; }
.pdp-notify .check { font-size: 13px; padding: 6px 0; }
.pdp-notify__done:focus { outline: none; }

/* Perks */
.pdp-perks { display: grid; gap: var(--s-3); list-style: none; margin: 0; padding: var(--s-4); border-radius: 12px; background: var(--c-stage-2); }
.pdp-perks li { display: flex; align-items: flex-start; gap: 12px; font-size: 13px; line-height: 1.6; color: var(--c-muted); }
.pdp-perks strong { display: block; font-size: 14px; font-weight: 500; color: var(--c-ink); }
.pdp-perks .icon { width: 22px; height: 22px; margin-top: 2px; color: var(--c-ink); flex-shrink: 0; }
.pdp-perks .text-link { color: var(--c-text); }
@media (min-width: 560px) { .pdp-perks { grid-template-columns: 1fr 1fr; } }

.pdp-occ, .pdp-share { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); }
.pdp-occ__label, .pdp-share__label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--c-ink); letter-spacing: .06em; }
.pdp-occ__label .icon { width: 18px; height: 18px; }
.pdp-occ .chip-group { gap: 6px; }
.pdp-occ__chip { min-height: 32px; cursor: pointer; }
.pdp-occ__chip:hover { border-color: var(--c-ink); }
.pdp-share .share-row { gap: 6px; }

/* Accordions */
.pdp-acc { margin-top: var(--s-2); }
.pdp-prose { font-size: 15px; }
.pdp-prose > * + * { margin-top: .9em; }
.pdp-features { list-style: none; padding: var(--s-4) !important; border-radius: 12px; background: var(--c-stage-2); display: grid; gap: 6px; }
.pdp-features li { display: flex; align-items: flex-start; gap: 8px; margin: 0 !important; font-size: 14px; line-height: 1.7; }
.pdp-features .icon { width: 18px; height: 18px; margin-top: 3px; color: var(--c-ink); flex-shrink: 0; }
.pdp-heritage { font-size: 14px; color: var(--c-muted); }
.pdp-acc .spec-table { padding: var(--s-1) var(--s-4); }
.pdp-acc .spec-table__row { grid-template-columns: 96px minmax(0, 1fr); gap: var(--s-3); padding: 10px 0; }
@media (min-width: 768px) { .pdp-acc .spec-table__row { grid-template-columns: 120px minmax(0, 1fr); } }
.pdp-addr { font-size: 12px; color: var(--c-muted); }
.pdp-legal { margin-top: var(--s-4); background: #FFF6DA; }
.pdp-legal p + p { margin-top: 4px; }
.pdp-legal__main { font-weight: 700; color: var(--c-ink); }
.pdp-list { display: grid; gap: var(--s-3); list-style: none; margin: 0; padding: 0; font-size: 14px; line-height: 1.8; }
.pdp-list strong { display: block; font-weight: 500; color: var(--c-ink); }
.pdp-acc__links { display: flex; flex-wrap: wrap; gap: 0 var(--s-5); }

/* ---------- Where to buy + related ---------- */
.pdp-where { padding-bottom: var(--s-7); }
.pdp-where__lead { margin: calc(var(--head-gap) * -.5) 0 var(--s-5); font-size: 14px; color: var(--c-muted); max-width: 640px; }
.pdp-where__stores { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-4); margin-top: var(--s-6); padding: var(--s-5); border-radius: var(--radius-card); background: var(--c-stage-2); }
.pdp-where__stores > .icon { width: 24px; height: 24px; flex-shrink: 0; }
.pdp-where__stores p { flex: 1 1 240px; font-size: 15px; color: var(--c-ink); }
.pdp-where__stores p span { display: block; font-size: 13px; color: var(--c-muted); margin-top: 2px; }
.pdp-related { padding-bottom: var(--section-y); }

/* ---------- Not found ---------- */
.pdp-missing { display: flex; flex-direction: column; align-items: center; gap: var(--s-3); padding: var(--s-7) 0 var(--s-6); text-align: center; }
.pdp-missing__title { display: flex; flex-direction: column; align-items: center; gap: 4px; letter-spacing: 0; }
.pdp-missing__zh { font-size: 18px; font-weight: 500; color: var(--c-ink); letter-spacing: .08em; }
.pdp-missing__text { max-width: 420px; font-size: 14px; color: var(--c-muted); }
.pdp-missing .btn-row { margin-top: var(--s-3); }
.pdp-missing__more { padding: var(--s-6) 0 var(--section-y); border-top: 1px solid var(--c-line-soft); }

/* ---------- Lightbox (built on the global .drawer layer) ---------- */
.pdp-lightbox .drawer__overlay { background: rgba(255, 255, 255, .96); }
.pdp-lightbox .drawer__panel { inset: 0; left: 0; right: 0; top: 0; bottom: 0; width: 100%; height: 100%; max-height: none; border-radius: 0; background: transparent; box-shadow: none; transform: none; opacity: 0; transition: opacity 250ms var(--ease); display: flex; align-items: center; justify-content: center; }
.pdp-lightbox.is-open .drawer__panel { opacity: 1; transform: none; }
.pdp-lightbox__figure { width: min(94vw, 82vh); aspect-ratio: 1 / 1; margin: 0; border-radius: var(--radius-card); overflow: hidden; background: #fff; }
.pdp-lightbox__figure.is-product { background: var(--c-stage); }
.pdp-lightbox__img { width: 100%; height: 100%; object-fit: cover; }
.pdp-lightbox__figure.is-product .pdp-lightbox__img { object-fit: contain; mix-blend-mode: multiply; }
.pdp-lightbox__close { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; margin: 0; z-index: 2; background: var(--c-ink); color: #fff; }
.pdp-lightbox__close:hover { background: #333; }
.pdp-lightbox__nav { position: absolute; top: 50%; z-index: 2; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin-top: -24px; border-radius: 50%; background: #fff; color: var(--c-ink); box-shadow: var(--shadow-soft); }
.pdp-lightbox__nav--prev { left: 12px; }
.pdp-lightbox__nav--next { right: 12px; }
.pdp-lightbox__count { position: absolute; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); font: 600 13px "Open Sans", sans-serif; color: var(--c-text); letter-spacing: .08em; }
@media (min-width: 768px) { .pdp-lightbox__nav--prev { left: 32px; } .pdp-lightbox__nav--next { right: 32px; } .pdp-lightbox__close { top: 24px; right: 24px; } }

/* ---------- Mobile sticky add-to-cart bar ---------- */
.pdp-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 95; padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px)); background: rgba(255, 255, 255, .97); -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); border-top: 1px solid var(--c-line-soft); box-shadow: 0 -4px 16px rgba(0, 0, 0, .06); transform: translateY(110%); visibility: hidden; transition: transform 300ms var(--ease), visibility 0s linear 300ms; }
.pdp-bar.is-visible { transform: none; visibility: visible; transition: transform 300ms var(--ease), visibility 0s; }
.pdp-bar__inner { display: flex; align-items: center; gap: var(--s-3); }
.pdp-bar__img { width: 48px; height: 48px; flex-shrink: 0; border-radius: 10px; background: var(--c-stage); overflow: hidden; }
.pdp-bar__img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.pdp-bar__info { flex: 1; min-width: 0; }
.pdp-bar__name { font-size: 14px; font-weight: 500; color: var(--c-ink); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdp-bar__meta { display: flex; gap: 8px; font-size: 13px; color: var(--c-muted); line-height: 1.4; white-space: nowrap; overflow: hidden; }
.pdp-bar__meta .num { font-weight: 600; color: var(--c-ink); }
.pdp-bar__btn { flex-shrink: 0; padding: 0 18px; }
.pdp-bar__btn .icon { width: 18px; height: 18px; }
@media (min-width: 1024px) { .pdp-bar { display: none; } }
@media (max-width: 1023.98px) {
  body[data-page="product"] .site-footer { padding-bottom: calc(var(--s-6) + 76px); }
  html:not(.is-locked) body.pdp-bar-on .toast-wrap { bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
}
body.pdp-bar-on .line-float { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }

@media (prefers-reduced-motion: reduce) {
  .pdp-gallery__slide.is-bob img { animation: none !important; }
}
