/* ==========================================================================================================
   WARP VAULT STORE: the single piece page (item.html). Page-only styles, prefix .it-
   Everything shared (tokens, buttons, cards, tags, price, marquee, badge, drawer) comes from store.css.
   Layout: the photo hangs on the concrete wall (left), the paper tag with the facts is on the right.
   ========================================================================================================== */

.it-top { display: grid; border-bottom: var(--bw) solid var(--ink); }
.it-field { padding: var(--gutter); border-bottom: var(--bw) solid var(--ink); }
.it-info { position: relative; min-width: 0; }
.it-info-in { display: grid; gap: 0; padding: 26px var(--gutter) 44px; }

/* ---------- gallery ---------- */
.it-gal { display: grid; gap: 12px; width: 100%; margin-inline: auto; }
.it-stage {
  position: relative; aspect-ratio: 1 / 1; background: var(--concrete-deep);
  border: 8px solid var(--paper-hi); outline: var(--bw) solid var(--ink);
  box-shadow: 0 22px 36px -20px rgba(20, 20, 18, 0.6), 0 4px 10px -4px rgba(20, 20, 18, 0.3);
}
.it-stage > .wv-skel-box { width: 100%; height: 100%; }
.it-track { display: flex; width: 100%; height: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.it-track::-webkit-scrollbar { display: none; }
.it-track:focus-visible { outline-offset: 10px; }
.it-slide { flex: 0 0 100%; width: 100%; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; }
.it-slide img { width: 100%; height: 100%; object-fit: contain; }
.it-tags { position: absolute; left: 10px; top: 10px; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; pointer-events: none; }
.it-tags .wv-tag { min-height: 26px; padding: 3px 10px; font-size: 0.75rem; }
.it-tags .wv-tag:not(.sale):not(.new) { background: var(--paper-hi); }
.it-n {
  position: absolute; right: 10px; bottom: 10px; z-index: 2; margin: 0; padding: 4px 10px; border-radius: 999px;
  background: var(--ink); color: var(--paper); font-size: 0.75rem; letter-spacing: 0.04em; line-height: 1.3; pointer-events: none;
}
.it-n:empty { display: none; }
.it-nav {
  position: absolute; top: 50%; z-index: 2; display: none; width: 44px; height: 44px; margin-top: -22px; padding: 0; border: 0; border-radius: 50%;
  background: none; cursor: pointer; --b-chip: var(--paper-hi); --b-chip-fg: var(--ink);
  transition: opacity 160ms ease, transform 140ms var(--ease-out);
}
.it-nav .wv-arrow { width: 44px; height: 44px; box-shadow: 0 0 0 var(--bw) var(--ink); }
.it-nav.prev { left: 12px; } .it-nav.next { right: 12px; }
.it-nav:active { transform: scale(0.94); }
.it-nav[disabled] { opacity: 0; pointer-events: none; }
@media (hover: hover) and (pointer: fine) {
  .it-nav { display: block; }
  .it-nav:hover { --b-chip: var(--lime); }
}
.it-gal.is-solo .it-nav, .it-gal.is-solo .it-thumbs { display: none; }

.it-thumbs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.it-thumb {
  position: relative; display: block; aspect-ratio: 1 / 1; padding: 0; border: 3px solid var(--paper-hi); outline: var(--bw) solid var(--ink); background: var(--concrete-deep);
  cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform 160ms var(--ease-out), border-color 160ms ease;
}
.it-thumb img { width: 100%; height: 100%; object-fit: contain; }
.it-thumb[aria-current="true"] { border-color: var(--lime); transform: translateY(-4px); }
.it-thumb:active { transform: scale(0.96); }
.it-thumb:focus-visible { outline: 2.5px solid var(--ink); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .it-thumb:not([aria-current="true"]):hover { transform: translateY(-2px); border-color: var(--ink); } }

/* ---------- the facts ---------- */
.it-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: -10px 0 8px; }
.it-crumbs a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.it-crumbs a:hover { text-decoration: underline; }
.it-crumbs span { color: var(--muted); }

.it-brand { margin-bottom: 8px; }
.it-name.wv-title { font-size: clamp(2.5rem, 11.5vw, 4.5rem); line-height: 0.92; text-wrap: balance; overflow-wrap: break-word; }
.it-full { margin-top: 12px; color: var(--muted); font-size: 0.9375rem; line-height: 1.4; max-width: 34em; text-wrap: pretty; }

.it-pricing { margin-top: 24px; }
.it-pricing .wv-price.lg { gap: 4px 12px; }
.it-pricing .wv-price.lg b { font-size: clamp(3rem, 12vw, 4.25rem); }
.it-pricing .wv-price.lg.is-sale b { padding: 2px 10px 0; margin-left: 0; }
.it-pricing .wv-price.lg s { font-size: 1.375rem; font-weight: 600; }

.it-sale { margin-top: 14px; padding: 14px 0; border-block: var(--bw) solid var(--ink); display: grid; gap: 8px; }
.it-sale p { font-weight: 600; line-height: 1.5; text-wrap: pretty; }
.it-sale p b { font-size: 1.125rem; }
.it-sale .wv-tag { margin-right: 6px; vertical-align: 2px; }
.it-sale-sub, .it-sale p.it-sale-sub { font-weight: 400; font-size: 0.9375rem; color: var(--muted); }
p.it-sale-sub[data-r] { margin-top: 12px; }
.it-sale-sub a { color: var(--ink); font-weight: 600; white-space: nowrap; }
.it-sale-sub a:hover { background: var(--lime); text-decoration: none; }
.it-ends { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.it-ends .wv-count.sm .wv-count-u { padding-inline: 12px; gap: 2px; }
.it-ends .wv-count.sm .wv-count-u:first-child { padding-left: 0; }

.it-buy { margin-top: 22px; display: grid; gap: 12px; }
.it-buy-main { min-height: 60px; font-size: 1.125rem; padding-left: 28px; }
.it-buy-main .wv-arrow { width: 46px; height: 46px; }
.it-also { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.it-also .wv-meta { margin-right: 4px; }
.it-acts { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; border-top: var(--bw) solid var(--ink); }
.it-acts .wv-btn { gap: 8px; padding-inline: 16px 18px; }
.it-savebtn[aria-pressed="true"] { --b-bg: var(--lime); --b-fg: var(--ink); }
@media (hover: hover) and (pointer: fine) { .it-savebtn[aria-pressed="true"]:hover { --b-bg: var(--lime-deep); --b-fg: var(--ink); } }
.it-nolink { font-weight: 600; }
.it-one { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; font-size: 0.9375rem; color: var(--muted); line-height: 1.45; max-width: 36em; }
.it-one b { color: var(--ink); }
.it-one i { width: 10px; height: 10px; margin-top: 0.4em; background: var(--lime); outline: var(--bw) solid var(--ink); transform: rotate(45deg); }

.it-specs { margin: 30px 0 0; display: grid; }
.it-specs > div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 13px 0; border-top: var(--bw) solid var(--ink); }
.it-specs > div:last-child { border-bottom: var(--bw) solid var(--ink); }
.it-specs dt { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.it-specs dd { margin: 0; display: grid; gap: 2px; font-variant-numeric: tabular-nums; }
.it-specs dd b { font-weight: 700; font-size: 1.0625rem; }
.it-specs dd small { font-size: 0.9375rem; color: var(--muted); }
.it-specs dd a { justify-self: start; text-decoration-thickness: 1.5px; }
.it-specs dd a:hover { background: var(--lime); text-decoration: none; }

.it-desc { margin-top: 40px; }
.it-desc h2 { margin-bottom: 16px; }
.it-desc p { max-width: 62ch; font-size: 1.0625rem; line-height: 1.6; text-wrap: pretty; }
.it-desc p + p { margin-top: 0.9em; }

.it-help { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 0 22px; font-size: 0.9375rem; font-weight: 600; }
.it-help a { display: inline-flex; align-items: center; min-height: 44px; }
.it-help a:hover { background: var(--lime); text-decoration: none; }

.it-seal { display: none; }
.it-more .wv-head { align-items: center; }

/* ---------- phone: sticky buy bar ---------- */
.it-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 65; background: var(--ink); color: var(--paper);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)); border-top: var(--bw) solid var(--ink);
  transform: translate3d(0, 100%, 0); visibility: hidden; transition: transform 260ms var(--ease-drawer), visibility 0s linear 260ms;
}
.it-bar.is-in { transform: none; visibility: visible; transition: transform 260ms var(--ease-drawer), visibility 0s; }
.it-bar-in { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.it-bar img { width: 48px; height: 48px; object-fit: contain; background: var(--concrete-deep); outline: 1px solid #3a3833; }
.it-bar-txt { min-width: 0; display: grid; gap: 1px; }
.it-bar-txt p { font-size: 0.75rem; font-weight: 600; color: var(--concrete); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.it-bar .wv-price b { font-size: 1.1875rem; }
.it-bar .wv-price s { color: var(--concrete); }
.it-bar .wv-price.is-sale b { color: var(--ink); }
.it-bar .wv-btn { min-height: 48px; padding-inline: 18px; --b-line: transparent; }
.it-bar .wv-btn:hover { --b-bg: var(--paper); }
body.it-has-bar .wv-toasts { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
body.it-has-bar .wv-foot { padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 359px) { .it-bar-in { grid-template-columns: minmax(0, 1fr) auto; } .it-bar img { display: none; } }

/* ---------- the piece is gone ---------- */
.it-gone .it-field { display: grid; place-items: center; overflow: clip; padding-top: 0; }
.it-rack { width: min(100%, 520px); }
.it-rack svg { display: block; width: 100%; height: auto; overflow: visible; }
.it-rack-pipe { fill: var(--ink); }
.it-rack-hook { fill: none; stroke: var(--ink); stroke-width: 6; stroke-linecap: round; }
.it-rack-wood { fill: none; stroke: var(--wood); stroke-width: 15; stroke-linejoin: round; }
.it-rack-string { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.it-rack-tag { fill: var(--paper-hi); stroke: var(--ink); stroke-width: 1.5; }
.it-rack-hole { fill: var(--concrete); stroke: var(--ink); stroke-width: 1.5; }
.it-rack-t1 { font: 800 15px var(--sans); font-stretch: 75%; fill: var(--ink); }
.it-rack-t2 { font: 700 9px var(--sans); letter-spacing: 0.14em; fill: var(--muted); }
.it-rack-hanger { transform-origin: 200px 46px; transform-box: view-box; animation: it-sway 2.8s var(--ease-in-out) 0.25s 1 both; }
@keyframes it-sway { 0% { transform: rotate(0); } 18% { transform: rotate(5deg); } 40% { transform: rotate(-3.4deg); } 60% { transform: rotate(2deg); } 80% { transform: rotate(-0.8deg); } 100% { transform: rotate(0); } }
.it-gone .it-name.wv-title { font-size: clamp(3rem, 13vw, 6rem); margin-top: 6px; }
.it-gone .wv-lede { margin-top: 20px; }
.it-gone-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

@media (min-width: 600px) and (max-width: 899px) { .it-gal { max-width: 540px; } .it-field { padding-block: 28px; } .it-info-in { max-width: 700px; margin-inline: auto; } }

/* ---------- wide screens: photo wall left (sticky), paper right ---------- */
@media (min-width: 900px) {
  .it-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .it-field { border-bottom: 0; border-right: var(--bw) solid var(--ink); padding: clamp(28px, 3.4vw, 48px) clamp(28px, 4vw, 56px); }
  .it-gal { position: sticky; top: calc(var(--nav-h) + clamp(20px, 2.6vw, 36px)); max-width: min(100%, calc(100vh - var(--nav-h) - var(--bar-h) - 236px)); min-width: min(100%, 360px); gap: 14px; }
  .it-stage { border-width: 10px; }
  .it-thumbs { gap: 10px; }
  .it-info-in { max-width: 680px; padding: clamp(28px, 3.4vw, 48px) clamp(28px, 4vw, 56px) 72px clamp(40px, 5.5vw, 84px); }
  .it-name.wv-title { font-size: clamp(3rem, 4.9vw, 5rem); }
  .it-buy-main { max-width: 440px; }
  .it-bar { display: none; }
  body.it-has-bar .wv-toasts { bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
  body.it-has-bar .wv-foot { padding-bottom: 0; }
  .it-seal.wv-badge { display: grid; position: absolute; left: 0; top: clamp(360px, 46vh, 520px); --badge: 124px; margin: 0 0 0 -62px; z-index: 4; pointer-events: none; }
  .it-gone .it-field { padding-top: 0; place-items: start center; }
  .it-gone .it-rack { position: sticky; top: var(--nav-h); }
  .it-gone .it-info-in { align-content: center; min-height: min(640px, calc(100vh - var(--nav-h) - var(--bar-h))); }
  .it-gone .it-name.wv-title { font-size: clamp(3.6rem, 6.4vw, 6.5rem); }
}

@media (prefers-reduced-motion: reduce) {
  .it-rack-hanger { animation: none; }
  .it-bar { transition: opacity 160ms ease, visibility 0s linear 160ms; transform: none; opacity: 0; }
  .it-bar.is-in { opacity: 1; transition: opacity 160ms ease, visibility 0s; }
  .it-thumb, .it-nav { transition: border-color 120ms ease, opacity 120ms ease; }
  .it-thumb[aria-current="true"], .it-thumb:hover, .it-thumb:active, .it-nav:active { transform: none; }
}
@media print { .it-bar, .it-nav, .it-thumbs { display: none !important; } }
