:root {
    --bg: #050506;
    --panel: #0d0d10;
    --panel-2: #131317;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --text: #f4f4f5;
    --text-dim: #a1a1aa;
    --text-faint: #6b7280;
    --accent: #ffffff;
    --accent-strong: #d4d4d8;
    --accent-soft: rgba(255, 255, 255, 0.07);
    --accent-border: rgba(255, 255, 255, 0.3);
    --green: #f4f4f5;
    --green-soft: rgba(255, 255, 255, 0.09);
    --yellow: #a1a1aa;
    --yellow-soft: rgba(255, 255, 255, 0.05);
    --red: #f87171;
    --red-soft: rgba(248, 113, 113, 0.12);
    --radius: 14px;
    --radius-sm: 9px;
    --font: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.announcement {
    background: rgba(255,255,255,.06);
    border-bottom: 1px solid var(--accent-border);
    color: var(--accent);
    text-align: center;
    font-size: .85rem;
    font-weight: 600;
    padding: 8px 16px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 90;
    background: rgba(5, 5, 6, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 14px 0;
}

.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { height: 34px; width: auto; }
.brand span { font-size: 1.3rem; font-weight: 700; letter-spacing: .02em; }

.main-nav { display: flex; align-items: center; gap: 22px; flex: 1; }

.nav-link {
    color: var(--text-dim);
    font-size: .92rem;
    font-weight: 500;
    transition: color .15s ease;
    padding: 4px 0;
}
.nav-link:hover, .nav-link.active { color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 14px; margin-left: auto; }

.currency-select {
    background: var(--panel);
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-size: .82rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 7px 10px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}
.currency-select:hover { border-color: var(--border-strong); color: var(--text); }

.cart-button {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--panel);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    font-size: .88rem;
    font-weight: 600;
    transition: border-color .15s ease, background .15s ease;
}
.cart-button:hover { border-color: var(--accent-border); background: var(--accent-soft); }
.cart-button svg { width: 17px; height: 17px; }

.cart-count {
    background: #ffffff;
    color: #111113;
    font-size: .7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}
.cart-count.visible { display: inline-flex; }

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    padding: 6px;
}
.menu-toggle svg { width: 24px; height: 24px; }

.mobile-nav {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 8px 0 16px;
    border-top: 1px solid var(--border);
}
.mobile-nav.open { display: flex; }
.mobile-nav .nav-link { padding: 10px 4px; font-size: 1rem; }

main { flex: 1; }

.page-head { padding: 44px 0 10px; }
.page-head h1 { font-size: 1.9rem; font-weight: 700; letter-spacing: -.01em; }
.page-head p { color: var(--text-dim); margin-top: 6px; max-width: 640px; }

.shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 0 6px;
    color: var(--text-faint);
    font-size: .85rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 22px;
    padding: 22px 0 60px;
}

.product-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.product-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-border);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
}

.product-media {
    position: relative;
    aspect-ratio: 1;
    background:
        radial-gradient(circle at 30% 25%, rgba(255,255,255,.05), transparent 65%),
        var(--panel-2);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 26px;
}
.product-media img {
    max-width: 88%;
    max-height: 88%;
    object-fit: contain;
    transition: transform .25s ease;
}
.product-card:hover .product-media img { transform: scale(1.05); }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 4px 11px;
}
.badge-available { background: rgba(255,255,255,.1); color: #f4f4f5; border: 1px solid rgba(255,255,255,.45); }
.badge-development { background: rgba(255,255,255,.05); color: #a1a1aa; border: 1px solid rgba(255,255,255,.25); }
.badge-coming { background: rgba(255,255,255,.05); color: #d4d4d8; border: 1px solid rgba(255,255,255,.3); }
.badge-sold_out { background: rgba(255,255,255,.03); color: #71717a; border: 1px solid rgba(255,255,255,.15); }

.product-media .badge { position: absolute; top: 12px; right: 12px; }

.product-body { padding: 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-body h3 { font-size: 1.05rem; font-weight: 650; }
.product-body .tagline { color: var(--text-dim); font-size: .85rem; flex: 1; }

.product-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
}
.product-price { font-size: 1.2rem; font-weight: 700; font-family: var(--mono); }
.product-price.tba { color: var(--text-faint); font-size: .95rem; }
.stock-note { font-size: .78rem; color: var(--text-faint); }
.stock-note.low { color: var(--accent); }

.info-strip {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--panel);
    padding: 34px 0;
    margin-bottom: 50px;
}
.info-strip .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 26px;
}
.info-item { display: flex; gap: 14px; align-items: flex-start; }
.info-item svg { width: 22px; height: 22px; color: var(--accent); flex-shrink: 0; margin-top: 3px; }
.info-item h4 { font-size: .95rem; font-weight: 650; }
.info-item p { font-size: .82rem; color: var(--text-dim); }

.product-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 48px;
    padding: 40px 0 70px;
}

.breadcrumbs { padding: 22px 0 0; font-size: .82rem; color: var(--text-faint); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs span { margin: 0 6px; }

.gallery { position: sticky; top: 96px; align-self: start; }

.gallery-main {
    position: relative;
    aspect-ratio: 1;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 30% 25%, rgba(255,255,255,.06), transparent 60%),
        var(--panel);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    overflow: hidden;
}
.gallery-main img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    filter: drop-shadow(0 18px 50px rgba(0, 0, 0, 0.6));
}
.gallery-main .viewer-host { position: absolute; inset: 0; }
.gallery-main canvas { width: 100% !important; height: 100% !important; display: block; }

.viewer-hint {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: .72rem;
    color: var(--text-faint);
    background: rgba(5,5,6,.7);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px 12px;
    pointer-events: none;
}

.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.thumb {
    width: 74px;
    height: 74px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--panel);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    cursor: pointer;
    transition: border-color .15s ease;
}
.thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.thumb.active, .thumb:hover { border-color: var(--accent); }
.thumb-3d { flex-direction: column; gap: 2px; color: var(--text-dim); font-size: .62rem; font-weight: 700; letter-spacing: .06em; }
.thumb-3d svg { width: 26px; height: 26px; color: var(--accent); }

.product-info h1 { font-size: 2rem; font-weight: 750; letter-spacing: -.01em; margin: 10px 0 4px; }
.product-info .tagline { color: var(--text-dim); font-size: 1.02rem; }
.product-info .sku { font-family: var(--mono); font-size: .75rem; color: var(--text-faint); margin-top: 8px; }

.price-box {
    margin: 24px 0;
    background: linear-gradient(135deg, rgba(255,255,255,.07), rgba(255,255,255,.02));
    border: 1px solid var(--accent-border);
    border-radius: var(--radius);
    padding: 20px 22px;
}
.price-line { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.price-current { font-size: 1.9rem; font-weight: 750; font-family: var(--mono); }
.price-compare { color: var(--text-faint); text-decoration: line-through; font-family: var(--mono); }
.price-note { font-size: .8rem; color: var(--text-dim); margin-top: 4px; }

.dev-box {
    margin: 24px 0;
    background: linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
    border: 1px solid rgba(255,255,255,.25);
    border-radius: var(--radius);
    padding: 22px;
}
.dev-box h3 { font-size: 1.05rem; margin-bottom: 6px; color: #f4f4f5; }
.dev-box p { color: var(--text-dim); font-size: .9rem; margin-bottom: 16px; }

.notify-form { display: flex; gap: 10px; flex-wrap: wrap; }
.notify-form input {
    flex: 1;
    min-width: 200px;
    background: var(--bg);
    border: 1px solid var(--border-strong);
    color: var(--text);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: .92rem;
}
.notify-form input:focus { outline: none; border-color: var(--accent); }
.form-msg { font-size: .85rem; margin-top: 10px; display: none; }
.form-msg.ok { display: block; color: var(--green); }
.form-msg.err { display: block; color: var(--red); }

.buy-controls { display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap; margin-top: 18px; }

.qty-select {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--panel);
    overflow: hidden;
}
.qty-select button {
    background: none;
    border: none;
    color: var(--text);
    width: 42px;
    height: 46px;
    font-size: 1.15rem;
    transition: background .15s ease;
}
.qty-select button:hover { background: rgba(255,255,255,.06); }
.qty-select input {
    width: 46px;
    text-align: center;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1rem;
    font-weight: 650;
    font-family: var(--mono);
}
.qty-select input:focus { outline: none; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border-radius: var(--radius-sm);
    font-weight: 650;
    font-size: .95rem;
    padding: 12px 24px;
    border: 1px solid transparent;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }

.btn-primary {
    background: linear-gradient(135deg, #ffffff, #d4d4d8);
    color: #111113;
    box-shadow: 0 4px 22px rgba(255, 255, 255, 0.08);
}
.btn-primary:hover { box-shadow: 0 8px 30px rgba(255, 255, 255, 0.16); transform: translateY(-1px); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }

.btn-secondary {
    background: var(--panel);
    border-color: var(--border-strong);
    color: var(--text);
}
.btn-secondary:hover { border-color: var(--accent-border); background: var(--accent-soft); }

.btn-ghost { background: none; border-color: var(--border); color: var(--text-dim); }
.btn-ghost:hover { color: var(--text); border-color: var(--border-strong); }

.btn-block { width: 100%; }

.trust-list { display: grid; gap: 9px; margin-top: 22px; }
.trust-list li {
    list-style: none;
    display: flex;
    gap: 10px;
    align-items: center;
    color: var(--text-dim);
    font-size: .86rem;
}
.trust-list svg { width: 16px; height: 16px; color: var(--green); flex-shrink: 0; }

.product-sections { padding-bottom: 80px; display: grid; gap: 26px; }

.section-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px;
}
.section-card h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 16px; }
.section-card .prose { color: var(--text-dim); font-size: .95rem; white-space: pre-line; }
.section-card .prose a { color: var(--accent); }

.spec-table { width: 100%; border-collapse: collapse; }
.spec-table tr { border-bottom: 1px solid var(--border); }
.spec-table tr:last-child { border-bottom: none; }
.spec-table td { padding: 11px 4px; font-size: .9rem; }
.spec-table td:first-child { color: var(--text-faint); width: 40%; }
.spec-table td:last-child { color: var(--text); font-family: var(--mono); font-size: .84rem; }

.doc-list { display: grid; gap: 10px; }
.doc-link {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: var(--text-dim);
    font-size: .9rem;
    transition: border-color .15s ease, color .15s ease;
}
.doc-link:hover { border-color: var(--accent-border); color: var(--text); }
.doc-link svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }

.cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
    gap: 34px;
    padding: 30px 0 80px;
    align-items: start;
}
.cart-layout[hidden] { display: none; }

.cart-lines { display: grid; gap: 14px; }
.cart-line {
    display: grid;
    grid-template-columns: 84px 1fr auto;
    gap: 18px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    align-items: center;
}
.cart-line .line-img {
    width: 84px;
    height: 84px;
    background: var(--panel-2);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}
.cart-line .line-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cart-line h3 { font-size: .98rem; font-weight: 650; }
.cart-line .unit { color: var(--text-faint); font-size: .8rem; font-family: var(--mono); }
.cart-line .line-right { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.cart-line .line-total { font-family: var(--mono); font-weight: 700; }
.remove-line { background: none; border: none; color: var(--text-faint); font-size: .78rem; text-decoration: underline; }
.remove-line:hover { color: var(--red); }
.cart-line .qty-select button { height: 34px; width: 34px; font-size: 1rem; }
.cart-line .qty-select input { width: 36px; font-size: .9rem; }

.summary-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    position: sticky;
    top: 96px;
}
.summary-card h2 { font-size: 1.1rem; margin-bottom: 16px; }
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; color: var(--text-dim); font-size: .92rem; }
.summary-row.total { border-top: 1px solid var(--border-strong); margin-top: 10px; padding-top: 16px; color: var(--text); font-weight: 700; font-size: 1.05rem; }
.summary-row.total span:last-child { font-family: var(--mono); }
.summary-note { font-size: .78rem; color: var(--text-faint); margin-top: 14px; }

.empty-state {
    text-align: center;
    padding: 90px 20px;
    color: var(--text-dim);
}
.empty-state svg { width: 46px; height: 46px; color: var(--text-faint); margin: 0 auto 18px; }
.empty-state h2 { color: var(--text); font-size: 1.3rem; margin-bottom: 8px; }
.empty-state p { margin-bottom: 22px; }

.confirm-card {
    max-width: 640px;
    margin: 60px auto 90px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
}
.confirm-card .check {
    width: 62px;
    height: 62px;
    border-radius: 999px;
    background: var(--green-soft);
    border: 1px solid rgba(255,255,255,.4);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}
.confirm-card .check svg { width: 30px; height: 30px; color: var(--green); }
.confirm-card h1 { font-size: 1.6rem; margin-bottom: 8px; }
.confirm-card > p { color: var(--text-dim); margin-bottom: 26px; }
.confirm-details { text-align: left; border-top: 1px solid var(--border); padding-top: 18px; margin-bottom: 26px; }
.confirm-details .summary-row span:last-child { font-family: var(--mono); }

.content-page { max-width: 760px; margin: 0 auto; padding: 20px 0 90px; }
.content-page .prose { color: var(--text-dim); font-size: 1rem; display: grid; gap: 4px; }
.content-page .prose p { margin: 10px 0; }
.content-page .prose a { color: var(--accent); }
.content-page .prose h2 { color: var(--text); margin: 22px 0 6px; font-size: 1.25rem; }
.content-page .prose h3 { color: var(--text); margin: 18px 0 4px; font-size: 1.05rem; }
.content-page .prose ul, .content-page .prose ol { padding-left: 22px; margin: 10px 0; }
.content-page .prose li { margin: 5px 0; }

.conformity-list { display: grid; gap: 22px; padding: 24px 0 90px; }
.conformity-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px;
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 22px;
    align-items: start;
}
.conformity-card .prod-img {
    width: 90px;
    height: 90px;
    background: var(--panel-2);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}
.conformity-card .prod-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.conformity-card h2 { font-size: 1.15rem; margin-bottom: 4px; }
.conformity-card .sku { font-family: var(--mono); font-size: .75rem; color: var(--text-faint); margin-bottom: 12px; }
.conformity-card .no-docs { color: var(--text-faint); font-size: .88rem; font-style: italic; }

.ce-mark {
    font-family: var(--mono);
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--text-dim);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 2px 10px;
    display: inline-block;
    margin-bottom: 14px;
}

.site-footer {
    border-top: 1px solid var(--border);
    background: var(--panel);
    padding: 50px 0 30px;
    margin-top: auto;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.3fr;
    gap: 34px;
    padding-bottom: 36px;
}
.footer-brand img { height: 30px; margin-bottom: 12px; }
.footer-brand p { color: var(--text-faint); font-size: .85rem; max-width: 240px; }
.footer-social { display: flex; gap: 14px; margin-top: 16px; }
.footer-social a { color: var(--text-faint); transition: color .15s ease; }
.footer-social a:hover { color: var(--text); }
.footer-social svg { width: 20px; height: 20px; }

.footer-col h4 {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-dim);
    margin-bottom: 14px;
}
.footer-col ul { list-style: none; display: grid; gap: 9px; }
.footer-col a, .footer-col li { color: var(--text-faint); font-size: .88rem; }
.footer-col a:hover { color: var(--accent); }

.newsletter-box p { color: var(--text-faint); font-size: .85rem; margin-bottom: 12px; }
.newsletter-form { display: flex; gap: 8px; }
.newsletter-form input {
    flex: 1;
    min-width: 0;
    background: var(--bg);
    border: 1px solid var(--border-strong);
    color: var(--text);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: .85rem;
}
.newsletter-form input:focus { outline: none; border-color: var(--accent); }
.newsletter-form .btn { padding: 10px 16px; font-size: .85rem; }

.footer-legal {
    border-top: 1px solid var(--border);
    padding-top: 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px 24px;
    flex-wrap: wrap;
}
.footer-legal-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 14px;
    color: var(--text-faint);
    font-size: .82rem;
}
.footer-legal-info > span,
.footer-legal-info > a { position: relative; }
.footer-legal-info > *:not(:last-child)::after {
    content: "·";
    position: absolute;
    right: -9px;
    color: var(--text-faint);
    opacity: .6;
}
.footer-legal-name { color: var(--text-dim); font-weight: 600; }
.footer-legal-info a:hover { color: var(--text); }
.footer-legal-links {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-shrink: 0;
}
.footer-legal-links a,
.footer-legal-links button {
    background: none;
    border: none;
    padding: 0;
    color: var(--text-faint);
    font-size: .82rem;
    font-family: inherit;
    cursor: pointer;
    transition: color .15s ease;
}
.footer-legal-links a:hover,
.footer-legal-links button:hover { color: var(--text); }

.footer-bottom {
    padding-top: 16px;
    margin-top: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px 20px;
    flex-wrap: wrap;
    color: var(--text-faint);
    font-size: .76rem;
}

.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 560px;
    margin: 0 auto;
    background: var(--panel-2);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 20px;
    z-index: 200;
    box-shadow: 0 20px 60px rgba(0,0,0,.6);
}
.cookie-banner.hidden { display: none; }
.cookie-content { display: flex; flex-direction: column; gap: 14px; }
.cookie-text h3 { font-size: 1rem; margin-bottom: 4px; }
.cookie-text p { color: var(--text-dim); font-size: .85rem; }
.cookie-actions { display: flex; gap: 10px; justify-content: flex-end; }
.cookie-actions .btn-primary, .cookie-actions .btn-secondary { padding: 9px 18px; font-size: .85rem; border-radius: var(--radius-sm); }

.cookie-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 210;
    padding: 20px;
}
.cookie-modal.hidden { display: none; }
.cookie-modal-content {
    background: var(--panel-2);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    max-width: 460px;
    width: 100%;
    padding: 24px;
}
.cookie-modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.cookie-modal-header h2 { font-size: 1.1rem; }
.modal-close { background: none; border: none; color: var(--text-dim); font-size: 1.5rem; line-height: 1; }
.cookie-category { border-bottom: 1px solid var(--border); padding: 14px 0; }
.cookie-category-header { display: flex; gap: 14px; align-items: center; }
.cookie-category h3 { font-size: .95rem; }
.cookie-category p { color: var(--text-faint); font-size: .78rem; }
.cookie-modal-footer { margin-top: 18px; display: flex; justify-content: flex-end; }

.cookie-toggle { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.cookie-toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.15);
    border-radius: 999px;
    transition: background .2s ease;
}
.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s ease;
}
.cookie-toggle input:checked + .toggle-slider { background: #e4e4e7; }
.cookie-toggle input:checked + .toggle-slider::before { background: #18181b; }
.cookie-toggle input:checked + .toggle-slider::before { transform: translateX(18px); }
.cookie-toggle input:disabled + .toggle-slider { opacity: .5; }

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--panel-2);
    border: 1px solid var(--accent-border);
    color: var(--text);
    border-radius: var(--radius-sm);
    padding: 13px 18px;
    font-size: .9rem;
    z-index: 300;
    display: flex;
    gap: 10px;
    align-items: center;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .2s ease, transform .2s ease;
    pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast svg { width: 17px; height: 17px; color: var(--green); }

@media (max-width: 900px) {
    .main-nav { display: none; }
    .menu-toggle { display: block; }
    .product-layout { grid-template-columns: 1fr; gap: 30px; }
    .gallery { position: static; }
    .cart-layout { grid-template-columns: 1fr; }
    .summary-card { position: static; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
    .header-inner { gap: 12px; }
    .cart-button span.label { display: none; }
    .footer-grid { grid-template-columns: 1fr; }
    .cart-line { grid-template-columns: 64px 1fr; }
    .cart-line .line-right { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
    .confirm-card { padding: 26px 18px; }
}

.viewer-controls {
    position: absolute;
    bottom: 44px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(5,5,6,.82);
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    padding: 6px 10px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    max-width: calc(100% - 24px);
    overflow-x: auto;
    scrollbar-width: none;
    z-index: 4;
}
.viewer-controls::-webkit-scrollbar { display: none; }
/* An author-origin `display` on a [hidden] element always beats the
   browser's `[hidden] { display: none }` UA rule (origin precedence trumps
   specificity), so every element that sets `display` unconditionally and
   also gets toggled via the hidden attribute needs this explicit override. */
.viewer-controls[hidden] { display: none; }
.viewer-controls button {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: none;
    background: none;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease, color .15s ease;
}
.viewer-controls button:hover, .viewer-controls button:active { background: rgba(255,255,255,.1); color: var(--text); }
.viewer-controls button.active { color: var(--text); background: rgba(255,255,255,.14); }
.viewer-controls button[hidden] { display: none; }
.viewer-controls svg { width: 19px; height: 19px; }
.viewer-controls-sep { width: 1px; height: 22px; background: var(--border-strong); margin: 0 2px; }

.resource-groups { display: grid; gap: 26px; }
.resource-group h3 {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-faint);
    margin-bottom: 10px;
}
.doc-tag {
    margin-left: auto;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-faint);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 2px 9px;
    white-space: nowrap;
}

@media (min-width: 720px) {
    .resource-groups { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
    .viewer-controls { bottom: 12px; gap: 3px; padding: 5px 8px; }
    .viewer-hint { display: none; }
}

@media (max-width: 560px) {
    .page-head { padding: 28px 0 6px; }
    .page-head h1 { font-size: 1.5rem; }
    .product-info h1 { font-size: 1.6rem; }
    .gallery-main { padding: 22px; }
    .btn { padding: 13px 20px; }
    .buy-controls .btn { flex: 1; min-width: 150px; }
    .qty-select button { width: 46px; height: 50px; }
    .notify-form .btn { width: 100%; }
    .section-card { padding: 20px 16px; }
    .doc-link { padding: 13px 14px; }
    .cookie-actions { flex-wrap: wrap; }
    .cookie-actions .btn { flex: 1; }
    .footer-bottom { flex-direction: column; align-items: flex-start; }
}

.biz-cta-row { display: flex; gap: 12px; flex-wrap: wrap; padding: 8px 0 26px; }
.biz-grid { display: grid; gap: 22px; padding-bottom: 30px; }
.biz-steps { padding-left: 20px; color: var(--text-dim); display: grid; gap: 10px; margin-bottom: 16px; }
.biz-steps strong { color: var(--text); }
@media (min-width: 820px) { .biz-grid { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 560px) { .biz-cta-row .btn { flex: 1; } }

.legal-page { max-width: 860px; }
.legal-page .breadcrumbs a:hover { color: var(--accent); }
.legal-sections { display: grid; gap: 18px; }
.legal-sections .section-card h2 { font-size: 1.1rem; }
.legal-sections .section-card p { color: var(--text-dim); font-size: .95rem; margin: 10px 0; }
.legal-sections .section-card a { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(255,255,255,.3); }
.legal-sections .section-card ul { padding-left: 22px; color: var(--text-dim); display: grid; gap: 6px; margin: 10px 0; }
.legal-note {
    background: var(--panel);
    border: 1px solid var(--border-strong);
    border-left: 3px solid var(--accent-strong);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    color: var(--text-dim);
    font-size: .92rem;
    margin-bottom: 20px;
}
.legal-note strong { color: var(--text); }

.gallery-expand {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 4;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(5,5,6,.7);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.gallery-expand:hover { color: var(--text); border-color: var(--accent-border); background: rgba(5,5,6,.9); }
.gallery-expand svg { width: 18px; height: 18px; }

.viewer-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-dim);
    font-size: .82rem;
    background: rgba(13,13,16,.55);
    z-index: 3;
}
.viewer-loading .spinner {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--border-strong);
    border-top-color: var(--text);
    animation: kjern-spin .8s linear infinite;
}
@keyframes kjern-spin { to { transform: rotate(360deg); } }
.viewer-loading[hidden] { display: none; }

.viewer-error {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-faint);
    font-size: .85rem;
    text-align: center;
    padding: 24px;
    z-index: 3;
}

.fsg-body {
    margin: 0;
    background: #050506;
    color: var(--text);
    /* A hard height (not min-height) plus min-height:0 on the flexed stage
       below guarantees the page can never exceed one viewport, so nothing
       (including thumbnail scrollIntoView calls) can scroll the page itself
       — overflow:hidden alone doesn't stop programmatic scrollIntoView. */
    height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font);
    overflow: hidden;
}

.fsg-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.fsg-close {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dim);
    font-size: .88rem;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: color .15s ease, background .15s ease;
    flex-shrink: 0;
}
.fsg-close:hover { color: var(--text); background: rgba(255,255,255,.06); }
.fsg-close svg { width: 18px; height: 18px; }
.fsg-title { font-size: .92rem; font-weight: 650; text-align: center; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fsg-count { color: var(--text-faint); font-size: .8rem; font-family: var(--mono); min-width: 50px; text-align: right; flex-shrink: 0; }

.fsg-stage {
    flex: 1;
    display: flex;
    align-items: stretch;
    position: relative;
    min-height: 0;
}
.fsg-viewport {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    min-height: 0;
    background: radial-gradient(circle at 50% 40%, rgba(255,255,255,.04), transparent 60%);
    touch-action: pan-y;
}
.fsg-viewport img { max-width: 100%; max-height: 100%; object-fit: contain; }
.fsg-viewport .viewer-host { position: absolute; inset: 0; }
.fsg-viewport canvas { width: 100% !important; height: 100% !important; display: block; }

.fsg-nav {
    flex: 0 0 auto;
    width: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-faint);
    transition: color .15s ease, background .15s ease;
}
.fsg-nav:hover { color: var(--text); background: rgba(255,255,255,.04); }
.fsg-nav svg { width: 26px; height: 26px; }
.fsg-nav[hidden] { display: none; }

.fsg-thumbs {
    display: flex;
    gap: 10px;
    padding: 14px 16px;
    overflow-x: auto;
    border-top: 1px solid var(--border);
    scrollbar-width: thin;
    flex-shrink: 0;
}
.fsg-thumbs .thumb { flex-shrink: 0; }

@media (max-width: 700px) {
    .fsg-nav { width: 40px; }
    .fsg-nav svg { width: 20px; height: 20px; }
    .fsg-title { display: none; }
}
