/* ==========================================================================
   NUBIE — PRODUCT PAGE V2 (EXPERIMENT)
   Horizontal gallery + iOS "Liquid Glass" info panel.
   All selectors namespaced .pv2- to stay isolated from style.css.
   ========================================================================== */

.minimal-grey-theme.pv2-body,
.minimal-grey-theme.pv2-body .product-container.split-layout,
.minimal-grey-theme.pv2-body .product-details-container {
    background-color: #feffff;
}

.product-page .navbar.nav-dark-text {
    background-color: #feffff !important;
}

.product-loading-screen {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: #feffff;
    color: #1C1813;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    transition: opacity 260ms ease, visibility 260ms ease;
}

.product-loading-screen__indicator {
    width: 28px;
    height: 28px;
    border: 1px solid rgba(28, 24, 19, 0.18);
    border-top-color: #D9291C;
    border-radius: 50%;
    animation: product-loading-spin 700ms linear infinite;
}

.product-loading-screen.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

@keyframes product-loading-spin {
    to { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   1. STAGE — full-viewport horizontal gallery
   -------------------------------------------------------------------------- */
/* Pin track: a tall scroll container whose height is set by JS
   (= 100vh + horizontal pan distance). The stage sticks inside it, so
   scrolling through the track pans the gallery horizontally; once the track
   is exhausted the stage unpins and the page scrolls vertically as normal. */
.pv2-pin {
    position: relative;
}

.pv2-stage {
    position: sticky;
    top: 0;
    height: 99vh;
    min-height: 500px;
    overflow: hidden;
    background: #EDEAE4;
}

/* Gallery images: absolutely-positioned DIRECT children of the stage,
   moved by the JS carousel (transform). Direct <img> children take the
   LiquidGlass fast drawImage capture path, so the glass refracts them
   live while they slide. Two are visible at once on desktop. */
.pv2-stage {
    cursor: grab;
}

.pv2-stage.pv2-dragging {
    cursor: grabbing;
}

.pv2-gallery-img {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    object-fit: cover;
    will-change: transform;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

.pv2-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #8a8378;
}

/* --------------------------------------------------------------------------
   2. PRODUCT INFORMATION PANEL — floats right, over the gallery
   -------------------------------------------------------------------------- */
.pv2-glass {
    position: absolute;
    top: 50%;
    /* Center over the 2nd slide — slides are 2-up, each ~50% of the stage,
       so the right slide's midpoint sits at ~75% of the stage width. */
    left: 75%;
    transform: translate(-50%, -50%);
    width: min(400px, calc(100vw - 40px));
    z-index: 5;

    background: rgba(250, 248, 244, 0.82);
    -webkit-backdrop-filter: blur(18px) saturate(0.82);
    backdrop-filter: blur(18px) saturate(0.82);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 28px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.62),
        0 18px 42px rgba(28, 24, 19, 0.16);

    padding: 36px 34px 30px;
    color: #1C1813;
    text-shadow: none;
}

.pv2-glass__crumbs {
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #1C1813;
    margin-bottom: 22px;
}

.pv2-glass__crumbs a {
    color: inherit;
    text-decoration: none;
}

.pv2-glass__crumbs a:hover {
    color: #D9291C;
}

.pv2-glass__title {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 400;
    letter-spacing: 0.02em;
    margin: 0 0 6px;
    text-transform: uppercase;
}

.pv2-glass__type {
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #1C1813;
    margin-bottom: 24px;
}

.pv2-glass__price {
    font-size: 20px;
    font-weight: 300;
    margin-bottom: 28px;
}

/* Solid action button keeps the matte panel focused and legible. */
.pv2-glass .add-to-cart-btn {
    width: 100% !important;
    height: 50px;
    border-radius: 100px;
    background: #1C1813;
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 13px;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background-color 0.35s ease, border-color 0.35s ease, transform 0.35s ease;
}

.pv2-glass .add-to-cart-btn:hover {
    transform: translateY(-1px);
}

/* style.css ships two global !important hover rules on this same button
   (.btn-dark:hover → white bg + red text/border; .add-to-cart-btn:hover →
   transparent bg + red text/border — both equal specificity, .btn-dark:hover
   wins the source-order tie). An ID selector outranks both regardless of
   order, so this wins definitively: just the background flips to brand red,
   border and text stay exactly as they are by default. */
#add-to-cart-btn:hover {
    background-color: #D9291C !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
    color: #FFFFFF !important;
}

.pv2-glass__hint {
    margin-top: 20px;
    font-size: 9px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #1C1813;
    text-align: center;
}

/* --------------------------------------------------------------------------
   3. STAGE CONTROLS — matte arrow buttons
   -------------------------------------------------------------------------- */
.pv2-chip {
    background: rgba(28, 24, 19, 0.82);
    -webkit-backdrop-filter: blur(12px) saturate(0.8);
    backdrop-filter: blur(12px) saturate(0.8);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 20px rgba(28, 24, 19, 0.22);
    color: #FFFFFF;
    text-shadow: none;
}

.pv2-arrow {
    position: absolute;
    bottom: 28px;
    z-index: 5;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
}

.pv2-arrow-next {
    right: clamp(20px, 4vw, 64px);
}

.pv2-arrow-prev {
    right: calc(clamp(20px, 4vw, 64px) + 54px);
}

.pv2-arrow:hover {
    transform: translateY(-2px);
}

.pv2-arrow:active {
    transform: scale(0.94);
}

/* --------------------------------------------------------------------------
   4. DETAILS SECTION — moved below, aligned right
   -------------------------------------------------------------------------- */
.pv2-details {
    background: #fffefe;
    padding: clamp(80px, 10vw, 140px) clamp(20px, 5vw, 80px);
}

.pv2-details__inner {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    justify-content: flex-end;
}

.pv2-details__col {
    width: min(560px, 100%);
}

.pv2-details__label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 10px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #D9291C;
    margin-bottom: 36px;
}

.pv2-details__label::before {
    content: '';
    width: 32px;
    height: 1px;
    background: #D9291C;
}

/* Accordion overrides inside the right-aligned column */
.pv2-details .minimal-accordion .accordion-item {
    border-bottom: 1px solid #E3DFD9;
}

.pv2-details .minimal-accordion .accordion-item:first-child {
    border-top: 1px solid #E3DFD9;
}

.pv2-details .minimal-accordion .accordion-header {
    padding: 22px 0;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.pv2-details .minimal-accordion .accordion-item.active .accordion-content {
    padding-bottom: 12px !important;
}

.pv2-details .minimal-accordion .accordion-content p,
.pv2-details .minimal-accordion .notes-grid {
    font-size: 14px;
    line-height: 1.9;
    color: #000000;
    font-weight: 400;
}

.pv2-details .notes-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 0;
}

/* --------------------------------------------------------------------------
   MOBILE FALLBACK — exact original product page markup (.product-container
   .product-gallery / .product-details-sticky etc.), styled entirely by the
   existing rules already in style.css. Hidden on desktop; swapped in for
   the whole LiquidGlass experience below 768px.
   `!important` on the toggle because .minimal-grey-theme .product-container
   .split-layout (specificity 0,3,0 in style.css) sets display:flex and would
   otherwise override a plain .pv2-mobile-fallback rule and leak onto desktop.
   -------------------------------------------------------------------------- */
.pv2-pin,
.pv2-details {
    display: none !important;
}

.pv2-mobile-fallback {
    display: flex !important;
    flex-direction: row;
}

/* Missing from style.css: the wishlist icon sits inline with the title.
   The original markup uses the .sr-only pattern (icon + visually-hidden
   label), so the button is icon-only by design. */
.product-name-section {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.wishlist-icon-btn {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #E3DFD9;
    border-radius: 50%;
    background: transparent;
    color: #1C1813;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.3s ease, color 0.3s ease;
}

.wishlist-icon-btn:hover {
    border-color: #1C1813;
}

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

@media (max-width: 768px) {
    /* Swap the desktop LiquidGlass experience out entirely for the original
       page's mobile layout (product-v2.js skips its pin/carousel/WebGL setup
       and populates this block's fields instead — see isMobile() branches). */
    .pv2-pin,
    .pv2-details {
        display: none !important;
    }

    .pv2-mobile-fallback {
        display: flex !important;   /* .product-container.split-layout is flex */
        flex-direction: column;
    }

    /* The original mobile gallery is a contained ~5:6 portrait image, not a
       full-height crop. Our local Siren images are taller (3:2), and the
       horizontal flex row stretches every slide to the tallest one — filling
       the whole screen. Pin a fixed 5:6 aspect so slides match the old size
       and never stretch. */
    .pv2-mobile-fallback .product-gallery {
        align-items: flex-start;
    }

    .pv2-mobile-fallback .product-gallery img {
        aspect-ratio: 5 / 6;
        height: auto;
        min-height: 0;
        object-fit: cover;
    }

    /* The reference product page uses data-nav-type="standard" (solid white
       navbar, dark text/logo). This page must stay "home" on desktop for the
       LiquidGlass scroll-transform, so force the standard look on mobile only
       — mirrors style.css's .navbar.nav-dark-text rules. */
    .navbar {
        background-color: var(--color-white) !important;
        box-shadow: none !important;
    }

    .navbar,
    .navbar a,
    .navbar span,
    .navbar i,
    .navbar .nav-link {
        color: var(--color-dark) !important;
    }

    .navbar .icon-svg-minimal {
        stroke: var(--color-dark) !important;
    }

    .navbar .logo-image {
        filter: none !important;
    }

    /* .minimal-grey-theme .product-title (style.css, specificity 0,2,0) sets
       24px — match that specificity here to actually apply on mobile/tablet. */
    .minimal-grey-theme .product-title {
        font-size: 20px;
    }
}

/* --------------------------------------------------------------------------
   DEV TOOL — Live Liquid Glass tweak panel (experiment only, not brand UI)
   -------------------------------------------------------------------------- */
.pv2-dev-wrap {
    font-family: 'Manrope', sans-serif;
}

/* Mini floating button — collapsed state. Fixed bottom-left, always on top. */
.pv2-dev-tab {
    position: fixed;
    left: 20px;
    bottom: 30px;
    z-index: 10000;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #1C1813;
    color: #FFFFFF;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    transition: transform 0.25s ease, background 0.25s ease, rotate 0.3s ease;
}

.pv2-dev-tab:hover {
    background: #D9291C;
    transform: scale(1.08);
}

.pv2-dev-tab:active {
    transform: scale(0.94);
}

.pv2-dev-open .pv2-dev-tab {
    rotate: 90deg;
}

.pv2-dev-panel {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    width: 320px;
    max-width: calc(100vw - 60px);
    height: 100vh;
    background: rgba(28, 24, 19, 0.96);
    color: #FFFFFF;
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.35);
    transform: translateX(-100%);
    transition: transform 0.35s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    pointer-events: none;
    visibility: hidden;
}

.pv2-dev-open .pv2-dev-panel {
    transform: translateX(0);
    pointer-events: auto;
    visibility: visible;
}

.pv2-dev-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 16px;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    flex: 0 0 auto;
}

.pv2-dev-close {
    background: none;
    border: none;
    color: #FFFFFF;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}

.pv2-dev-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 16px;
}

.pv2-dev-row {
    margin-bottom: 16px;
}

.pv2-dev-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 11px;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.85);
}

.pv2-dev-value {
    font-variant-numeric: tabular-nums;
    color: #D9291C;
    font-weight: 600;
}

.pv2-dev-row input[type="range"] {
    width: 100%;
    accent-color: #D9291C;
}

.pv2-dev-row input[type="checkbox"] {
    accent-color: #D9291C;
    width: 18px;
    height: 18px;
}

.pv2-dev-row select {
    width: 100%;
    padding: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-size: 12px;
}

.pv2-dev-json-label {
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    margin: 20px 0 8px;
}

.pv2-dev-json {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 10px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    line-height: 1.5;
    resize: vertical;
}

.pv2-dev-copy,
.pv2-dev-reset {
    width: 100%;
    margin-top: 10px;
    padding: 12px;
    border: none;
    border-radius: 100px;
    font-size: 12px;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease;
}

.pv2-dev-copy {
    background: rgba(255, 255, 255, 0.12);
    color: #FFFFFF;
}

.pv2-dev-copy:hover {
    background: rgba(255, 255, 255, 0.22);
}

.pv2-dev-reset {
    background: #D9291C;
    color: #FFFFFF;
    margin-bottom: 24px;
}

.pv2-dev-reset:hover {
    transform: translateY(-1px);
    background: #b81f14;
}
