/* Single product page. Mobile first: one column, sticky buy bar. From 900px: gallery on one side, sticky purchase panel on the other. */
.pdp { display: block; max-width: 1180px; margin-inline: auto; }
.pdp-crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 14px; font-size: .85rem; color: var(--muted); }
.pdp-crumbs a { color: var(--accent-ink); text-decoration: none; }
.pdp-crumbs a:hover { text-decoration: underline; }
.pdp-crumbs .cur { color: var(--text); font-weight: 700; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pdp-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }

/* gallery */
.pdp-gallery { min-width: 0; }
.pdp-stage { position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; border-radius: var(--r-lg);
  background: radial-gradient(520px 320px at 30% 20%, var(--accent-soft), var(--surface)); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.pdp-main { width: 100%; height: 100%; object-fit: contain; padding: 16px; transition: opacity .25s var(--ease), transform .6s var(--ease); }
.pdp-main.pdp-art { object-fit: cover; padding: 0; }
.pdp-stage:hover .pdp-main { transform: scale(1.03); }
.pdp-main.swap { opacity: 0; }
.pdp-sale { position: absolute; top: 12px; inset-inline-start: 12px; z-index: 2; background: var(--danger); color: #fff; border-radius: 999px; padding: .15em .9em; font-weight: 800; font-size: .8rem; }
.pdp-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding: 2px 2px 6px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.pdp-thumb { flex: 0 0 72px; aspect-ratio: 1; padding: 0; overflow: hidden; border-radius: 12px; border: 2px solid var(--border); background: var(--surface); cursor: pointer; scroll-snap-align: start; transition: border-color .2s, transform .2s var(--ease); }
.pdp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pdp-thumb:hover { transform: translateY(-2px); }
.pdp-thumb.on { border-color: var(--accent); }

/* purchase panel */
.pdp-buy { min-width: 0; }
.pdp-buy .product_title { margin: 0 0 8px; font: 800 clamp(1.4rem, 5vw, 2rem)/1.35 var(--font); }
.pdp-buy .price { display: block; margin: 4px 0 12px; font: 800 clamp(1.5rem, 5vw, 1.9rem) var(--font); color: var(--accent-ink); transition: transform .25s var(--ease); }
.pdp-buy .price del { color: var(--muted); font-size: .65em; font-weight: 600; margin-inline-end: .4em; }
.pdp-buy .price ins { text-decoration: none; }
.pdp-buy .price.is-updated { transform: scale(1.05); }
.pdp-buy .woocommerce-product-details__short-description { margin: 0 0 12px; color: var(--text-2); line-height: 1.9; }
.pdp-buy .product_meta { margin-top: 14px; color: var(--muted); font-size: .85rem; display: grid; gap: 4px; }
.pdp-buy .product_meta .sku_wrapper { display: none; }
.pdp-buy .product_meta a { color: var(--accent-ink); }
.pdp-buy form.cart { margin: 14px 0 0; }
.pdp-buy .woocommerce-variation-add-to-cart, .pdp-buy form.cart:not(.variations_form) { display: flex; gap: 10px; align-items: stretch; }
.pdp-buy .single_add_to_cart_button.button { flex: 1; min-width: 0; padding: 1em 1.2em !important; font-size: 1.05rem !important; border-radius: 12px !important; box-shadow: 0 10px 24px var(--accent-glow) !important; transition: transform .2s var(--ease), box-shadow .2s !important; }
.pdp-buy .single_add_to_cart_button.button:hover { transform: translateY(-2px); }
.pdp-buy .single_add_to_cart_button.button.disabled, .pdp-buy .single_add_to_cart_button.button:disabled { opacity: .45; box-shadow: none !important; transform: none; }
.pdp-buy .woocommerce-variation-price .price { font-size: 1.2rem; margin-bottom: 8px; }
.pdp-buy .woocommerce-variation-availability { margin: 0 0 8px; color: var(--ok); }
.pdp-buy .stock.out-of-stock { color: var(--danger); font-weight: 700; }
.pdp-buy .p-features { margin: 0 0 12px; }
.pdp-buy .p-trust { grid-template-columns: minmax(0, 1fr); }

/* details as sections */
.pdp-details { margin-top: 22px; display: grid; gap: 12px; }
.pdp-sec { border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.pdp-sec > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; font: 800 1.02rem var(--font); cursor: pointer; list-style: none; }
.pdp-sec > summary::-webkit-details-marker { display: none; }
.pdp-sec > summary::after { content: '+'; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-size: 1.2rem; line-height: 1; transition: transform .25s var(--ease); }
.pdp-sec[open] > summary::after { content: '−'; }
.pdp-sec > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.pdp-body { padding: 0 18px 18px; line-height: 1.95; color: var(--text-2); }
.pdp-sec[open] .pdp-body { animation: pdp-in .3s var(--ease); }
.pdp-body table.woocommerce-product-attributes { width: 100%; border: 0; border-collapse: collapse; }
.pdp-body table.woocommerce-product-attributes th { width: 34%; text-align: start; color: var(--muted); font-weight: 700; vertical-align: top; }
.pdp-body table.woocommerce-product-attributes th, .pdp-body table.woocommerce-product-attributes td { padding: .75em 0; border: 0; border-bottom: 1px dashed var(--border); background: none; font-style: normal; }
.pdp-body table.woocommerce-product-attributes td p { margin: 0; }
@keyframes pdp-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* related */
.pdp-more { margin-top: 28px; }
.pdp-more > section > h2 { margin: 0 0 4px; font: 800 1.35rem var(--font); }

/* sticky buy bar on phones (store.js) */
.buy-bar { display: none; }

@media (max-width: 699px) {
  .pdp-more ul.products { display: flex !important; overflow-x: auto; gap: 12px; padding-bottom: 8px; scroll-snap-type: x mandatory; }
  .pdp-more ul.products li.product { flex: 0 0 78%; scroll-snap-align: start; }
  .pdp-buy .quantity .q-btn { width: 38px; }
  .buy-bar { position: fixed; inset-inline: 0; bottom: 0; z-index: 60; display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--border); transform: translateY(110%); transition: transform .35s var(--ease); }
  .buy-bar.on { transform: none; }
  .buy-bar .bb-price { font: 800 1.1rem var(--font); color: var(--accent-ink); }
  .buy-bar .bb-btn { background: var(--accent); color: #fff; border: 0; border-radius: 12px; padding: .8em 1.4em; font: 800 .95rem var(--font); cursor: pointer; }
  body:has(.buy-bar.on) { padding-bottom: 76px; }
}
@media (min-width: 520px) and (max-width: 899px) { .pdp-buy .p-trust { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 700px) { .pdp-thumb { flex-basis: 84px; } }
@media (min-width: 900px) {
  .pdp-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 36px; }
  .pdp-gallery { position: sticky; top: 88px; }
  .pdp-buy { padding: 26px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
  .pdp-details { grid-template-columns: minmax(0, 1fr); max-width: 860px; }
}
@media (prefers-reduced-motion: reduce) {
  .pdp-main, .pdp-thumb, .pdp-sec[open] .pdp-body { transition: none; animation: none; }
  .pdp-stage:hover .pdp-main { transform: none; }
}

/* key features and reassurance list */
.p-features, .p-trust { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.p-features li, .p-trust li { display: flex; gap: 10px; align-items: center; margin: 0; }
.p-features .ic { color: var(--ok); flex: none; }
.p-trust { margin-top: 16px; padding: 14px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--border); font-size: .88rem; }
.p-trust .ic { color: var(--accent); flex: none; }
.p-ask { margin: 0; }
.p-ask a { display: inline-flex; gap: 8px; align-items: center; color: var(--accent-ink); font-weight: 700; text-decoration: none; }
.p-ask a:hover { text-decoration: underline; }
@media (max-width: 699px) { .pdp-crumbs .cur { display: none; } }

/* ───────── v2: premium look, facts, quote steps, barcode card, help band ───────── */
.pdp-buy .price-quote { font-size: .62em; font-weight: 800; color: var(--accent-ink); letter-spacing: .01em; }
.pdp-buy .product_title { letter-spacing: -.01em; }
.pdp-buy .p-badge.solo { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }

.pdp-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 0 0 14px; padding: 10px 0; border-block: 1px dashed var(--border); font-size: .85rem; color: var(--text-2); }
.pdp-facts li { display: inline-flex; align-items: center; gap: 7px; margin: 0; }
.pdp-facts i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.pdp-facts .f-ok i { background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent); }
.pdp-facts .f-off i { background: var(--danger); }
.pdp-facts .f-dot i { background: var(--accent); }
.pdp-facts .f-sku { font-family: ui-monospace, Menlo, Consolas, monospace; margin-inline-start: auto; color: var(--muted); }
.pdp-facts .f-sku i { display: none; }

.pdp-steps { list-style: none; margin: 16px 0 0; padding: 14px; display: grid; gap: 10px; border-radius: var(--r); background: linear-gradient(135deg, var(--accent-soft), transparent 70%), var(--surface-2); border: 1px solid var(--border); font-size: .9rem; }
.pdp-steps li { display: flex; gap: 12px; align-items: flex-start; margin: 0; }
.pdp-steps b { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; font-size: .8rem; }
.pdp-steps span { padding-top: 2px; line-height: 1.7; }

.pdp-sku { margin: 16px 0 0; padding: 14px; border-radius: var(--r); border: 1px solid var(--border); background: var(--surface); text-align: center; }
.pdp-sku figcaption { display: flex; justify-content: center; gap: 8px; align-items: baseline; margin-bottom: 10px; color: var(--muted); font-size: .82rem; font-weight: 700; }
.pdp-sku figcaption b { color: var(--text); font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .04em; }
.pdp-barcode { display: inline-block; max-width: 100%; padding: 10px 14px; background: #fff; border-radius: 12px; border: 1px solid #e6e2d7; box-shadow: var(--shadow-sm); }
.pdp-barcode svg { display: block; width: 100%; max-width: 320px; height: auto; }

.pdp-cta { margin-top: 26px; padding: 24px; display: grid; gap: 16px; align-items: center; border-radius: var(--r-lg); color: #fff;
  background: radial-gradient(520px 220px at 90% -30%, rgba(255,255,255,.22), transparent 70%), linear-gradient(135deg, var(--accent-ink), var(--accent)); box-shadow: 0 18px 40px var(--accent-glow); }
.pdp-cta h2 { margin: 0 0 4px; font: 800 1.3rem var(--font); color: #fff; }
.pdp-cta p { margin: 0; opacity: .92; line-height: 1.8; }
.pdp-cta-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.pdp-cta .btn { background: #fff; color: var(--accent-ink); border-color: #fff; font-weight: 800; }
.pdp-cta .btn.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
@media (min-width: 760px) { .pdp-cta { grid-template-columns: 1fr auto; padding: 28px 32px; } }

/* richer buy panel on wide screens */
@media (min-width: 900px) {
  .pdp-buy { position: relative; background: linear-gradient(180deg, color-mix(in srgb, var(--accent-soft) 55%, var(--surface)), var(--surface) 160px); }
  .pdp-buy::before { content: ''; position: absolute; inset-inline: 26px; top: 0; height: 3px; border-radius: 0 0 6px 6px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
}

/* motion that works on touch and mouse */
.pdp-stage { --rx: 0deg; --ry: 0deg; perspective: 900px; }
.pdp-stage .pdp-main { transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .25s var(--ease), opacity .25s var(--ease); will-change: transform; }
@media (hover: hover) and (pointer: fine) {
  .pdp-buy .single_add_to_cart_button.button { position: relative; overflow: hidden; }
  .pdp-buy .single_add_to_cart_button.button::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%); transform: translateX(-120%); }
  .pdp-buy .single_add_to_cart_button.button:hover::after { transform: translateX(120%); transition: transform .8s var(--ease); }
}
.js-motion .pdp-sec, .js-motion .pdp-facts, .js-motion .pdp-sku, .js-motion .pdp-steps, .js-motion .pdp-more { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js-motion .pdp-sec.in, .js-motion .pdp-facts.in, .js-motion .pdp-sku.in, .js-motion .pdp-steps.in, .js-motion .pdp-more.in { opacity: 1; transform: none; }
.pdp-buy .tagged_as { display: none; }
@media (max-width: 699px) {
  .pdp-stage { touch-action: pan-y; }
  .pdp-facts .f-sku { margin-inline-start: 0; flex-basis: 100%; }
  .pdp-cta { padding: 20px; }
  .pdp-cta-btns .btn { flex: 1; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .js-motion .pdp-sec, .js-motion .pdp-facts, .js-motion .pdp-sku, .js-motion .pdp-steps, .js-motion .pdp-more { opacity: 1; transform: none; transition: none; }
  .pdp-stage .pdp-main { transform: none; }
  .pdp-buy .single_add_to_cart_button.button::after { display: none; }
}
@media print { .pdp-cta, .buy-bar, .pdp-more { display: none; } .pdp-sku { break-inside: avoid; } }
