/**
 * PureNest PDP v2 — styles for the v2-only pieces.
 *
 * Loaded after the parent's pn-site.css → pn-pages.css → pn-product.css (dependency `purenest-product`),
 * so it relies on the native tokens (--ink, --ink-2, --ink-3, --ink-line, --ink-line-soft, --cream, --gold,
 * --tx, --tx-mut, --tx-mut2, --display, --sans, --ease, --maxw, --gutter) and on the base classes already
 * styled there (.pg, .wrap, .crumbs, .sec-head, .eyebrow, .pdp, .gallery, .gal-*, .qty-row, .qty, .add-big,
 * .sub-acts, .accordion/.acc-*, .reviews-grid/.review/.reviews-head, .related-grid/.rel, .btn, .pn-toast).
 * Only what those do not cover is defined here. No token bridge, no !important.
 */

/* ───────── Parent pn-product.css resets that target block-template pages ───────── */
body.single-product main[data-pdp-root] {
  /* pn-product.css gives `body.single-product main` a max-width + padding meant for the block template;
     here sections are full-bleed and .wrap already carries the gutter. */
  max-width: none;
  margin-inline: 0;
  padding: 0;
}

.pg.pdp-top { padding-top: clamp(40px, 6vh, 72px); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ───────── Layout: left column = gallery + accordion ───────── */
.pdp .pdp-left,
.pdp .pdp-summary { min-width: 0; }
.pdp .pdp-left .gallery { position: static; }
.pdp .gal-thumbs { flex-wrap: wrap; }
.pdp .gal-main img { width: auto; height: auto; }
.pdp .gal-acc { margin-top: 40px; }

/* ───────── Summary ───────── */
.pdp-rating { flex-wrap: wrap; }
.price-row .big del { font-size: .5em; color: var(--tx-mut2); margin-right: 10px; text-decoration-thickness: 1px; }
.price-row .big ins { text-decoration: none; }

.pdp .percycle, .percycle { font-family: var(--sans); font-size: 13px; font-weight: 400; line-height: 1.5; letter-spacing: .02em;
  text-transform: none; white-space: normal; overflow-wrap: anywhere; color: var(--tx-mut); margin: 14px 0 0; }
.pdp .pn-unit-price { display: none; } /* the site-wide script appends the unit price into .big (inherits the 48px price type); .percycle replaces it */
.pdp .percycle strong, .percycle strong { font-family: var(--sans); font-size: inherit; letter-spacing: inherit; color: var(--gold); font-weight: 600; }

.pdp-avail .dot--out { background: #b0524a; box-shadow: 0 0 0 3px rgba(176, 82, 74, .16); }
.pdp-avail .dot--pre { background: var(--gold); box-shadow: 0 0 0 3px rgba(196, 162, 101, .16); }
.pdp-avail .cut { color: var(--gold); }
.pdp-avail [hidden] { display: none; }

form.pn-pdp-cart { margin: 0; }
.qty-row--wc { display: block; }
.qty input.val {
  background: transparent; border: 0; border-radius: 0; padding: 0; margin: 0;
  font-family: var(--sans); -moz-appearance: textfield; appearance: textfield;
}
.qty input.val::-webkit-outer-spin-button,
.qty input.val::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty button:disabled { opacity: .35; cursor: not-allowed; }

/* pn-product.css restyles .single_add_to_cart_button (outlined, own padding); the class stays for
   tracking plugins, the v2 look of .add-big is restored here (higher specificity, no !important). */
body.single-product .add-big.single_add_to_cart_button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0;
  flex: 1; min-height: 56px; padding: 0 26px; border: 0; border-radius: 0;
  background: var(--cream); color: #0c0c0c;
  font-size: 12px; letter-spacing: .14em;
}
body.single-product .add-big.single_add_to_cart_button:hover { background: var(--gold); color: #0c0c0c; border: 0; }
.add-big:disabled { opacity: .5; cursor: not-allowed; }
.add-big.is-loading { opacity: .6; pointer-events: none; }
.add-big.is-added,
body.single-product .add-big.single_add_to_cart_button.is-added { background: var(--gold); }

/* Promises — v2 tiles (div.promises.v2 > .promise > svg + .pk/.pv) */
.promises.v2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px; padding: 0; list-style: none;
  background: var(--ink-line); border: 1px solid var(--ink-line); margin-top: 34px;
}
.promises.v2 .promise { background: var(--ink); padding: 18px 20px; display: flex; gap: 13px; align-items: center; }
.promises.v2 .promise svg { color: var(--gold); flex: none; width: 20px; height: 20px; }
.promises.v2 .pk { font-size: 12.5px; font-weight: 500; color: var(--cream); margin-bottom: 3px; letter-spacing: .02em; }
.promises.v2 .pv { font-size: 11.5px; color: var(--tx-mut2); line-height: 1.45; }

/* ───────── Compare table ───────── */
.compare { margin: 56px 0 0; border: 1px solid var(--ink-line); background: var(--ink-2); }
.compare .ch { padding: 22px 26px 18px; border-bottom: 1px solid var(--ink-line); display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.compare .ch h3 { font-family: var(--display); font-size: 26px; letter-spacing: .04em; text-transform: uppercase; color: var(--cream); font-weight: 400; margin: 0; }
.compare .ch span { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--tx-mut2); }
.cmp { width: 100%; border-collapse: collapse; font-size: 13.5px; margin: 0; border: 0; }
.cmp th,
.cmp td { padding: 13px 26px; text-align: left; border: 0; border-bottom: 1px solid var(--ink-line-soft); vertical-align: middle; background: transparent; }
.cmp th { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--tx-mut2); font-weight: 500; }
.cmp th.pn { color: var(--gold); }
.cmp td:first-child { color: var(--tx-mut); width: 34%; }
.cmp td.pn { color: var(--cream); font-weight: 500; }
.cmp td.big { font-family: var(--display); font-size: 24px; letter-spacing: .02em; }
.cmp td.pn.big { color: var(--gold); }
.cmp td.oth { color: var(--tx-mut); }
.cmp td.oth.big { color: var(--tx-mut2); }
.cmp tr:last-child td { border-bottom: none; }
.cmp .ok { color: var(--gold); }
.cmp .no { color: var(--tx-mut2); opacity: .75; }
.compare .cf { padding: 12px 26px 16px; font-size: 11px; color: var(--tx-mut2); line-height: 1.5; }

/* ───────── Accordion additions ───────── */
.gal-acc button.acc-q {
  width: 100%; background: none; border: 0; border-radius: 0; text-align: left; font-family: var(--sans);
}
/* base .acc-a opens to max-height:600px — too short for FAQ / spec on long products */
.gal-acc .acc-item.open .acc-a { max-height: 2400px; }
.gal-acc .acc-a p { margin: 0 0 12px; }
.gal-acc .acc-a p:last-child { margin-bottom: 0; }
.gal-acc .acc-a a { color: var(--gold); border-bottom: 1px solid rgba(196, 162, 101, .35); }
.acc-a .ghs { font-size: 12.5px; color: var(--tx-mut2); line-height: 1.7; }
.acc-a .ghs + .ghs { margin-top: 12px; }
.acc-calm {
  font-size: 13.5px; color: var(--cream); background: rgba(196, 162, 101, .06);
  border-left: 2px solid var(--gold); padding: 14px 18px; margin: 0 0 14px; line-height: 1.65;
}
.faq p { margin: 0 0 14px; }
.faq p:last-child { margin: 0; }
.faq strong { color: var(--cream); font-weight: 500; }
.faq-num { color: var(--gold); font-weight: 600; }
.acc-link { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.acc-link:hover { color: var(--cream); }

/* Markup produced by the ported purenest_render_* helpers */
.acc-a dl.pn-params { margin: 0; }
.acc-a .pn-params__row { display: flex; gap: 14px; padding: 6px 0; border-bottom: 1px solid var(--ink-line-soft); }
.acc-a .pn-params__row dt { flex: 0 0 40%; color: var(--tx-mut2); }
.acc-a .pn-params__row dd { margin: 0; color: var(--cream); }
.acc-a .pn-compat__heading { margin: 14px 0 8px; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--cream); font-weight: 500; }
.acc-a .pn-clp__notice { font-size: 13px; }
.acc-a .pn-clp__statements { margin-top: 10px; }

/* ───────── Reviews (Allegro) ───────── */
.sec-head .reviews-head { margin-bottom: 0; }
.review { margin: 0; }
.review blockquote { margin: 0; flex: 1; padding: 0; border: 0; }
.review blockquote p { margin: 0; }
.review .who { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; }
.review .who time { color: var(--tx-mut2); }
.review .rsrc { margin-left: auto; color: var(--gold); font-size: 10px; letter-spacing: .14em; }
.review a.rsrc { border-bottom: 1px solid rgba(196, 162, 101, .35); }
.reviews-head .rev-all { color: var(--tx-mut); border-bottom: 1px solid var(--ink-line); transition: color .3s, border-color .3s; }
.reviews-head .rev-all:hover { color: var(--gold); border-color: var(--gold); }

/* ───────── Reminder (newsletter) ───────── */
.remind {
  border: 1px solid var(--ink-line); padding: 30px 32px; display: grid;
  grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; background: var(--ink);
}
.remind h3 { font-family: var(--display); font-size: 30px; letter-spacing: .03em; text-transform: uppercase; color: var(--cream); font-weight: 400; line-height: 1; margin: 0 0 10px; }
.remind p { font-size: 13.5px; color: var(--tx-mut); margin: 0; }
.remind-form { margin: 0; position: relative; }
.remind-row { display: flex; border: 1px solid var(--ink-line); }
.remind-row input[type="email"] {
  flex: 1; min-width: 0; background: transparent; border: 0; border-radius: 0; padding: 15px 16px;
  color: var(--cream); font: 300 14px var(--sans); outline: none;
}
.remind-row input[type="email"]:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.remind-row button {
  background: var(--cream); color: #0c0c0c; border: 0; border-radius: 0; padding: 0 22px; cursor: pointer;
  font: 600 11px var(--sans); letter-spacing: .16em; text-transform: uppercase; transition: background .3s;
}
.remind-row button:hover { background: var(--gold); }
.remind-consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; font-size: 11.5px; line-height: 1.5; color: var(--tx-mut2); cursor: pointer; }
.remind-consent input { margin-top: 3px; accent-color: var(--gold); flex: none; }
.remind-consent a { color: var(--tx-mut); border-bottom: 1px solid var(--ink-line); }
.remind-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.pn-form-flash { margin-top: 14px; font-size: 13px; color: var(--gold); }
.pn-form-flash--error { color: #e08a80; }

/* ───────── Ritual (cross-sell) ───────── */
.related-grid.two { grid-template-columns: repeat(2, 1fr); margin-top: 0; }
.related-grid a.rel { display: block; color: inherit; text-decoration: none; }
.related-grid .rel .ri { overflow: hidden; }
.related-grid .rel .ri img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; } /* WP adds height="1024"; without height:auto the frame grows to ~1000px */
.rel .rp del { font-size: .7em; color: var(--tx-mut2); margin-right: 8px; }
.rel .rp ins { text-decoration: none; }
.rt-cta {
  margin-top: 18px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 18px 22px; border: 1px solid rgba(196, 162, 101, .35); background: rgba(196, 162, 101, .05);
}
.rt-cta .t { font-size: 13.5px; color: var(--cream); }
.rt-cta .btn.is-loading { opacity: .6; pointer-events: none; }

/* ───────── Sticky buy bar (mobile) ───────── */
.sticky-buy {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  background: rgba(12, 12, 12, .94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 1px solid var(--ink-line); padding: 12px 16px; display: none; align-items: center; gap: 14px;
  transform: translateY(100%); visibility: hidden;
  transition: transform .35s var(--ease), visibility 0s linear .35s;
}
.sticky-buy.show { transform: none; visibility: visible; transition: transform .35s var(--ease), visibility 0s; }
.sticky-buy .im { width: 40px; height: 50px; background: #1a1917; flex: none; display: grid; place-items: center; overflow: hidden; }
.sticky-buy .im img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.sticky-buy .t { flex: 1; min-width: 0; }
.sticky-buy .t b { display: block; font-weight: 500; font-size: 13px; color: var(--cream); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky-buy .t span { font-size: 12px; color: var(--tx-mut); }
.sticky-buy .add-big { flex: none; width: auto; min-height: 44px; padding: 12px 18px; font-size: 11px; }

/* ───────── Responsive ───────── */
@media (max-width: 1080px) {
  /* mobile order: gallery → summary → accordion */
  .pdp .pdp-left { display: contents; }
  .pdp .gallery { order: 1; }
  .pdp .pdp-summary { order: 2; }
  .pdp .gal-acc { order: 3; }
}

@media (max-width: 820px) {
  .remind { grid-template-columns: 1fr; padding: 24px 20px; }
  .related-grid.two { grid-template-columns: 1fr; }
  .sticky-buy { display: flex; }
  body.single-product { padding-bottom: 72px; }
  .price-row .big { font-size: 40px; }
  .compare .ch { padding: 18px 18px 14px; }
  #pnPdpToast { bottom: 90px; }
}

@media (max-width: 640px) {
  .cmp th,
  .cmp td { padding: 11px 14px; }
  .cmp td.big { font-size: 20px; }
  .compare .cf { padding: 12px 14px 16px; }
  .qty-row { flex-wrap: wrap; }
  .review { padding: 24px 20px; }
}

@media (max-width: 620px) {
  .promises.v2 { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .sticky-buy { transition-duration: .01ms; }
}
