/* Reserve / configurator page. Chips, buttons and tokens come from site.css. */

.buy {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 5vw;
    max-width: 1240px;
    margin: 0 auto;
    padding: 110px 5vw 120px;
    align-items: start;
}

/* ---------- The watch ---------- */
.buy-visual { position: sticky; top: 90px; }

.buy-visual-inner { position: relative; aspect-ratio: 3 / 4; max-height: calc(100vh - 150px); margin: 0 auto; }

.buy-visual-inner::before {
    content: "";
    position: absolute;
    inset: 12% 8% 20%;
    background: radial-gradient(closest-side, var(--accent-glow), transparent);
    filter: blur(24px);
}

.cfg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.55s ease;
    filter: drop-shadow(0 34px 50px rgba(0, 0, 0, 0.75));
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 88%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 88%, transparent 100%);
}

.cfg-img.on { opacity: 1; }
.buy-visual-note { text-align: center; color: #6e6e73; font-size: 0.75rem; margin-top: 8px; }

/* ---------- The options ---------- */
.buy-panel h1 { font-size: clamp(2.4rem, 4.6vw, 3.6rem); letter-spacing: -0.035em; line-height: 1.02; }
.buy-lede { color: #b9b9be; font-size: 1.05rem; line-height: 1.55; margin-top: 16px; max-width: 44ch; }

.step { border: 0; margin-top: 42px; padding-top: 30px; border-top: 1px solid var(--line); }
.step legend { display: flex; align-items: center; gap: 12px; font-size: 1.15rem; font-weight: 600; margin-bottom: 18px; float: left; width: 100%; }
.step legend + * { clear: both; }

.step-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid var(--gold);
    color: var(--gold);
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.movement-cards { display: grid; gap: 12px; }
.movement input { position: absolute; opacity: 0; pointer-events: none; }

.movement-body {
    display: block;
    padding: 20px 22px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: border-color 0.25s, background 0.25s;
}

.movement input:checked + .movement-body { border-color: var(--gold); background: rgba(197, 160, 89, 0.1); }
.movement input:focus-visible + .movement-body { outline: 2px solid #fff; outline-offset: 2px; }
.movement-top { display: flex; justify-content: space-between; font-size: 1.05rem; }
.movement-price { font-weight: 700; }
.movement-name { display: block; color: var(--muted); font-size: 0.85rem; margin-top: 2px; }
.movement-stats { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; color: #a1a1a6; font-size: 0.85rem; }
.movement-stats b { color: #fff; font-weight: 600; }
.compare { display: inline-block; margin-top: 14px; color: var(--gold); font-size: 0.9rem; text-decoration: none; }
.compare:hover { text-decoration: underline; }

/* ---------- Summary ---------- */
.summary {
    margin-top: 42px;
    padding: 28px;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
}

.summary-name { font-size: 1.1rem; font-weight: 600; }
.summary-lines { margin: 18px 0 24px; }
.summary-lines div { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); color: #c7c7cc; }
.summary-lines dd { color: #fff; }
.summary-lines .due { font-size: 1.2rem; font-weight: 700; color: #fff; border-bottom: 0; }

.add-btn { width: 100%; background: var(--gold); color: #000; }
.add-btn:disabled { opacity: 0.5; cursor: default; transform: none; }
.buy-status { min-height: 1.3em; margin-top: 12px; font-size: 0.9rem; color: #c7c7cc; text-align: center; }
.buy-status.error { color: #ff8a80; }
.fine-print { margin-top: 10px; font-size: 0.8rem; color: var(--muted); line-height: 1.5; }
.fine-print a { color: var(--gold); }

/* ---------- Phones ---------- */
.buy-bar { display: none; }

@media (max-width: 900px) {
    .buy { grid-template-columns: 1fr; padding-top: 80px; gap: 10px; }
    .buy-visual { position: relative; top: 0; }
    .buy-visual-inner { width: min(78vw, 46vh); }

    .buy-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 900;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
        background: rgba(10, 10, 12, 0.85);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        border-top: 1px solid var(--line);
        transform: translateY(110%);
        transition: transform 0.3s ease;
    }

    .buy-bar.show { transform: none; }
    .buy-bar-label { display: block; font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; }
    .buy-bar strong { font-size: 1.2rem; }
    .buy-bar .btn { background: var(--gold); padding: 12px 22px; font-size: 0.95rem; }
    body { padding-bottom: 70px; }
}
