/* Product page v2 (PRODUCT_PAGE_V2_SPEC): Standard Box / Custom Box. Brand tokens, flat colors (no gradients, glows or lift shadows), 4 px grid.
   Controls 44 px, chips 56 px, buttons are pills, radius 8 (cards 12). Motion: transform and opacity only, off under prefers-reduced-motion.
   Everything that changes the shared gallery or card styles is scoped to .page-product so style pages and the Custom Size page stay as built. */

/* ---- sections: 64 px on desktop, 48 px on phone ---- */
/* ---- visual balance (Nov 23, 2026): one padding system, one H2, one set of grounds ---- */
.page-product { --pp-pad: 64px; --pp-h2-size: 40px; --pp-h2-lh: 46px; --pp-h2-ls: -.015em; } /* the H2 values are the homepage section H2 token */
.page-product :is(.pp4-h2, .pgx__h, .pf__h) { font: 700 var(--pp-h2-size)/var(--pp-h2-lh) var(--font-display); letter-spacing: var(--pp-h2-ls); }
.page-product .pp-sec { padding: var(--pp-pad) 0; }
.page-product .pp-sec--mist { background: var(--pw-kraft-mist); }
.page-product .pp-sec--forest { background: var(--pw-forest); }
.page-product .pp-sec--first { padding: 0 0 64px; }
.page-product .pp-sec--sage { background: var(--pw-sage-mist); }
.page-product .pp-sec--white { background: var(--pw-white); }
.page-product .pp-head { margin: 0 0 24px; }
.page-product .pp-head h2 { margin: 0; font: 700 30px/36px var(--font-display); color: var(--pw-bark); }

/* ---- first screen: two equal columns ---- */
.page-product .pdp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.page-product .pdp__gallery { min-width: 0; }
.page-product .pdp__cap { margin: 8px 0 0; font: 400 13px/18px var(--font-body); color: var(--pw-bark-muted); }
.page-product .pg__main { width: 100%; }
/* thumbnails: 4 whole columns of 4:3 with a 12 px gap */
.page-product .pg__thumbs { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 36px) / 4); gap: 12px; margin: 12px 0 0; overflow-x: auto; scroll-snap-type: x proximity; }
.page-product .pg__thumbs:is([data-n="5"], [data-n="6"], [data-n="7"], [data-n="8"]) { scroll-snap-type: x mandatory; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 12px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 12px), transparent); } /* past four, the row scrolls; always four whole thumbnails, with a soft edge on the right */
.page-product .pg__thumbs li { width: auto; scroll-snap-align: start; }
.page-product .pg__thumb { border-radius: 8px; }

/* ---- buy panel ---- */
.pbuy { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pbuy h1 { margin: 0; font: 700 40px/46px var(--font-display); letter-spacing: -.02em; color: var(--pw-bark); }
.pbuy__lede { margin: -4px 0 0; font: 400 14px/20px var(--font-body); color: var(--pw-bark-muted); }
.ptabs { display: grid; box-sizing: border-box; grid-template-columns: 1fr 1fr; gap: 4px; min-height: 52px; padding: 3px; border: 1.5px solid var(--pw-forest); border-radius: 999px; background: var(--pw-white); }
.ptabs__tab { min-height: 44px; border: 0; border-radius: 999px; background: transparent; color: var(--pw-forest); font: 700 15px/1 var(--font-body); cursor: pointer; transition: background .15s, color .15s; }
.ptabs__tab[aria-selected="true"] { background: var(--pw-forest); color: var(--pw-white); }
.ptabs__tab:not([aria-selected="true"]):hover { background: var(--pw-sage-mist); }
.ptabs__tab:focus-visible, .plink:focus-visible, .pnote:focus-visible { outline: 3px solid var(--pw-foil-gold); outline-offset: 2px; }
.ppanel { display: flex; flex-direction: column; gap: 8px; padding: 0; } /* ui.css gives every tabpanel 22 px of top padding */
.ppanel[hidden] { display: none; }
.pf { min-width: 0; }
.pf__l { margin: 0 0 6px; font: 600 13px/16px var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--pw-bark-muted); }
.pf__l--h { margin: 0; font: 700 18px/24px var(--font-body); letter-spacing: 0; text-transform: none; color: var(--pw-bark); }
.pf__cap { grid-column: 1 / -1; margin: -2px 0 0; font: 400 13px/16px var(--font-body); color: var(--pw-bark-muted); }
.pf--two { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 16px; }

/* chips: a hidden radio inside a label; the label shows the state */
.pchips { display: flex; gap: 8px; min-width: 0; }
.pchips--size { overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.pchips--size::-webkit-scrollbar { display: none; }
.pchips--wrap { flex-wrap: wrap; }
.pchips--qty { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.pchip { position: relative; display: block; min-width: 0; }
.pchip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pchip__in { display: flex; align-items: center; justify-content: center; gap: 8px; box-sizing: border-box; min-height: 44px; padding: 0 10px; border: 1.5px solid var(--pw-line-strong); border-radius: 8px; background: var(--pw-white); color: var(--pw-bark); font: 600 14px/1 var(--font-body); transition: background .15s, border-color .15s; }
.pchip input:checked + .pchip__in, .pchip[aria-pressed="true"] .pchip__in, .pchip--want[aria-pressed="true"] .pchip__in { border-color: var(--pw-forest); background: var(--pw-sage-mist); color: var(--pw-forest); box-shadow: inset 0 0 0 1px var(--pw-forest); }
.pchip input:focus-visible + .pchip__in, .pchip--want:focus-visible .pchip__in { outline: 3px solid var(--pw-foil-gold); outline-offset: 2px; }
.pchip input:disabled + .pchip__in { opacity: .45; cursor: not-allowed; text-decoration: line-through; text-decoration-thickness: 1px; }
.pchip input:disabled { cursor: not-allowed; }
.pchip--want { padding: 0; border: 0; background: none; cursor: pointer; font: inherit; }
.pchip--size { flex: 0 0 calc((100% - 16px) / 3); scroll-snap-align: start; }
.pchips--size[data-n="4"] .pchip--size, .pchips--size[data-n="5"] .pchip--size, .pchips--size[data-n="6"] .pchip--size { flex-basis: 30%; }
.pchip--size .pchip__in { flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; min-height: 56px; padding: 6px 12px; text-align: left; }
.pchip--size b { font: 600 14px/20px var(--font-mono); }
.pchip--size i { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; font: 400 13px/16px var(--font-body); font-style: normal; color: var(--pw-bark-muted); }
.pchip--qty .pchip__in { flex-direction: column; gap: 2px; min-height: 56px; padding: 6px 4px; }
.pchip--qty b { font: 600 15px/20px var(--font-mono); }
.pchip--qty i { font: 500 13px/16px var(--font-mono); font-style: normal; color: var(--pw-bark-muted); }
.pchip__dot { flex: none; width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--pw-line-strong); }
.pchip__dot--white { background: #F2EFE8; }
.pchip__dot--brown { background: #B07A4C; box-shadow: none; }
.pchips--color .pchip__in, .pchips--print .pchip__in { padding: 0 10px; white-space: nowrap; }

/* summary row with Change */
.psum { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; min-height: 44px; }
.psum__t { margin: 0; flex: 1; min-width: 0; font: 400 15px/20px var(--font-body); color: var(--pw-bark); }
.plink { min-height: 44px; padding: 0 4px; border: 0; background: none; font: 600 15px/1 var(--font-body); color: var(--pw-forest); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.psum__sel { display: grid; flex-basis: 100%; grid-template-columns: 1fr 1fr; gap: 12px; }
.psum__sel label { display: block; }
.psum__sel span { display: block; margin-bottom: 4px; font: 600 13px/16px var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--pw-bark-muted); }
.psum__sel select { width: 100%; min-height: 44px; }

/* price line: space is always reserved so a price change never moves the page */
.pprice { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; }
.pprice__tot { margin: 0; font: 600 28px/32px var(--font-mono); color: var(--pw-bark); }
.pprice__each { margin: 0; text-align: right; font: 500 14px/20px var(--font-mono); color: var(--pw-bark); }
.pprice__note { display: block; font: 400 13px/16px var(--font-body); color: var(--pw-bark-muted); }
.pprice.is-none { visibility: hidden; }

.pbtns { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; }
.pbtns .btn { min-height: 44px; justify-content: center; }
.pbtn--ghost { background: transparent; }
.ptrust { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0; padding: 12px 0 0; border-top: 1px solid var(--pw-line); list-style: none; font: 400 13px/16px var(--font-body); }
.ptrust li { display: inline-flex; align-items: center; gap: 4px; }
.ptrust svg { flex: none; color: var(--pw-leaf); }
.ptrust a { color: var(--pw-bark); text-decoration: none; }
.ptrust a:hover { color: var(--state-text-hover); text-decoration: underline; }

/* Custom Box tab */
.pnote { box-sizing: border-box; width: 100%; min-height: 44px; padding: 0 12px; border: 1.5px solid var(--pw-line-strong); border-radius: 8px; background: var(--pw-white); font: 400 15px/1 var(--font-body); color: var(--pw-bark); }
.pnote::placeholder { color: var(--pw-bark-muted); }
.pinfo { margin: 0; padding: 12px 16px; border-radius: 8px; background: var(--pw-sage-mist); font: 400 14px/20px var(--font-body); color: var(--pw-bark); }
.plinks { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; font: 600 15px/24px var(--font-body); }
.pcontact { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; font: 600 15px/24px var(--font-body); }
.pcontact a { display: inline-flex; align-items: center; gap: 8px; color: var(--pw-forest); text-decoration: none; }

/* ---- box styles ---- */
.pps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; } /* always four cells, so two or three cards keep the same card size and the page stays short */
.pps__card { position: relative; display: flex; flex-direction: column; padding: 8px 8px 16px; border: 1px solid var(--pw-line); border-radius: 12px; background: var(--pw-white); }
.pps__media { position: relative; }
.pps__media .pframe { border-radius: 8px; }
.pps__tag { position: absolute; top: 8px; left: 8px; z-index: 2; padding: 4px 8px; border-radius: 999px; background: var(--pw-white); font: 600 13px/16px var(--font-body); color: var(--pw-bark); }
.pps__tag--sel { background: var(--pw-forest); color: var(--pw-white); left: auto; right: 8px; }
.pps__card h3 { margin: 12px 8px 0; font: 600 18px/24px var(--font-body); }
.pps__card h3 a { color: var(--pw-bark); text-decoration: none; }
.pps__card h3 a:hover { color: var(--state-text-hover); text-decoration: underline; }
.pps__line { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 40px; margin: 4px 8px 12px; font: 400 14px/20px var(--font-body); color: var(--pw-bark-muted); }
.pps__btn { margin: auto 8px 0; }
.pps__card.is-selected { border-color: var(--pw-forest); box-shadow: inset 0 0 0 1px var(--pw-forest); }
.pps__btn[aria-pressed="true"] { background: var(--pw-forest); color: var(--pw-white); }

/* ---- good to know ---- */
.pgk h2 { margin: 0 0 24px; font: 700 30px/36px var(--font-display); color: var(--pw-bark); }
.pgk__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; margin: 0; }
.pgk__item { padding: 16px 0 16px; border-top: 1px solid var(--pw-line); }
.pgk__item dt { margin: 0 0 8px; font: 600 18px/24px var(--font-body); color: var(--pw-bark); }
.pgk__item dd { margin: 0; font: 400 15px/24px var(--font-body); color: var(--pw-bark-muted); }
.pgk__more { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; font-weight: 600; }

/* ---- more for: one row of cards and a closing See All tile ---- */
.pmore { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 24px; margin: 0; padding: 0; list-style: none; }
.pmore > .icard { min-width: 0; }
.pmore__all { grid-column: span var(--s6); display: flex; }
.pmore__all a { display: flex; flex: 1; align-items: center; justify-content: center; gap: 8px; min-height: 120px; padding: 16px; border-radius: 16px; background: var(--pw-forest); color: var(--pw-white); font: 700 18px/24px var(--font-body); text-decoration: none; transition: background .15s; }
.pmore__all a:hover { background: var(--pw-forest-deep); color: var(--pw-white); }
.pmore__all a:focus-visible { outline: 3px solid var(--pw-foil-gold); outline-offset: 2px; }
.pmore .icard__body { padding: 12px 4px 4px; }
.pmore .icard__name { font-size: 16px; line-height: 22px; }
.pmore .icard__size, .pmore .icard__tags, .pmore .ichips { display: none; }

/* ---- closing band: solid kraft, bark text ---- */
.page-product .pp-close { padding: 64px 0; background: var(--pw-kraft); color: var(--pw-bark); }
.pclose { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.pclose h2 { margin: 0; font: 700 30px/36px var(--font-display); color: var(--pw-bark); }
.pclose__btns { display: flex; flex-wrap: wrap; gap: 12px; }
.pclose__out { border-color: var(--pw-bark); background: transparent; color: var(--pw-bark); }
.pclose__out:hover { background: var(--pw-bark); color: var(--pw-white); border-color: var(--pw-bark); }

/* ---- tablet and phone ---- */
@media (max-width: 1023px) {
  .page-product .pdp { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .pmore { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pmore__all { grid-column: span var(--s3); }
  .pps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 599px) {
  .page-product { --pp-pad: 48px; }
  .page-product .pp-sec { padding: var(--pp-pad) 0; }
  .page-product .pp-sec--first { padding: 0 0 48px; }
  .page-product .pp-close { padding: 48px 0; }
  .page-product .pp-head h2, .pgk h2, .pclose h2 { font-size: 24px; line-height: 30px; }
  .pbuy h1 { font-size: 30px; line-height: 36px; }
  .pf--two { grid-template-columns: minmax(0, 1fr); }
  .pchips--color, .pchips--print { overflow-x: auto; scrollbar-width: none; }
  .pchips--color .pchip, .pchips--print .pchip { flex: none; }
  .pchips--qty { display: flex; overflow-x: auto; scrollbar-width: none; }
  .pchips--qty .pchip { flex: 0 0 22%; }
  .pchips--size .pchip--size { flex: 0 0 62%; }
  .pbtns { grid-template-columns: 1fr; }
  .psum__sel { grid-template-columns: 1fr; }
  .pps { grid-template-columns: minmax(0, 1fr); }
  .pgk__grid { grid-template-columns: minmax(0, 1fr); }
  .pmore { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .pmore__all { grid-column: span var(--s2); }
  .pclose { flex-direction: column; align-items: flex-start; }
  .page-product .pg__thumbs { grid-auto-columns: calc((100% - 24px) / 3.5); gap: 8px; }
}
@media (prefers-reduced-motion: reduce) { .ptabs__tab, .pchip__in, .pmore__all a { transition: none; } }
