:root {
    color-scheme: light dark;
    --bg: #ffffff;
    --fg: #16181d;
    --muted: #5b6270;
    --brand: #2f6fed;
    --card-bg: #f6f7f9;
    --border: #e3e5e9;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f1115;
        --fg: #eef0f3;
        --muted: #9aa2b1;
        --brand: #5b8def;
        --card-bg: #171a21;
        --border: #262b34;
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--fg);
    line-height: 1.5;
}

a { color: var(--brand); }

.container { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }

header.site-header {
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}

.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.nav a { text-decoration: none; color: var(--fg); font-weight: 500; }

.hero {
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.25rem);
    margin: 0 0 0.5rem;
}

.hero p.lead {
    color: var(--muted);
    font-size: 1.15rem;
    max-width: 640px;
    margin: 0 auto 2rem;
}

.cta-group { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

.hero-screenshot {
    display: block;
    max-width: 280px;
    width: 100%;
    height: auto;
    margin: 2.5rem auto 0;
    border-radius: 1rem;
    border: 1px solid var(--border);
    box-shadow: 0 20px 40px -20px rgba(0,0,0,0.25);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.6rem;
    text-decoration: none;
    font-weight: 600;
}

.btn-primary { background: var(--brand); color: #fff; }
.btn-secondary { background: var(--card-bg); color: var(--fg); border: 1px solid var(--border); }

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    padding: 2rem 0 4rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.25rem;
}

.card h3 { margin-top: 0; font-size: 1.05rem; }
.card p { color: var(--muted); margin-bottom: 0; font-size: 0.95rem; }

.product-hero { padding: 2.5rem 0; }

.product-hero-grid {
    display: grid;
    grid-template-columns: minmax(200px, 320px) 1fr;
    gap: 2.5rem;
    align-items: start;
}

@media (max-width: 720px) {
    .product-hero-grid { grid-template-columns: 1fr; }
}

.gallery-main img {
    width: 100%;
    height: auto;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    display: block;
}

.gallery-thumbs {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    overflow-x: auto;
}

.gallery-thumbs img {
    width: 64px;
    height: auto;
    border-radius: 0.4rem;
    border: 1px solid var(--border);
    cursor: pointer;
}

.product-info h1 { margin-bottom: 0.25rem; }
.product-info .tagline { color: var(--muted); font-size: 1.05rem; margin-top: 0; }

.price-box {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.price-amount { font-size: 1.75rem; font-weight: 700; }
.price-note { color: var(--muted); font-size: 0.9rem; }

.product-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem 1rem; margin: 1.25rem 0; }
.product-meta dt { color: var(--muted); font-size: 0.85rem; margin: 0; }
.product-meta dd { margin: 0; font-weight: 600; }

.product-description { padding-bottom: 3rem; line-height: 1.7; }

.lightbox {
    position: relative;
    border: none;
    border-radius: 0.75rem;
    padding: 0;
    max-width: 90vw;
    max-height: 90vh;
    background: #000;
}

.lightbox::backdrop { background: rgba(0,0,0,0.8); }

.lightbox-image { max-width: 90vw; max-height: 80vh; display: block; margin: 0 auto; }

.lightbox-caption {
    color: #fff;
    text-align: center;
    padding: 0.5rem 1rem 1rem;
    margin: 0;
    font-size: 0.9rem;
}

.lightbox-close, .lightbox-prev, .lightbox-next {
    position: absolute;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    cursor: pointer;
    font-size: 1.1rem;
}

.lightbox-close { top: 0.5rem; right: 0.5rem; }
.lightbox-prev { top: 45%; left: 0.5rem; }
.lightbox-next { top: 45%; right: 0.5rem; }

.auth-page { max-width: 480px; padding: 2.5rem 1.25rem 4rem; }

.form { display: flex; flex-direction: column; gap: 1rem; margin-top: 1rem; }

.form label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.form input {
    font: inherit;
    padding: 0.65rem 0.8rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--fg);
}

.form input:focus {
    outline: 2px solid var(--brand);
    outline-offset: 1px;
}

.form button { margin-top: 0.5rem; border: none; font: inherit; cursor: pointer; }

.field-error { color: #d1453b; font-size: 0.85rem; margin: -0.5rem 0 0; }
.field-success { color: #1f8a4c; font-size: 0.9rem; }

.checkout-page { max-width: 640px; padding: 2.5rem 1.25rem 4rem; }

.order-summary-box {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin: 1rem 0 1.5rem;
}

.checkbox-label {
    flex-direction: row !important;
    align-items: flex-start;
    gap: 0.6rem !important;
    font-weight: 400 !important;
    font-size: 0.9rem;
}

.checkbox-label input { margin-top: 0.2rem; }

.customer-type-fieldset {
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.customer-type-fieldset legend {
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0 0.4rem;
}

.gdpr-info { font-size: 0.85rem; color: var(--muted); }

.account-page { max-width: 720px; }

.account-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.account-nav a {
    padding: 0.5rem 0.9rem;
    border-radius: 0.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--fg);
    font-size: 0.9rem;
}

.table-scroll { overflow-x: auto; }

.data-table { width: 100%; border-collapse: collapse; margin: 1rem 0; }

.data-table th, .data-table td {
    text-align: left;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

footer.site-footer {
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.footer-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; }
.footer-links a { color: var(--muted); }

.support-page { padding: 2rem 0 4rem; }

.support-guides {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0 2.5rem;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: 0.6rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.6rem;
    background: var(--card-bg);
}

.faq-item summary { cursor: pointer; font-weight: 600; }
.faq-item p { margin-bottom: 0; color: var(--muted); }
