/* ═══════════════════════════════════════════════════════════════
   ARTISIER — Premium Configurator Stylesheet
   Luxury jewelry-grade UI · Mobile-first · Clean visual hierarchy
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Inter:wght@300;400;500;600&display=swap');

:root {
    --ink: #0d0d0d;
    --ch: #1a1a1a;
    --st: #6B6B6B;
    --sl: #8B8B8B;
    --gd: #C9A55C;
    --gm: #B8A068;
    --gl: #D4B97A;
    --wh: #fff;
    --cr: #F5F2ED;
    --wm: #FAF8F5;
    --er: #8B3A3A;
    --hd: 'Cormorant Garamond', serif;
    --bd: 'Inter', -apple-system, sans-serif;
    --ez: cubic-bezier(.33, 1, .68, 1);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, .06);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, .08);
    --radius: 8px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

/* ── Root Container ── */
#artisier-configurator-root {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-family: var(--bd);
    color: var(--ch);
    text-align: left;
    position: relative;
    background: var(--wm);
}

/* ── Header ── */
.ttl {
    font-family: var(--hd);
    font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.4rem);
    font-weight: 400;
    color: var(--ink);
    letter-spacing: -.01em;
    line-height: 1.1;
}

.sub {
    font-size: 0.8rem;
    color: var(--sl);
    font-weight: 300;
    max-width: 480px;
    line-height: 1.5;
    margin-top: 0.4rem;
}

/* ── App Layout — Desktop ── */
#artisier-configurator-root {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: 999999;
    background: #fdfcfb;
    /* Soft warm background for 3D stage */
    display: flex;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body.artisier-active {
    overflow: hidden !important;
    /* Prevent main page scroll when app is open */
}

.hdr {
    position: fixed;
    top: 0;
    left: 0;
    padding: 2.5rem 2.5rem;
    z-index: 10;
    pointer-events: none;
    /* Let clicks pass through to 3D */
}

.cfg {
    display: flex;
    width: 100%;
    height: 100%;
    flex-direction: row-reverse;
    /* Controls on right, stage on left */
}

.cfg-l {
    /* Controls Panel */
    flex: 0 0 420px;
    height: 100%;
    background: #ffffff;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.04);
    overflow-y: auto;
    padding: 2.5rem 2rem 6rem;
    /* extra bottom padding for scroll */
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.cfg-l::-webkit-scrollbar {
    width: 6px;
}

.cfg-l::-webkit-scrollbar-thumb {
    background: #e0e0e0;
    border-radius: 4px;
}

.cfg-r {
    /* 3D Stage */
    flex: 1;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Move CTA to flow naturally at the bottom of the controls panel */
.ab {
    width: 100%;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.ab .btn {
    flex: 1;
    /* Stretch buttons equally */
    width: 100%;
    margin: 0;
}

/* ── Desktop: hide mobile bar, show desktop bar ── */
.mobile-ab {
    display: none !important;
}

.desktop-ab {
    display: flex !important;
}

/* ── Mobile Layout ── */
@media (max-width: 900px) {
    #artisier-configurator-root {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100dvh;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        z-index: 99999;
        background: #fdfcfb;
    }

    body.artisier-active {
        overflow: hidden !important;
        position: fixed;
        width: 100%;
        height: 100%;
    }

    /* Header: compact bar, part of flex flow (not absolute) */
    .hdr {
        position: relative;
        width: 100%;
        flex-shrink: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        z-index: 50;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
        pointer-events: auto;
    }

    .hdr .ttl {
        font-size: 1.2rem;
        line-height: 1.2;
    }

    .hdr .sub {
        display: none;
    }

    /* Main flex container fills remaining height below header */
    .cfg {
        display: flex !important;
        flex-direction: column !important;
        flex: 1 1 0 !important;
        min-height: 0 !important;
        overflow: hidden !important;
        position: relative !important;
        /* needed for absolute .ab positioning */
    }

    /* 3D Stage: EXPLICITLY sized with fallbacks */
    .cfg-r {
        order: -1;
        position: relative;
        width: 100%;
        /* vh fallback for browsers without dvh support */
        height: 38vh;
        height: 38dvh;
        min-height: 200px;
        max-height: 45vh;
        flex: 0 0 auto;
        z-index: 5;
        overflow: hidden;
        background: #f4f1ec;
    }

    /* Ensure 3D panel fills .cfg-r completely */
    .cfg-r .pvs {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    /* Controls: bottom sheet that scrolls */
    .cfg-l {
        position: relative;
        flex: 1;
        min-height: 0;
        width: 100%;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.1);
        border-radius: 18px 18px 0 0;
        padding: 1.2rem 1rem 1rem;
        margin-top: -18px;
        background: #ffffff;
        z-index: 20;
    }

    /* On mobile: hide desktop-bar, show mobile-bar */
    .desktop-ab {
        display: none !important;
    }

    .mobile-ab {
        display: flex !important;
        flex: none;
        width: 100%;
        margin: 0;
        padding: 0.85rem 1rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
        background: rgba(255, 255, 255, 0.95);
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
        flex-direction: row;
        gap: 0.6rem;
        z-index: 100;
    }

    .mobile-ab .btn {
        flex: 1;
        width: 100%;
        margin: 0;
    }
}

/* ═══════════════════════════════
   SECTION LABELS
   ═══════════════════════════════ */
.lbl {
    font-size: .65rem;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--gd);
    text-align: left;
    margin-bottom: 0.8rem;
}

/* ═══════════════════════════════
   NAME INPUT
   ═══════════════════════════════ */
.inp-s {
    text-align: left;
    margin-bottom: 1.5rem;
}

.inp-l {
    font-size: .65rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--gd);
    margin-bottom: .5rem;
    display: block;
}

.inp {
    background: transparent;
    border: none;
    border-bottom: 1.5px solid var(--pl);
    color: var(--ink);
    font-family: var(--hd);
    font-size: clamp(1.3rem, 1rem + 1vw, 1.6rem);
    font-weight: 400;
    letter-spacing: .03em;
    padding: .5rem 0;
    width: 100%;
    outline: none;
    transition: border-color .3s var(--ez);
    border-radius: 0;
    -webkit-appearance: none;
}

.inp:focus {
    border-color: var(--gd);
}

/* ═══════════════════════════════
   FONT CARDS — Horizontal Native App Strip
   ═══════════════════════════════ */
.fg {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    overflow-x: auto;
    overflow-y: visible;
    /* Must be visible to avoid label clipping */
    padding: 0.5rem 0 0.8rem;
    /* top padding so labels aren't clipped */
    margin-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    min-height: 140px;
}

.fg::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome/Safari */
}

.fc {
    flex: 0 0 110px;
    background: #f7f7f8;
    border: 2px solid transparent;
    padding: 0.5rem 0.4rem 0.6rem;
    cursor: pointer;
    transition: all .2s var(--ez);
    position: relative;
    text-align: center;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    /* align from top so label doesn't overflow */
    gap: 0.35rem;
    min-height: 120px;
}

.fc:hover {
    border-color: var(--gm);
    box-shadow: var(--shadow-sm);
}

.fc.sel {
    border-color: var(--gd);
    box-shadow: 0 0 0 1px var(--gd), var(--shadow-sm);
    background: rgba(201, 165, 92, .03);
}

.fc.sel::after {
    content: '✓';
    position: absolute;
    top: .3rem;
    right: .3rem;
    width: 14px;
    height: 14px;
    background: var(--gd);
    color: #fff;
    border-radius: 50%;
    font-size: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fc-p {
    font-size: clamp(1rem, 0.9rem + 0.5vw, 1.2rem);
    line-height: 1.2;
    color: var(--ink);
    font-weight: 400;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 22px;
    white-space: nowrap;
    flex: 1;
}

.fc-p.ld {
    color: var(--pl);
    font-family: var(--hd);
    font-size: .75rem;
    font-style: italic;
}

/* Font card label — always at top */
.fc-l {
    font-size: .55rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--st);
    white-space: nowrap;
    flex-shrink: 0;
    padding-top: 0.1rem;
}

.fc-d {
    display: none;
}

.fc-m {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    width: 100%;
    margin-top: auto;
    padding-top: 0.4rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.fc-n {
    font-size: .5rem;
    color: var(--sl);
}

.fc-s {
    font-size: .48rem;
    color: var(--gm);
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.fc-s.er {
    color: var(--er);
}

/* ═══════════════════════════════
   RANGE SLIDERS — Premium styling
   ═══════════════════════════════ */
.slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: var(--pl);
    border-radius: 4px;
    outline: none;
    transition: background 0.2s;
    cursor: pointer;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--gd);
    border-radius: 50%;
    cursor: grab;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .15);
    transition: transform 0.15s var(--ez);
}

.slider::-webkit-slider-thumb:active {
    transform: scale(1.2);
    cursor: grabbing;
}

.slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--gd);
    border: none;
    border-radius: 50%;
    cursor: grab;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .15);
}

.slider-val {
    font-size: 0.6rem;
    color: var(--sl);
    margin-top: 0.3rem;
    font-weight: 400;
}

/* ═══════════════════════════════
   OPTIONS ROW (Material, Width, Finish, etc.)
   ═══════════════════════════════ */
.orow {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem;
    margin-top: 1.2rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--pl);
}

.og {
    text-align: left;
}

.cl {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: .5rem;
}

.ch {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--pl);
    background: #fdfdfd;
    border-radius: 30px;
    /* Pill shape */
    cursor: pointer;
    font-size: .65rem;
    font-weight: 500;
    color: var(--st);
    transition: all .2s var(--ez);
}

.ch:hover {
    border-color: var(--gm);
    background: rgba(201, 165, 92, .02);
}

.ch.on {
    border-color: var(--gd);
    color: var(--gd);
    background: rgba(201, 165, 92, .06);
    font-weight: 500;
}

/* Material color dots */
.sw {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, .08);
    flex-shrink: 0;
}

.sw-y {
    background: linear-gradient(135deg, #D4A639, #F5D87A);
}

.sw-r {
    background: linear-gradient(135deg, #C08070, #E8B0A0);
}

.sw-w {
    background: linear-gradient(135deg, #D0D0D0, #F0F0F0);
}

.sw-p {
    background: linear-gradient(135deg, #A0A0A0, #D8D8D8);
}

/* ═══════════════════════════════
   3D PREVIEW PANEL — Full Bleed Stage
   ═══════════════════════════════ */
.pvs {
    width: 100%;
    height: 100%;
    position: relative;
}

.pv-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #FDFDFD, #F1EFED);
    overflow: hidden;
}

.pv-wrap canvas {
    display: block;
    width: 100%;
    height: 100%;
    outline: none;
}

.pv-wrap .msg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--hd);
    font-size: 1rem;
    color: var(--sl);
    font-style: italic;
    pointer-events: none;
    z-index: 10;
    background: rgba(255, 255, 255, 0.85);
    padding: 0.8rem 1.8rem;
    border-radius: 30px;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.pv-hint {
    position: absolute;
    bottom: 12rem;
    /* Above the price box */
    left: 0;
    width: 100%;
    text-align: center;
    font-size: .65rem;
    color: var(--sl);
    letter-spacing: .04em;
    z-index: 5;
    pointer-events: none;
}

.dim-lbl {
    position: absolute;
    bottom: 10.8rem;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: .7rem;
    color: var(--gd);
    font-weight: 500;
    letter-spacing: .04em;
    z-index: 5;
    pointer-events: none;
}

@media (max-width: 900px) {
    .pv-hint {
        bottom: 2.5rem;
    }

    .dim-lbl {
        bottom: 1.4rem;
    }
}

/* ═══════════════════════════════
   ESTIMATED PRICE SUMMARY
   ═══════════════════════════════ */
.ps {
    background: #ffffff;
    border: 1px solid var(--pl);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
    border-radius: 16px;
    padding: 1.8rem 2rem;
    width: 100%;
    margin-top: 2rem;
}

.pa {
    font-family: 'Cormorant Garamond', serif !important;
    font-variant-numeric: lining-nums;
    font-size: clamp(2.4rem, 2rem + 1.5vw, 3rem);
    /* Even larger for impact */
    font-weight: 300;
    /* Delicate luxury weight */
    letter-spacing: -0.02em;
    /* Tighter spacing for huge serif numbers */
    color: var(--ink);
    margin-bottom: .2rem;
    line-height: 1;
    /* Tight line height */
}

.wi {
    font-size: .65rem;
    color: var(--st);
    margin-bottom: .4rem;
}

.pb {
    font-size: .65rem;
    color: var(--sl);
    line-height: 1.8;
}

.pb .ln {
    display: flex;
    justify-content: space-between;
    max-width: 280px;
    margin: 0 auto;
    padding: .1rem 0;
}

.pb .ln.tt {
    border-top: 1px solid var(--pl);
    margin-top: .25rem;
    padding-top: .25rem;
    font-weight: 600;
    color: var(--ink);
}

.pn {
    font-size: .55rem;
    color: var(--sl);
    font-style: italic;
    margin-top: .4rem;
}

/* ═══════════════════════════════
   BUTTONS — Add to Cart & WhatsApp
   ═══════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .85rem 2rem;
    font-family: var(--bd);
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    border-radius: var(--radius);
    transition: all .3s var(--ez);
}

.btn-p {
    background: var(--ink);
    color: var(--wh);
    box-shadow: var(--shadow-md);
}

.btn-p:hover {
    background: #000;
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}

.btn-s {
    background: transparent;
    color: var(--ch);
    border: 1px solid var(--ch);
}

.btn-s:hover {
    background: var(--ch);
    color: var(--wh);
}

.btn:disabled {
    opacity: .3;
    cursor: default;
    pointer-events: none;
}

/* ── WhatsApp Button (Classy) ── */
.btn-wa {
    background: transparent;
    color: var(--gd);
    text-decoration: none;
    gap: 0.4rem;
    border-radius: var(--radius);
    border: 1px solid var(--gm);
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    transition: all 0.3s ease;
}

.btn-wa svg {
    opacity: 0.7;
    transition: opacity 0.2s;
}

.btn-wa:hover svg {
    opacity: 1;
}

.btn-wa:hover {
    background: var(--gd);
    color: #fff;
    border-color: var(--gd);
}

/* ═══════════════════════════════
   CHAIN SECTION
   ═══════════════════════════════ */
.chain-section {
    margin-bottom: 0;
}

.chain-accordion-header {
    cursor: pointer;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--pl);
    user-select: none;
    transition: border-color 0.2s;
}

.chain-accordion-header:hover {
    border-color: var(--gm);
}

.chain-arrow {
    font-size: 0.55rem;
    color: var(--sl);
    margin-left: 0.3rem;
    display: inline-block;
    transition: transform 0.3s var(--ez);
    vertical-align: middle;
}

.chain-sel-label {
    font-size: 0.65rem;
    color: var(--st);
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
    display: inline-block;
}

/* ── Chain Cards ── */
.chain-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    max-height: 240px;
    overflow-y: auto;
    padding: 0.5rem 0.2rem 0.5rem 0;
    margin-top: 0.4rem;
}

.chain-grid::-webkit-scrollbar {
    width: 3px;
}

.chain-grid::-webkit-scrollbar-thumb {
    background: var(--pl);
    border-radius: 3px;
}

@media (max-width: 600px) {
    .chain-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.chain-card {
    background: var(--wh);
    border: 1px solid var(--pl);
    border-radius: var(--radius);
    padding: 0.4rem;
    cursor: pointer;
    transition: all 0.2s var(--ez);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.chain-card:hover {
    border-color: var(--gm);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.chain-card.on {
    border-color: var(--gd);
    box-shadow: 0 0 0 1px var(--gd);
    background: rgba(201, 165, 92, 0.03);
}

.chain-thumb {
    width: 100%;
    height: 40px;
    object-fit: contain;
    border-radius: 3px;
    margin-bottom: 0.25rem;
    cursor: zoom-in;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.chain-card:hover .chain-thumb,
.chain-card.on .chain-thumb {
    opacity: 1;
}

.chain-name {
    font-size: 0.52rem;
    line-height: 1.25;
    color: var(--sl);
    height: 2.2em;
    overflow: hidden;
    margin-bottom: 0.1rem;
}

.chain-price {
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--gd);
}

/* ═══════════════════════════════
   TIPS BOX — Collapsed by default
   ═══════════════════════════════ */
.tips-box {
    background: rgba(200, 160, 50, 0.04);
    border: 1px solid rgba(200, 160, 50, 0.12);
    padding: 0.6rem 0.8rem;
    margin-top: 1rem;
    border-radius: var(--radius);
    font-size: 0.65rem;
    color: var(--st);
    line-height: 1.5;
}

.tips-box strong {
    color: var(--gm);
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
}

.tips-box ul {
    margin: 0;
    padding-left: 1rem;
}

.tips-box li {
    margin-bottom: 0.2rem;
}

.tips-box b {
    font-weight: 500;
    color: var(--ch);
}

/* ═══════════════════════════════
   MODALS & LIGHTBOX
   ═══════════════════════════════ */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
    justify-content: center;
    align-items: center;
}

.modal-c {
    position: relative;
    background: var(--wh);
    padding: 1rem;
    max-width: 90%;
    max-height: 90%;
    border-radius: var(--radius);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
}

.modal-c img {
    max-width: 100%;
    max-height: 80vh;
    display: block;
}

.mcl {
    position: absolute;
    top: -14px;
    right: -14px;
    background: var(--wh);
    color: var(--ink);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-weight: bold;
    font-family: sans-serif;
    border: none;
}

.g-l {
    font-size: 0.6rem;
    color: var(--sl);
    text-decoration: underline;
    cursor: pointer;
    margin-left: auto;
    text-transform: none;
    letter-spacing: normal;
    transition: color 0.2s;
}

.g-l:hover {
    color: var(--gd);
}

.hdr-flex {
    display: flex;
    align-items: center;
    margin-bottom: 0.6rem;
    justify-content: flex-start;
}

.hdr-flex .lbl {
    margin-bottom: 0;
}

/* ── Chain Image Lightbox ── */
.chain-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chain-lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
}

.chain-lightbox-content {
    position: relative;
    background: var(--wh);
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    max-width: 380px;
    max-height: 80vh;
}

.chain-lightbox-content img {
    max-width: 100%;
    max-height: 70vh;
    display: block;
    border-radius: 6px;
}

.chain-lightbox-close {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--wh);
    color: var(--ink);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    font-weight: bold;
    border: none;
    line-height: 1;
}

/* ═══════════════════════════════
   MOBILE — CTA buttons & price section
   ═══════════════════════════════ */
@media (max-width: 900px) {

    /* .ab is now outside .cfg-l, anchored to .cfg (position:relative) */
    .ab {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.97);
        padding: 0.85rem 1rem;
        border-top: 1px solid rgba(0, 0, 0, 0.06);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, .08);
        z-index: 200;
        margin: 0;
        width: 100%;
        gap: 0.5rem;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    .btn {
        flex: 1;
        padding: .75rem 1rem;
        font-size: .62rem;
    }

    .btn-wa {
        flex: 0 0 auto;
        padding: .75rem;
    }

    .btn-wa svg {
        width: 18px;
        height: 18px;
    }

    /* Adjust preview ratio for mobile */
    .pv-wrap {
        aspect-ratio: 16/10;
    }

    /* Tighter spacing */
    .orow {
        margin-top: 0.8rem;
        padding-top: 0.8rem;
    }

    /* Full width price section on mobile */
    .ps {
        border-radius: var(--radius);
        margin-top: 1rem;
        padding: 1.2rem;
    }
}

@media (max-width: 480px) {
    .pv-wrap {
        aspect-ratio: 1/1;
    }

    /* Square preview on small phones */
    .ch {
        padding: .4rem .55rem;
        font-size: .58rem;
    }

    .fc {
        padding: 0.5rem 0.6rem;
        gap: 0.5rem;
    }

    .fc-p {
        font-size: 1rem;
    }

    .tips-box {
        font-size: 0.6rem;
    }

    .sub {
        font-size: 0.72rem;
    }
}

/* ═══════════════════════════════
   MICRO-ANIMATIONS
   ═══════════════════════════════ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fc {
    animation: fadeIn 0.3s var(--ez) both;
}

.fc:nth-child(1) {
    animation-delay: 0s;
}

.fc:nth-child(2) {
    animation-delay: 0.05s;
}

.fc:nth-child(3) {
    animation-delay: 0.1s;
}

.fc:nth-child(4) {
    animation-delay: 0.15s;
}

.fc:nth-child(5) {
    animation-delay: 0.2s;
}

.fc:nth-child(6) {
    animation-delay: 0.25s;
}

/* Smooth gold shimmer on preview border */
.pv-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(201, 165, 92, 0.15), transparent 50%, rgba(201, 165, 92, 0.08)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: 1;
    pointer-events: none;
}