/* ==========================================================================
   Gaddum storefront — page-level blocks

   Everything here is specific to one screen. Shared primitives live in
   app.css; if a rule below starts being needed on a second page, it belongs
   there instead.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Home — hero
   -------------------------------------------------------------------------- */
.hero {
    position: relative;
    min-height: min(78vh, 640px);
    display: flex; align-items: flex-end;
    border-radius: 6px; overflow: hidden;
    margin-bottom: var(--s-7);
    background: linear-gradient(130deg, #171412 0%, #241d15 40%, #10233a 100%);
    background-size: 200% 200%;
    animation: hero-drift 16s ease-in-out infinite alternate;
}
@keyframes hero-drift {
    from { background-position: 0% 0%; }
    to { background-position: 100% 100%; }
}
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(
        to top, rgba(12,10,9,0.92) 0%, rgba(12,10,9,0.35) 45%, rgba(12,10,9,0.15) 100%
    );
}
.hero-content {
    position: relative; z-index: 1;
    padding: var(--s-7) clamp(1.5rem, 5vw, 4rem);
    max-width: 720px;
}
.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 6vw, 4.2rem);
    font-weight: 500; line-height: 1.12; letter-spacing: 0.01em;
    margin: var(--s-3) 0 var(--s-4);
}
.hero p { color: #D6D3D1; font-size: 1.05rem; max-width: 480px; }
.hero-actions {
    display: flex; gap: var(--s-3); margin-top: var(--s-6); flex-wrap: wrap;
}
@media (max-width: 620px) {
    .hero-actions .btn { width: 100%; }
}

/* Home — collection cards */
.col-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--s-5);
}
.col-card {
    position: relative; display: block; aspect-ratio: 16 / 10;
    border-radius: var(--radius); overflow: hidden;
    border: 1px solid var(--border); background: var(--surface-2);
    transition: border-color var(--base) var(--ease), transform var(--base) var(--ease),
                box-shadow var(--base) var(--ease);
}
.col-card:hover {
    border-color: var(--border-strong); transform: translateY(-4px);
    box-shadow: var(--shadow-2);
}
.col-card img {
    width: 100%; height: 100%; object-fit: cover; opacity: 0.78;
    transition: transform var(--slow) var(--ease), opacity var(--base) var(--ease);
}
.col-card:hover img { transform: scale(1.06); opacity: 0.9; }
.col-card .no-img {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, #2a2118 0%, #171412 100%);
}
.col-overlay {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: var(--s-5);
    background: linear-gradient(to top, rgba(12,10,9,0.9), transparent 62%);
}
.col-overlay h3 {
    font-family: var(--font-display); font-size: 1.45rem;
    font-weight: 500; letter-spacing: 0.02em;
}
.col-overlay .count { font-size: 0.85rem; color: var(--muted); margin-top: 2px; }

.home-section { margin-top: var(--s-8); }

/* --------------------------------------------------------------------------
   Catalog — toolbar & filters
   -------------------------------------------------------------------------- */
.toolbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: var(--s-4); flex-wrap: wrap;
    padding-bottom: var(--s-4); margin-bottom: var(--s-5);
    border-bottom: 1px solid var(--border);
}
.filters { display: flex; flex-wrap: wrap; gap: 0.55rem; align-items: center; }
.filter-group { display: flex; align-items: center; gap: 0.55rem; flex-wrap: wrap; }
.filter-label {
    font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em;
    color: var(--muted-2); font-weight: 600; margin-right: var(--s-1);
}
.chip-sm { padding: 0.3rem 0.75rem; min-height: 32px; font-size: 0.82rem; }

.sort-select {
    background: var(--surface); color: var(--text);
    border: 1px solid var(--border); border-radius: var(--radius-pill);
    padding: 0.45rem 2rem 0.45rem 1rem; min-height: 38px;
    font-size: 0.88rem; font-weight: 500; cursor: pointer; outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A8A29E' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 14px;
}
.sort-select:focus { border-color: var(--accent); }

.result-count { color: var(--muted); font-size: 0.9rem; }

.active-filters { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: var(--s-5); }
.filter-tag {
    display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.3rem 0.8rem; border-radius: var(--radius-pill);
    background: var(--accent-soft); border: 1px solid var(--accent-line);
    color: var(--accent); font-size: 0.82rem; font-weight: 600;
}
.filter-tag svg { width: 12px; height: 12px; }

/* Pagination */
.pagination {
    display: flex; align-items: center; justify-content: center;
    gap: var(--s-2); margin-top: var(--s-7); flex-wrap: wrap;
}
.pagination a, .pagination span {
    display: grid; place-items: center;
    min-width: 42px; min-height: 42px; padding: 0 var(--s-3);
    border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--surface); color: var(--muted);
    font-size: 0.9rem; font-weight: 600;
    transition: color var(--base) var(--ease), border-color var(--base) var(--ease);
}
.pagination a:hover { color: var(--text); border-color: var(--border-strong); }
.pagination .current {
    background: var(--accent); color: var(--on-accent); border-color: var(--accent);
}
.pagination .gap { border: none; background: none; }

/* --------------------------------------------------------------------------
   Product detail
   -------------------------------------------------------------------------- */
.detail {
    display: grid; grid-template-columns: 1.1fr 1fr;
    gap: var(--s-7); align-items: start;
}
@media (max-width: 860px) { .detail { grid-template-columns: 1fr; gap: var(--s-5); } }

.gallery { display: flex; flex-direction: column; gap: 0.85rem; }
.detail-image {
    position: relative;
    aspect-ratio: 1 / 1; background: var(--surface-2);
    border: 1px solid var(--border); border-radius: var(--radius);
    display: grid; place-items: center; overflow: hidden;
}
.detail-image img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform var(--slow) var(--ease);
    transform-origin: center center;
}
/* Zoom follows the pointer: the JS sets --zx/--zy from the cursor position,
   so the point under the cursor is the point that magnifies. */
.detail-image.can-zoom { cursor: zoom-in; }
.detail-image.is-zoomed img {
    transform: scale(2);
    transform-origin: var(--zx, 50%) var(--zy, 50%);
    transition: transform var(--fast) linear;
}
.detail-image .ph-icon { width: 64px; height: 64px; }
.zoom-hint {
    position: absolute; bottom: var(--s-3); right: var(--s-3);
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.35rem 0.75rem; border-radius: var(--radius-pill);
    background: rgba(12,10,9,0.72); backdrop-filter: blur(8px);
    border: 1px solid var(--border-strong);
    color: var(--muted); font-size: 0.75rem; font-weight: 600;
    pointer-events: none; transition: opacity var(--base) var(--ease);
}
.detail-image.is-zoomed .zoom-hint { opacity: 0; }

.thumbs { display: flex; flex-wrap: wrap; gap: 0.65rem; }
.thumb-btn {
    width: 72px; height: 72px; padding: 0;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
    transition: border-color var(--base) var(--ease), transform var(--fast) var(--ease);
}
.thumb-btn:hover { border-color: var(--border-strong); }
.thumb-btn.active { border-color: var(--accent); }
.thumb-btn:active { transform: scale(0.96); }
.thumb-btn img { width: 100%; height: 100%; object-fit: cover; }

.detail-info { padding-top: var(--s-1); }
.detail-info h1 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 500; line-height: 1.15;
    margin: var(--s-2) 0 var(--s-3);
}
.detail-price {
    font-size: 1.55rem; font-weight: 600; color: var(--accent);
    font-variant-numeric: tabular-nums;
}
.detail-meta {
    display: flex; align-items: center; gap: var(--s-4);
    flex-wrap: wrap; margin-bottom: var(--s-5);
}
.desc {
    color: var(--muted); line-height: 1.75; margin-bottom: var(--s-5);
    white-space: pre-line; max-width: 52ch;
}
.detail-points {
    list-style: none; display: grid; gap: 0.55rem;
    margin: 0 0 var(--s-5); padding: 0;
    color: var(--muted); font-size: 0.92rem; max-width: 52ch;
}
.detail-points li { display: flex; gap: 0.65rem; align-items: flex-start; }
.detail-points li::before {
    content: ''; flex-shrink: 0; width: 5px; height: 5px; margin-top: 0.6em;
    border-radius: 50%; background: var(--accent);
}

.buy-form { display: grid; gap: var(--s-5); }
.buy-actions { display: flex; align-items: stretch; gap: var(--s-3); flex-wrap: wrap; }
.buy-actions .btn { flex: 1; min-width: 180px; }
.buy-actions .wish-inline {
    display: inline-grid; place-items: center;
    width: 48px; min-height: 44px;
    background: transparent; color: var(--text);
    border: 1px solid var(--border-strong); border-radius: 2px;
    transition: color var(--base) var(--ease), border-color var(--base) var(--ease);
    flex: 0 0 auto;
}
.buy-actions .wish-inline:hover { color: var(--accent); border-color: var(--accent); }
.buy-actions .wish-inline.is-saved { color: var(--accent); border-color: var(--accent); }
.buy-actions .wish-inline.is-saved svg { fill: currentColor; }
.buy-actions .wish-inline svg { width: 18px; height: 18px; }

.unavailable-note {
    padding: var(--s-4); border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--border);
    color: var(--muted); font-size: 0.92rem;
}
.unavailable-note strong { color: var(--text); display: block; margin-bottom: var(--s-1); }

.detail-assurances {
    display: grid; gap: var(--s-3); margin-top: var(--s-6);
    padding-top: var(--s-5); border-top: 1px solid var(--border);
}
.assurance {
    display: flex; align-items: flex-start; gap: var(--s-3);
    color: var(--muted); font-size: 0.88rem;
}
.assurance svg { width: 17px; height: 17px; color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.assurance strong { color: var(--text); font-weight: 600; }

.related { margin-top: var(--s-8); }
.related h2 {
    font-family: var(--font-display); font-size: 1.5rem;
    font-weight: 500; margin-bottom: var(--s-4);
}

/* --------------------------------------------------------------------------
   Cart
   -------------------------------------------------------------------------- */
.cart-layout {
    display: grid; grid-template-columns: 1.5fr 1fr;
    gap: var(--s-6); align-items: start;
}
@media (max-width: 900px) { .cart-layout { grid-template-columns: 1fr; } }

.cart-lines {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden;
}
.cart-line {
    display: grid;
    grid-template-columns: 88px 1fr auto auto;
    gap: var(--s-4); align-items: center;
    padding: var(--s-4); border-bottom: 1px solid var(--border);
}
.cart-line:last-child { border-bottom: none; }
.cart-line.is-removing { opacity: 0.4; pointer-events: none; }

.line-thumb {
    width: 88px; height: 88px; border-radius: var(--radius);
    background: var(--surface-2); border: 1px solid var(--border);
    overflow: hidden; display: grid; place-items: center;
}
.line-thumb img { width: 100%; height: 100%; object-fit: cover; }
.line-thumb .ph-icon { width: 24px; height: 24px; }

.line-info { min-width: 0; }
.line-name { font-weight: 500; transition: color var(--base) var(--ease); display: block; }
.line-name:hover { color: var(--accent); }
.line-attrs {
    display: flex; align-items: center; gap: var(--s-3);
    margin-top: var(--s-1); flex-wrap: wrap;
    color: var(--muted); font-size: 0.85rem;
}
.size-tag {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.15rem 0.55rem; border-radius: var(--radius);
    background: var(--surface-2); border: 1px solid var(--border-strong);
    color: var(--text); font-size: 0.78rem; font-weight: 600;
    letter-spacing: 0.06em;
}
.line-unit { color: var(--muted); font-size: 0.85rem; }
.stock-warning { color: var(--accent); font-size: 0.8rem; font-weight: 600; }

.line-sub { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; min-width: 84px; }
.line-remove {
    background: none; border: none; color: var(--muted-2);
    display: grid; place-items: center; width: 36px; height: 36px;
    border-radius: var(--radius);
    transition: color var(--base) var(--ease), background var(--base) var(--ease);
}
.line-remove:hover { color: var(--danger); background: var(--danger-soft); }
.line-remove svg { width: 16px; height: 16px; }

@media (max-width: 620px) {
    .cart-line {
        grid-template-columns: 72px 1fr auto;
        grid-template-areas:
            'thumb info remove'
            'thumb qty  sub';
        row-gap: var(--s-3);
    }
    .line-thumb { grid-area: thumb; width: 72px; height: 72px; }
    .line-info { grid-area: info; }
    .cart-line .qty-stepper { grid-area: qty; justify-self: start; }
    .line-sub { grid-area: sub; align-self: center; }
    .line-remove { grid-area: remove; align-self: start; }
}

.cart-actions {
    display: flex; justify-content: space-between; align-items: center;
    gap: var(--s-4); margin-top: var(--s-4); flex-wrap: wrap;
}
.continue-link {
    display: inline-flex; align-items: center; gap: var(--s-2);
    color: var(--muted); font-size: 0.9rem; font-weight: 500;
    transition: color var(--base) var(--ease);
}
.continue-link:hover { color: var(--accent); }
.continue-link svg { width: 15px; height: 15px; }

.signin-note {
    color: var(--muted); font-size: 0.82rem; text-align: center;
    margin-top: var(--s-3);
}

/* --------------------------------------------------------------------------
   Checkout
   -------------------------------------------------------------------------- */
.checkout-items {
    display: grid; gap: var(--s-3);
    padding-bottom: var(--s-4); margin-bottom: var(--s-2);
    border-bottom: 1px solid var(--border);
    max-height: 340px; overflow-y: auto;
}
.checkout-item { display: flex; align-items: center; gap: var(--s-3); }
.checkout-item .line-thumb { width: 52px; height: 52px; flex-shrink: 0; }
.checkout-item .line-thumb .ph-icon { width: 18px; height: 18px; }
.checkout-item-info { min-width: 0; flex: 1; }
.checkout-item-name { font-size: 0.9rem; font-weight: 500; }
.checkout-item-meta { font-size: 0.8rem; color: var(--muted); margin-top: 2px; }
.checkout-item-sub {
    font-size: 0.9rem; font-weight: 600; font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.step-heading {
    display: flex; align-items: center; gap: var(--s-3);
    font-family: var(--font-display); font-size: 1.2rem; font-weight: 500;
    margin-bottom: 1.4rem;
}
.step-num {
    display: grid; place-items: center;
    width: 28px; height: 28px; flex-shrink: 0;
    border-radius: 50%; background: var(--accent-soft);
    border: 1px solid var(--accent-line); color: var(--accent);
    font-family: var(--font-body); font-size: 0.82rem; font-weight: 700;
}

/* --------------------------------------------------------------------------
   Account, orders & order confirmation
   -------------------------------------------------------------------------- */
.account-nav { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: var(--s-6); }

.stat-row {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--s-4); margin-bottom: var(--s-6);
}
.stat {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: var(--s-5);
}
.stat .stat-label {
    font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.14em;
    color: var(--muted-2); font-weight: 600;
}
.stat .stat-value {
    font-family: var(--font-display); font-size: 1.9rem;
    font-weight: 500; margin-top: var(--s-2); font-variant-numeric: tabular-nums;
}

.order-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden;
}
.order-card + .order-card { margin-top: var(--s-4); }
.order-head {
    display: flex; align-items: center; gap: 0.75rem 1.25rem; flex-wrap: wrap;
    padding: var(--s-4) var(--s-5); background: var(--surface-2);
    border-bottom: 1px solid var(--border);
}
.order-id { font-weight: 600; }
.order-date { color: var(--muted); font-size: 0.85rem; }
.order-total {
    margin-left: auto; font-weight: 600; color: var(--accent);
    font-variant-numeric: tabular-nums;
}
.order-line {
    display: flex; align-items: center; gap: var(--s-4);
    padding: 0.85rem var(--s-5); border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}
.order-line:last-child { border-bottom: none; }
.order-thumb {
    width: 48px; height: 48px; border-radius: var(--radius);
    background: var(--surface-2); border: 1px solid var(--border);
    overflow: hidden; display: grid; place-items: center; flex-shrink: 0;
}
.order-thumb img { width: 100%; height: 100%; object-fit: cover; }
.order-thumb .ph-icon { width: 18px; height: 18px; }
.order-line-name { font-weight: 500; transition: color var(--base) var(--ease); }
a.order-line-name:hover { color: var(--accent); }
.order-line-qty { color: var(--muted); font-size: 0.88rem; }
.order-line-sub { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.order-ship {
    padding: 0.75rem var(--s-5); color: var(--muted); font-size: 0.85rem;
    border-bottom: 1px solid var(--border);
}
.order-ship svg {
    width: 14px; height: 14px; vertical-align: -2px;
    margin-right: 0.35rem; color: var(--accent);
}
.order-ship strong { color: var(--text); font-weight: 600; }
.order-money { padding: var(--s-4) var(--s-5); background: var(--surface-2); }

/* --------------------------------------------------------------------------
   Order tracking
   -------------------------------------------------------------------------- */
.track-layout {
    display: grid; grid-template-columns: 1fr 1.15fr;
    gap: var(--s-6); align-items: start;
}
@media (max-width: 900px) { .track-layout { grid-template-columns: 1fr; } }

/* Vertical progress track. The connecting line is drawn on each step rather
   than behind the list, so it can be coloured per-segment. */
.track { list-style: none; margin: 0; padding: 0; }
.track-step {
    position: relative;
    display: grid; grid-template-columns: 28px 1fr; gap: var(--s-4);
    padding-bottom: var(--s-5);
}
.track-step:last-child { padding-bottom: 0; }
.track-step::before {
    content: ''; position: absolute;
    left: 13px; top: 26px; bottom: 0; width: 2px;
    background: var(--border);
}
.track-step:last-child::before { display: none; }
.track-step.is-done::before { background: var(--accent); }

.track-marker {
    width: 28px; height: 28px; border-radius: 50%;
    border: 2px solid var(--border); background: var(--surface);
    display: grid; place-items: center; color: var(--on-accent);
    z-index: 1; transition: background var(--base) var(--ease),
                            border-color var(--base) var(--ease);
}
.track-marker svg { width: 14px; height: 14px; }
.track-step.is-done .track-marker { background: var(--accent); border-color: var(--accent); }
.track-step.is-current .track-marker {
    background: var(--accent); border-color: var(--accent);
    box-shadow: 0 0 0 5px var(--accent-soft);
}
/* A gentle pulse on the step the order is actually at. */
.track-step.is-current .track-marker::after {
    content: ''; width: 8px; height: 8px; border-radius: 50%;
    background: var(--on-accent);
    animation: track-pulse 2s ease-in-out infinite;
}
@keyframes track-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .45; transform: scale(.75); }
}

.track-body { padding-top: 2px; }
.track-label {
    font-weight: 600; display: flex; align-items: center;
    gap: var(--s-3); flex-wrap: wrap;
}
.track-step:not(.is-done) .track-label { color: var(--muted-2); }
.track-now {
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em;
    text-transform: uppercase; padding: 0.1rem 0.5rem;
    border-radius: var(--radius-pill);
    background: var(--accent-soft); border: 1px solid var(--accent-line);
    color: var(--accent);
}
.track-blurb { color: var(--muted); font-size: 0.9rem; margin-top: 2px; }
.track-step:not(.is-done) .track-blurb { color: var(--muted-2); }
.track-time {
    display: block; margin-top: var(--s-1);
    font-size: 0.8rem; color: var(--muted-2); font-variant-numeric: tabular-nums;
}

.track-cancelled {
    padding: var(--s-4); border-radius: var(--radius);
    background: var(--danger-soft); border: 1px solid var(--danger-line);
    color: var(--danger); font-size: 0.92rem;
}
.track-cancelled strong { color: var(--text); font-weight: 600; }

.track-details {
    margin-top: var(--s-5); padding: var(--s-4);
    background: var(--bg); border: 1px solid var(--border);
    border-radius: var(--radius);
    display: grid; gap: var(--s-3);
}
.track-detail-row {
    display: flex; justify-content: space-between; align-items: baseline;
    gap: var(--s-4); font-size: 0.9rem; color: var(--muted);
}
.track-detail-row strong { color: var(--text); overflow-wrap: anywhere; text-align: right; }

.history { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.history-row {
    display: grid; grid-template-columns: 110px 1fr; gap: var(--s-4);
    padding-bottom: var(--s-3); border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}
.history-row:last-child { border-bottom: none; padding-bottom: 0; }
.history-row time { color: var(--muted-2); font-variant-numeric: tabular-nums; }
.history-note { color: var(--muted); margin-top: 2px; }
@media (max-width: 520px) {
    .history-row { grid-template-columns: 1fr; gap: var(--s-1); }
}

/* Order confirmation */
.confirm-hero { text-align: center; padding: var(--s-6) 0 var(--s-7); }
.confirm-mark {
    width: 72px; height: 72px; margin: 0 auto var(--s-5);
    display: grid; place-items: center; border-radius: 50%;
    background: var(--success-soft); border: 1px solid var(--success-line);
    color: var(--success);
    animation: pop var(--slow) var(--ease) both;
}
.confirm-mark svg { width: 32px; height: 32px; }
.confirm-hero h1 {
    font-family: var(--font-display); font-size: clamp(1.8rem, 5vw, 2.4rem);
    font-weight: 500; margin-bottom: var(--s-3);
}
.confirm-hero p { color: var(--muted); max-width: 46ch; margin: 0 auto; }
.confirm-actions {
    display: flex; gap: var(--s-3); justify-content: center;
    margin-top: var(--s-6); flex-wrap: wrap;
}
@keyframes pop {
    from { opacity: 0; transform: scale(0.6); }
    60% { transform: scale(1.06); }
    to { opacity: 1; transform: scale(1); }
}

/* --------------------------------------------------------------------------
   Auth panels
   -------------------------------------------------------------------------- */
.auth-wrap { max-width: 420px; margin: var(--s-5) auto 0; }
.auth-panel {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: var(--s-6);
}
.auth-head { text-align: center; margin-bottom: var(--s-6); }
.auth-head h1 {
    font-family: var(--font-display); font-size: 1.85rem;
    font-weight: 500; margin-top: var(--s-2);
}
.auth-btn { width: 100%; margin-top: var(--s-2); }
.auth-alt { text-align: center; color: var(--muted); font-size: 0.9rem; margin-top: var(--s-5); }
.auth-alt a { color: var(--accent); font-weight: 600; }
.auth-alt a:hover { color: var(--accent-strong); }
.auth-note {
    color: var(--muted); font-size: 0.9rem; text-align: center;
    margin-bottom: var(--s-5);
}

/* --------------------------------------------------------------------------
   Shopping assistant
   -------------------------------------------------------------------------- */
.assistant {
    position: fixed; right: var(--s-5); bottom: var(--s-5); z-index: 60;
    display: flex; flex-direction: column; align-items: flex-end; gap: var(--s-3);
}

.assistant-toggle {
    width: 54px; height: 54px; border-radius: var(--radius-pill);
    background: var(--accent); color: var(--on-accent);
    border: none; cursor: pointer; display: grid; place-items: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    transition: transform .15s ease, background .15s ease;
}
.assistant-toggle:hover { background: var(--accent-strong); transform: translateY(-1px); }
.assistant-toggle svg { width: 24px; height: 24px; }
.assistant-toggle .icon-close { display: none; }
.assistant.is-open .assistant-toggle .icon-chat { display: none; }
.assistant.is-open .assistant-toggle .icon-close { display: block; }

.assistant-panel {
    width: min(370px, calc(100vw - 2 * var(--s-5)));
    height: min(520px, calc(100vh - 120px));
    display: flex; flex-direction: column; overflow: hidden;
    background: var(--surface); border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
}

.assistant-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: var(--s-3); padding: var(--s-4) var(--s-5);
    border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.assistant-head h2 {
    font-family: var(--font-display); font-size: 1.05rem; font-weight: 500;
}
.assistant-head h2 em { font-style: normal; color: var(--accent); }
.assistant-head p { color: var(--muted); font-size: 0.8rem; margin-top: 2px; }
.assistant-clear {
    background: transparent; border: 1px solid var(--border);
    border-radius: var(--radius); color: var(--muted); cursor: pointer;
    width: 32px; height: 32px; display: grid; place-items: center; flex: none;
}
.assistant-clear:hover { color: var(--text); border-color: var(--border-strong); }
.assistant-clear svg { width: 15px; height: 15px; }

.assistant-log {
    flex: 1; overflow-y: auto; padding: var(--s-4) var(--s-4) var(--s-3);
    display: flex; flex-direction: column; gap: var(--s-3);
    scroll-behavior: smooth;
}

.assistant-msg {
    max-width: 85%; padding: var(--s-3) var(--s-4);
    border-radius: var(--radius-lg); font-size: 0.9rem; line-height: 1.5;
}
.assistant-msg p + p { margin-top: var(--s-2); }
.assistant-msg.from-user {
    align-self: flex-end; background: var(--accent-soft);
    border: 1px solid var(--accent-line); border-bottom-right-radius: var(--radius);
}
.assistant-msg.from-bot {
    align-self: flex-start; background: var(--surface-2);
    border: 1px solid var(--border); border-bottom-left-radius: var(--radius);
}
.assistant-msg a { color: var(--accent); font-weight: 600; text-decoration: underline; }
.assistant-msg a:hover { color: var(--accent-strong); }

.assistant-msg.is-typing { display: flex; gap: 5px; padding: var(--s-4); }
.assistant-msg.is-typing span {
    width: 6px; height: 6px; border-radius: 50%; background: var(--muted);
    animation: assistant-bounce 1.2s infinite;
}
.assistant-msg.is-typing span:nth-child(2) { animation-delay: 0.15s; }
.assistant-msg.is-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes assistant-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-4px); opacity: 1; }
}

.assistant-form {
    display: flex; align-items: flex-end; gap: var(--s-2);
    padding: var(--s-3) var(--s-4); border-top: 1px solid var(--border);
    background: var(--surface-2);
}
.assistant-form textarea {
    flex: 1; resize: none; max-height: 120px;
    background: var(--surface); color: var(--text);
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: var(--s-3) var(--s-4); font-size: 0.9rem; line-height: 1.4;
}
.assistant-form textarea:focus { outline: none; border-color: var(--accent); }
.assistant-send {
    width: 40px; height: 40px; flex: none; border-radius: var(--radius-pill);
    background: var(--accent); color: var(--on-accent); border: none;
    cursor: pointer; display: grid; place-items: center;
}
.assistant-send:hover { background: var(--accent-strong); }
.assistant-send:disabled { opacity: 0.5; cursor: default; }
.assistant-send svg { width: 18px; height: 18px; }

@media (max-width: 480px) {
    .assistant { right: var(--s-4); bottom: var(--s-4); }
    .assistant-panel { height: min(480px, calc(100dvh - 100px)); }
}
/* `hidden` must win over the panel's own display:flex. */
.assistant-panel[hidden] { display: none; }

/* --------------------------------------------------------------------------
   Standing pages: legal prose and the contact page
   -------------------------------------------------------------------------- */
.prose { max-width: 720px; }
.prose h2 {
    font-family: var(--font-display); font-size: 1.35rem; font-weight: 500;
    margin: var(--s-6) 0 var(--s-3);
}
.prose p { color: var(--muted); line-height: 1.7; margin-bottom: var(--s-3); }
.prose strong { color: var(--text); font-weight: 600; }
.prose ul { margin: 0 0 var(--s-3) var(--s-5); color: var(--muted); line-height: 1.7; }
.prose li { margin-bottom: var(--s-2); }
.prose a { color: var(--accent); font-weight: 600; }
.prose a:hover { color: var(--accent-strong); }
.prose-updated { font-size: 0.85rem; margin-top: var(--s-6); }

.contact-layout {
    display: grid; grid-template-columns: 280px 1fr; gap: var(--s-7);
    max-width: 860px; align-items: start;
}
.contact-aside h2 {
    font-family: var(--font-display); font-size: 1.1rem; font-weight: 500;
    margin: var(--s-4) 0 var(--s-2);
}
.contact-aside h2:first-child { margin-top: 0; }
.contact-aside p { color: var(--muted); line-height: 1.6; margin-bottom: var(--s-2); }
.contact-aside a { color: var(--accent); font-weight: 600; }
.contact-aside a:hover { color: var(--accent-strong); }
.contact-form {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: var(--s-6);
}
.contact-form .btn { margin-top: var(--s-2); }
@media (max-width: 720px) {
    .contact-layout { grid-template-columns: 1fr; gap: var(--s-5); }
}

/* --------------------------------------------------------------------------
   Homepage film — full-width band directly above the footer
   -------------------------------------------------------------------------- */
.film {
    /* Break out of the centred container to span the viewport, without
       causing a horizontal scrollbar the way width:100vw would. */
    margin: var(--s-7) calc(50% - 50vw) 0;
    width: 100vw;
    max-width: 100vw;
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    line-height: 0;
}

.film-video {
    display: block;
    width: 100%;
    /* Cap the height so a portrait clip can't take over the whole page —
       phone-shot video is usually 9:16 and would otherwise be enormous. */
    max-height: 70vh;
    object-fit: cover;
    /* Reserve the space before the file loads, so the footer doesn't jump
       down the page when it arrives. */
    aspect-ratio: 16 / 9;
    background: var(--surface-2);
}

@media (max-width: 720px) {
    .film-video { max-height: 60vh; aspect-ratio: 4 / 3; }
}

/* Someone who prefers reduced motion shouldn't be given a looping video;
   the poster frame stands in for it. */
@media (prefers-reduced-motion: reduce) {
    .film-video { display: none; }
    .film { display: none; }
}
