/* ============================================================
   VOZIQA V2 — Product Detail Page
   Gallery (vertical thumbs + drape-wipe stage) · sticky buy panel ·
   money-gold BUY NOW · trust · accordions · related rails.
   Hooks match js/product-detail.js (.pdp-*, #vz-pdp-*).
   ============================================================ */

.pdp {
    padding-block: var(--sp-5) var(--sp-9);
}

/* ─── Breadcrumb ─── */
.pdp-breadcrumb {
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--vz-ink-subtle);
    margin-bottom: var(--sp-5);
}

.pdp-breadcrumb a {
    color: var(--vz-ink-muted);
}

.pdp-breadcrumb a:hover {
    color: var(--vz-plum);
}

.pdp-breadcrumb span {
    color: var(--vz-plum);
}

/* ─── Grid: gallery 58% / info 42% ─── */
.pdp-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 4rem);
    align-items: start;
}

/* ═══════════════ Gallery ═══════════════ */
.pdp-gallery {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: var(--sp-3);
    position: sticky;
    top: calc(var(--vz-nav-h) + var(--sp-3));
}

.pdp-thumbs {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
    max-height: 640px;
    overflow-y: auto;
    scrollbar-width: none;
}

.pdp-thumbs::-webkit-scrollbar {
    display: none;
}

.pdp-thumb {
    position: relative;
    aspect-ratio: 4 / 5;
    padding: 0;
    border: 0;
    background: var(--vz-ivory-dark);
    cursor: pointer;
    overflow: hidden;
    opacity: 0.7;
    transition: opacity var(--vz-dur-quick) var(--vz-ease-drape);
}

.pdp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pdp-thumb:hover {
    opacity: 1;
}

.pdp-thumb.active {
    opacity: 1;
}

/* gold-thread marker on the active thumb (left edge) */
.pdp-thumb.active::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--vz-thread);
    background: var(--vz-gold);
}

/* Stage: two layers; switching wipes the next image in like cloth drawn
   aside (drape clip-path, top→bottom) while the old frame settles away.
   The current layer keeps a transform transition — product-detail.js
   waits on its transitionend to commit the swap. */
.pdp-main-img {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--vz-ivory-dark);
    cursor: zoom-in;
}

.pdp-stage__layer {
    position: absolute;
    inset: 0;
}

.pdp-stage__layer img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Card image morphs into this hero via view transitions (see components.css) */
.pdp-stage__layer--current img {
    view-transition-name: vz-product-hero;
}

.pdp-stage__layer--current {
    transition: transform var(--vz-dur-settle) var(--vz-ease-drape);
}

.pdp-stage__layer--next {
    clip-path: inset(0 0 100% 0);
    transition: clip-path var(--vz-dur-settle) var(--vz-ease-drape);
}

.pdp-main-img.is-sliding .pdp-stage__layer--current {
    transform: scale(1.045);
}

.pdp-main-img.is-sliding .pdp-stage__layer--next {
    clip-path: inset(0 0 0% 0);
}

/* subtle zoom on hover (desktop) */
@media (hover: hover) {
    .pdp-main-img.is-zooming .pdp-stage__layer--current img {
        transform: scale(1.6);
    }

    .pdp-stage__layer--current img {
        transition: transform var(--vz-dur-settle) var(--vz-ease-drape);
        transform-origin: var(--zoom-x, 50%) var(--zoom-y, 50%);
    }
}

/* ═══════════════ Info / buy panel ═══════════════ */
.pdp-info {
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
}

.pdp-category {
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: var(--vz-tracking-label);
    color: var(--vz-gold-hover);
}

.pdp-title {
    margin: 0;
    font-size: var(--fs-2xl);
}

.pdp-price {
    display: flex;
    align-items: baseline;
    gap: var(--sp-3);
    flex-wrap: wrap;
}

.pdp-price-sale {
    font-size: var(--fs-xl);
    font-weight: var(--fw-medium);
    color: var(--vz-plum);
    font-variant-numeric: tabular-nums;
}

.pdp-price-original {
    color: var(--vz-ink-subtle);
    text-decoration: line-through;
}

.pdp-price-save {
    font-size: var(--fs-xs);
    font-weight: var(--fw-medium);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #fff;
    background: var(--vz-sale, #B73E3E);
    padding: 0.2rem 0.6rem;
    border-radius: var(--vz-pill);
}

.pdp-stock-warn {
    font-size: var(--fs-sm);
    color: var(--vz-sale, #B73E3E);
}

.pdp-section {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
}

.pdp-section__label {
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: var(--vz-tracking-label);
    color: var(--vz-ink-muted);
}

.pdp-section.has-error .pdp-section__label {
    color: var(--vz-sale, #B73E3E);
}

.pdp-size-hint {
    font-size: var(--fs-xs);
    color: var(--vz-sale, #B73E3E);
}

/* size pills */
.pdp-sizes {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
}

.pdp-size {
    min-width: 3rem;
    padding: 0.6rem 1rem;
    border: 1px solid var(--vz-line-strong);
    border-radius: var(--vz-pill);
    background: transparent;
    color: var(--vz-ink);
    font-size: var(--fs-sm);
    cursor: pointer;
    transition: border-color var(--vz-dur-quick) var(--vz-ease-drape),
        background var(--vz-dur-quick) var(--vz-ease-drape),
        color var(--vz-dur-quick) var(--vz-ease-drape);
}

.pdp-size:hover {
    border-color: var(--vz-plum);
}

.pdp-size.active {
    background: var(--vz-plum);
    border-color: var(--vz-plum);
    color: var(--vz-on-plum);
}

.pdp-sizes.shake {
    animation: vz-shake 0.4s var(--vz-ease-line);
}

@keyframes vz-shake {

    0%,
    100% {
        transform: translateX(0)
    }

    25% {
        transform: translateX(-5px)
    }

    75% {
        transform: translateX(5px)
    }
}

@media (prefers-reduced-motion: reduce) {
    .pdp-sizes.shake {
        animation: none;
    }
}

/* color swatches */
.pdp-colors {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
}

.pdp-color {
    width: 30px;
    height: 30px;
    border-radius: var(--vz-pill);
    border: 1px solid var(--vz-line-strong);
    cursor: pointer;
    box-shadow: inset 0 0 0 2px #fff;
    transition: box-shadow var(--vz-dur-quick) var(--vz-ease-drape);
}

.pdp-color.active {
    box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px var(--vz-gold);
}

/* qty stepper (sharp) */
.pdp-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--vz-line-strong);
    width: fit-content;
}

.pdp-qty button {
    width: 44px;
    height: 44px;
    background: none;
    border: 0;
    color: var(--vz-plum);
    font-size: var(--fs-lg);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.pdp-qty button:hover {
    background: var(--vz-ivory-dark);
}

.pdp-qty input {
    width: 48px;
    height: 44px;
    text-align: center;
    border: 0;
    border-inline: 1px solid var(--vz-line-strong);
    background: transparent;
    font-family: var(--font-body);
    font-size: var(--fs-base);
    color: var(--vz-ink);
}

/* actions */
.pdp-actions {
    display: flex;
    gap: var(--sp-3);
}

#vz-pdp-add {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.5rem;
    background: var(--vz-plum);
    color: var(--vz-on-plum);
    border: 0;
    border-radius: var(--vz-sharp);
    font-family: var(--font-body);
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: background var(--vz-dur-quick) var(--vz-ease-drape), transform var(--vz-dur-quick);
}

#vz-pdp-add:hover {
    background: var(--vz-plum-hover);
}

#vz-pdp-add:active {
    transform: translateY(1px);
}

.pdp-wishlist {
    width: 52px;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--vz-plum);
    border: 1px solid var(--vz-plum);
    border-radius: var(--vz-sharp);
    cursor: pointer;
    transition: background var(--vz-dur-quick) var(--vz-ease-drape), color var(--vz-dur-quick);
}

.pdp-wishlist:hover {
    background: var(--vz-plum);
    color: var(--vz-on-plum);
}

.pdp-wishlist.active {
    color: var(--vz-sale, #B73E3E);
    border-color: var(--vz-sale, #B73E3E);
}

.pdp-wishlist.is-animating {
    animation: vz-badge-bump 0.5s var(--vz-ease-drape);
}

/* BUY NOW — the page's money moment (gold) */
#vz-pdp-buy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--vz-gold);
    color: var(--vz-plum);
    border: 0;
    border-radius: var(--vz-sharp);
    font-family: var(--font-body);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: background var(--vz-dur-quick) var(--vz-ease-drape), transform var(--vz-dur-quick);
}

#vz-pdp-buy:hover {
    background: var(--vz-gold-hover);
}

#vz-pdp-buy:active {
    transform: translateY(1px);
}

/* trust strip */
.pdp-trust {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-3);
    border-block: 1px solid var(--vz-line);
    padding-block: var(--sp-4);
}

.pdp-trust-item {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    font-size: var(--fs-sm);
    color: var(--vz-ink);
}

/* 1px gold-thread line style — reassurance drawn like the brand device */
.pdp-trust-item svg {
    width: 20px;
    height: 20px;
    color: var(--vz-gold);
    stroke-width: 1.2;
    flex: none;
}

/* accordions */
.pdp-accordion {
    border-top: 1px solid var(--vz-line);
}

.pdp-accordion details {
    border-bottom: 1px solid var(--vz-line);
}

.pdp-accordion summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-4) 0;
    cursor: pointer;
    list-style: none;
    font-family: var(--font-heading);
    font-size: var(--fs-md);
    color: var(--vz-plum);
}

.pdp-accordion summary::-webkit-details-marker {
    display: none;
}

.pdp-accordion summary::after {
    content: "+";
    color: var(--vz-gold-hover);
    font-size: var(--fs-lg);
    transition: transform var(--vz-dur-quick);
}

.pdp-accordion details[open] summary::after {
    transform: rotate(45deg);
}

.pdp-accordion details>*:not(summary) {
    padding-bottom: var(--sp-4);
    color: var(--vz-ink-muted);
}

.pdp-accordion ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
}

/* ═══════════════ Related / recently viewed (rails) ═══════════════ */
.pdp-related,
.recently-viewed {
    margin-top: var(--sp-9);
}

.pdp-related h3,
.recently-viewed h4 {
    margin: 0 0 var(--sp-5);
    font-size: var(--fs-2xl);
}

#vz-pdp-related,
#vz-pdp-recent {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(230px, 25%);
    gap: var(--sp-4);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding-bottom: var(--sp-2);
}

#vz-pdp-related::-webkit-scrollbar,
#vz-pdp-recent::-webkit-scrollbar {
    display: none;
}

#vz-pdp-related>*,
#vz-pdp-recent>* {
    scroll-snap-align: start;
}

/* ═══════════════ Sticky mobile CTA ═══════════════ */
.pdp-sticky {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-fixed, 300);
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-3) var(--vz-gutter) calc(var(--sp-3) + env(safe-area-inset-bottom));
    background: rgba(251, 247, 242, 0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--vz-line);
}

/* When mobile bottom nav is also present, lift sticky bar above it */
body.has-mobile-nav .pdp-sticky {
    bottom: 62px;
}

.pdp-sticky__price {
    font-weight: var(--fw-semibold);
    font-variant-numeric: tabular-nums;
    color: var(--vz-plum);
}

#vz-pdp-sticky-add {
    margin-left: auto;
    padding: 0.85rem 1.4rem;
    background: var(--vz-gold);
    color: var(--vz-plum);
    border: 0;
    border-radius: var(--vz-sharp);
    font-family: var(--font-body);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
}

/* ═══════════════ Responsive ═══════════════ */
@media (max-width: 900px) {
    .pdp-grid {
        grid-template-columns: 1fr;
    }

    .pdp-gallery {
        position: static;
        grid-template-columns: 1fr;
    }

    /* thumbs become a horizontal strip under the main image */
    .pdp-thumbs {
        flex-direction: row;
        order: 2;
        max-height: none;
        overflow-x: auto;
    }

    .pdp-thumb {
        width: 64px;
        flex: none;
    }

    .pdp-thumb.active::after {
        inset: auto 0 0 0;
        width: auto;
        height: var(--vz-thread);
    }

    .pdp-main-img {
        order: 1;
        cursor: default;
    }

    /* mobile buy panel: keep buy-now in flow, plus fixed quick-add bar */
    .pdp-sticky {
        display: flex;
    }

    /* lift the WhatsApp bubble clear of the quick-add bar so the money
       action is never covered (doubled class beats chrome.css) */
    body.has-mobile-nav .wa-bubble.wa-bubble {
        bottom: 146px;
    }

    .pdp-related,
    .recently-viewed {
        margin-bottom: 76px;
    }

    #vz-pdp-related,
    #vz-pdp-recent {
        grid-auto-columns: minmax(180px, 62%);
    }
}

@media (max-width: 560px) {
    .pdp-trust {
        grid-template-columns: 1fr;
    }
}