:root {
    --ink: #071a33;
    --muted: #64748b;
    --line: #dbe7f5;
    --paper: #ffffff;
    --soft: #f5f9ff;
    --wash: #eaf4ff;
    --brand: #0a78d1;
    --brand-dark: #075ca3;
    --brand-soft: #dff0ff;
    --accent: #36a3ff;
    --navy: #0b172a;
    --danger: #b42318;
    --radius: 8px;
    --shadow: 0 18px 44px rgba(7, 26, 51, .1);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: auto minmax(240px, 390px) auto auto;
    align-items: center;
    gap: 22px;
    padding: 8px clamp(18px, 4vw, 56px);
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 4px 22px rgba(7, 26, 51, .04);
    backdrop-filter: blur(14px);
}
.brand, .auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--brand);
    font-weight: 900;
    font-size: 19px;
}
.brand-mark {
    display: grid;
    width: 31px;
    height: 31px;
    place-items: center;
    border-radius: 7px;
    color: white;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    font-size: 12px;
    letter-spacing: 0;
    box-shadow: 0 8px 18px rgba(10, 120, 209, .25);
}
.site-search input {
    width: 100%;
    min-height: 38px;
    border: 1px solid #cfdced;
    border-radius: 999px;
    padding: 0 16px;
    background: #f8fbff;
    color: var(--ink);
}
.site-nav { display: flex; align-items: center; gap: 18px; color: #263c5a; font-size: 14px; }
.site-nav a:hover { color: var(--brand); }
.nav-toggle {
    display: none;
    min-height: 36px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: white;
    color: var(--brand-dark);
    font-weight: 800;
}
.pill {
    display: inline-flex;
    min-width: 21px;
    height: 21px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-size: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 18px;
    border: 1px solid var(--brand);
    border-radius: var(--radius);
    background: var(--brand);
    color: white;
    font-weight: 800;
    cursor: pointer;
}
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn.ghost { color: var(--brand-dark); background: white; }
.btn.light { color: var(--brand-dark); background: white; border-color: white; }
.btn-small { min-height: 34px; padding: 6px 12px; font-size: 13px; }
.btn.wide, .wide { width: 100%; }
.btn.disabled { pointer-events: none; opacity: .5; }
.link-button { border: 0; background: transparent; color: var(--brand-dark); cursor: pointer; font-weight: 800; }

.flash { margin: 18px auto 0; max-width: 1160px; padding: 12px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: white; }
.flash.success { border-color: #9bd2ff; background: #edf7ff; }
.flash.error { border-color: #ffb4a8; background: #fff4f2; color: var(--danger); }
.flash.info { border-color: #b8d8ff; background: #f2f8ff; }

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
    gap: clamp(24px, 5vw, 64px);
    align-items: center;
    padding: clamp(58px, 8vw, 98px) clamp(18px, 6vw, 78px);
    background:
        radial-gradient(circle at 12px 12px, rgba(10, 120, 209, .11) 2px, transparent 2px) 0 0 / 32px 32px,
        linear-gradient(135deg, #f7fbff, #e9f4ff 58%, #ffffff);
}
.hero-copy { max-width: 760px; }
.eyebrow {
    display: block;
    color: var(--brand);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 8px;
}
h1, h2, h3 { margin: 0 0 12px; line-height: 1.08; letter-spacing: 0; }
h1 { font-size: clamp(42px, 6vw, 72px); }
h2 { font-size: clamp(26px, 4vw, 38px); }
h3 { font-size: 18px; }
.lead, .hero p { color: var(--muted); font-size: 18px; max-width: 700px; }
.search-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    max-width: 720px;
    margin: 26px 0 16px;
    padding: 8px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: var(--shadow);
}
.search-panel input, .filter-bar input, .filter-bar select, label input, label select, label textarea, .inline-form input, .inline-form select {
    width: 100%;
    border: 1px solid #d2dfed;
    border-radius: var(--radius);
    padding: 12px 14px;
    background: white;
    color: var(--ink);
}
.search-panel input { border: 0; padding-left: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-stats { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 28px; color: var(--muted); }
.hero-stats strong { display: block; color: var(--brand); font-size: 26px; }
.hero-feature {
    display: grid;
    grid-template-columns: .95fr 1.05fr;
    min-height: 250px;
    overflow: hidden;
    background: white;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
}
.hero-cover { background: var(--navy); }
.hero-cover img { width: 100%; height: 100%; object-fit: cover; }
.hero-product-copy { display: grid; align-content: center; gap: 8px; padding: 28px; }
.hero-product-copy h2 { font-size: 24px; }
.hero-product-copy p { font-size: 14px; margin: 0; }
.hero-product-copy strong { color: var(--brand); font-size: 28px; }
.empty-preview { grid-column: 1 / -1; min-height: 250px; }

.section, .page-title {
    max-width: 1180px;
    margin: 0 auto;
    padding: 46px clamp(18px, 3vw, 28px);
}
.section.narrow { max-width: 780px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.section-head a { color: var(--brand); font-weight: 900; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; }
.category-grid, .product-grid, .stat-grid, .article-grid, .testimonial-grid {
    display: grid;
    gap: 20px;
}
.category-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.product-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.article-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.stat-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 20px; }
.testimonial-grid { grid-template-columns: 1fr; }
.product-section.soft-blue {
    max-width: none;
    padding-left: max(clamp(18px, 3vw, 28px), calc((100vw - 1180px) / 2 + 28px));
    padding-right: max(clamp(18px, 3vw, 28px), calc((100vw - 1180px) / 2 + 28px));
    background: var(--wash);
}

.category-card, .product-card, .article-card, .stat-card, .summary-card, .form-card, .table-card, .review-card, blockquote, .empty-state {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: 0 10px 24px rgba(7, 26, 51, .06);
}
.category-card {
    display: grid;
    justify-items: center;
    gap: 8px;
    min-height: 135px;
    padding: 22px 14px;
    text-align: center;
    border: 0;
    box-shadow: none;
}
.category-icon {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 999px;
    color: white;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    font-weight: 900;
}
.category-card strong, .stat-card strong { display: block; font-size: 15px; }
.category-card span, .muted, .stat-card span { color: var(--muted); }

.product-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    border-color: #eef4fb;
    box-shadow: 0 12px 26px rgba(7, 26, 51, .07);
    transition: transform .18s ease, box-shadow .18s ease;
}
.product-card:hover { transform: translateY(-3px); box-shadow: 0 18px 34px rgba(7, 26, 51, .11); }
.product-image { aspect-ratio: 4 / 4.5; background: #e7eff8; overflow: hidden; }
.product-image img { width: 100%; height: 100%; object-fit: cover; }
.product-body { padding: 14px; display: flex; flex: 1; flex-direction: column; gap: 8px; }
.product-type { color: var(--brand); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.product-body p { color: var(--muted); margin: 0; min-height: 42px; font-size: 13px; }
.product-meta { display: grid; gap: 2px; color: var(--muted); font-size: 12px; margin-top: auto; }
.product-meta strong, .detail-price { color: var(--brand); font-size: 18px; }

.deal-band {
    padding: 54px clamp(18px, 5vw, 56px);
    background: linear-gradient(180deg, #f8fbff, var(--wash));
}
.deal-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    max-width: 1040px;
    margin: 0 auto;
    padding: clamp(24px, 5vw, 46px);
    border-radius: 16px;
    background: var(--navy);
    color: white;
    box-shadow: var(--shadow);
}
.deal-card p { color: #b8c7db; max-width: 650px; }
.deal-badge {
    display: inline-flex;
    margin-bottom: 10px;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--brand);
    color: white;
    font-size: 12px;
    font-weight: 900;
}
.author-cta {
    background: linear-gradient(135deg, var(--brand), #1495f7);
    color: white;
    text-align: center;
}
.author-cta .eyebrow, .author-cta p { color: #e1f1ff; }
.cta-inner { max-width: 760px; }

.product-detail, .cart-layout, .dashboard-shell {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 28px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 42px clamp(18px, 3vw, 28px);
}
.detail-media, .detail-copy {
    border-radius: var(--radius);
    background: white;
    border: 1px solid var(--line);
    overflow: hidden;
}
.detail-media img { width: 100%; height: 100%; min-height: 420px; object-fit: cover; }
.detail-copy { padding: clamp(24px, 5vw, 48px); }
.detail-meta, .summary-line, .inline-form, .filter-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}
.detail-meta { color: var(--muted); margin: 16px 0 22px; }
.content-section { background: white; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rich-text { color: #314054; }
.review-list { display: grid; gap: 12px; }
.review-card { padding: 16px; }

.filter-bar { margin-top: 18px; }
.filter-bar input { flex: 1 1 260px; }
.filter-bar select { flex: 0 1 220px; }

.cart-layout { grid-template-columns: minmax(0, 1fr) 320px; }
.summary-card, .form-card, .table-card { padding: 20px; }
.summary-line { justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; }

.auth-shell {
    min-height: calc(100vh - 56px);
    display: grid;
    place-items: center;
    padding: 48px 18px;
    background:
        radial-gradient(circle at 20px 20px, rgba(10, 120, 209, .08) 2px, transparent 2px) 0 0 / 32px 32px,
        linear-gradient(135deg, #eef7ff, #ffffff);
}
.auth-card {
    width: min(100%, 470px);
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: white;
    box-shadow: var(--shadow);
}
.auth-logo { margin-bottom: 24px; font-size: 24px; }
.auth-switch { text-align: center; }
.auth-switch a { color: var(--brand); font-weight: 900; }
label { display: grid; gap: 7px; margin-bottom: 14px; font-weight: 800; }
textarea { resize: vertical; }

.dashboard-shell { grid-template-columns: 250px minmax(0, 1fr); align-items: start; background: var(--soft); }
.dashboard-sidebar {
    position: sticky;
    top: 72px;
    display: grid;
    gap: 6px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: white;
}
.dashboard-sidebar strong { padding: 8px 10px; color: var(--brand-dark); }
.dashboard-sidebar a { padding: 9px 10px; color: #475569; border-radius: 6px; }
.dashboard-sidebar a.active, .dashboard-sidebar a:hover { background: var(--brand-soft); color: var(--brand-dark); }
.dashboard-main { min-width: 0; }
.dashboard-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.stat-card { padding: 18px; }
.wide-form { max-width: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

.article-card { padding: 20px; }
blockquote { margin: 0; padding: 22px; font-size: 20px; color: #334155; }
.empty-state { padding: 28px; text-align: center; color: var(--muted); }
.empty-state.compact { min-height: 100%; display: grid; place-items: center; }
.site-footer {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(320px, .9fr);
    gap: 48px;
    padding: 48px clamp(18px, 5vw, 56px);
    background: var(--navy);
    color: white;
}
.footer-brand p { color: #b8c7db; max-width: 360px; }
.footer-links { display: grid; grid-template-columns: repeat(2, minmax(130px, 1fr)); gap: 28px; color: #cbd5e1; }
.footer-links div { display: grid; gap: 10px; }
.footer-links strong { color: white; }
.footer-links a:hover { color: white; }

@media (max-width: 920px) {
    .site-header { grid-template-columns: auto 1fr auto; }
    .site-search { display: none; }
    .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .site-nav {
        display: none;
        position: absolute;
        left: 12px;
        right: 12px;
        top: 58px;
        padding: 16px;
        flex-direction: column;
        align-items: stretch;
        background: white;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
    }
    .site-nav.open { display: flex; }
    .hero, .product-detail, .cart-layout, .dashboard-shell, .split, .site-footer { grid-template-columns: 1fr; }
    .hero { padding-top: 42px; }
    .hero-feature { grid-template-columns: 1fr; }
    .hero-cover { aspect-ratio: 16 / 10; }
    .search-panel { grid-template-columns: 1fr; border-radius: var(--radius); }
    h1 { font-size: 38px; }
    .dashboard-sidebar { position: static; }
    .form-grid { grid-template-columns: 1fr; }
    .table-card { overflow-x: auto; }
    .deal-card { align-items: flex-start; flex-direction: column; }
}
