/* =====================================================================
   OPTDTF — Design System v2
   Multi-theme, no gradients, glow effects, glassmorphism
   Mobile-first, vanilla CSS
   ===================================================================== */

/* ── Theme: Light (default) ───────────────────────────────────────── */
:root,
[data-theme="light"] {
    --color-primary:        #2563EB;
    --color-primary-hover:  #1D4ED8;
    --color-accent:         #E11D48;
    --color-accent-hover:   #BE123C;

    --color-bg:             #F8FAFC;
    --color-bg-alt:         #F1F5F9;
    --color-bg-dots:        rgba(15, 23, 42, 0.06);
    --color-surface:        #FFFFFF;
    --color-surface-glass:  rgba(255, 255, 255, 0.85);
    --color-border:         #E2E8F0;

    --color-text:           #0F172A;
    --color-text-muted:     #475569;
    --color-text-light:     #94A3B8;
    --color-text-inverse:   #FFFFFF;

    --color-success:        #059669;
    --color-error:          #DC2626;

    --glow-color:           rgba(37, 99, 235, 0.15);
    --glow-color-strong:    rgba(37, 99, 235, 0.25);

    --header-bg:            rgba(248, 250, 252, 0.88);
    --footer-bg:            #0F172A;
    --footer-text:          #94A3B8;
    --footer-heading:       #FFFFFF;
    --cta-bg:               #0F172A;
    --cta-text:             #FFFFFF;

    color-scheme: light;
}

/* ── Theme: Dark ──────────────────────────────────────────────────── */
[data-theme="dark"] {
    --color-primary:        #3B82F6;
    --color-primary-hover:  #60A5FA;
    --color-accent:         #F43F5E;
    --color-accent-hover:   #FB7185;

    --color-bg:             #0B0F1A;
    --color-bg-alt:         #111827;
    --color-bg-dots:        rgba(255, 255, 255, 0.04);
    --color-surface:        #1E293B;
    --color-surface-glass:  rgba(30, 41, 59, 0.85);
    --color-border:         #334155;

    --color-text:           #F1F5F9;
    --color-text-muted:     #94A3B8;
    --color-text-light:     #64748B;
    --color-text-inverse:   #0F172A;

    --color-success:        #34D399;
    --color-error:          #F87171;

    --glow-color:           rgba(59, 130, 246, 0.12);
    --glow-color-strong:    rgba(59, 130, 246, 0.22);

    --header-bg:            rgba(11, 15, 26, 0.88);
    --footer-bg:            #030712;
    --footer-text:          #64748B;
    --footer-heading:       #E2E8F0;
    --cta-bg:               #1E293B;
    --cta-text:             #F1F5F9;

    color-scheme: dark;
}

/* ── Design tokens (shared) ───────────────────────────────────────── */
:root {
    --radius-sm:            8px;
    --radius-md:            14px;
    --radius-lg:            22px;
    --radius-full:          999px;

    --shadow-sm:            0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md:            0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg:            0 20px 40px rgba(0, 0, 0, 0.12);
    --shadow-glow:          0 0 30px var(--glow-color);

    --container-max:        1240px;
    --container-narrow:     820px;

    --font-sans:            'Onest', -apple-system, BlinkMacSystemFont, "Segoe UI",
                            "Helvetica Neue", Arial, sans-serif;
    --font-body:            'Onest', -apple-system, BlinkMacSystemFont, "Segoe UI",
                            "Helvetica Neue", Arial, sans-serif;

    --transition:           180ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-theme:     350ms ease;
}

/* ── Google Fonts ─────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Onest:wght@400;500;600;700;800&display=swap');

/* ── Reset ─────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background var(--transition-theme), color var(--transition-theme);
}

img, svg { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: inherit; text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary); }
ul { list-style: none; padding: 0; margin: 0; }

h1, h2, h3, h4 {
    margin: 0 0 0.5em;
    line-height: 1.15;
    font-family: var(--font-sans);
    font-weight: 700;
    letter-spacing: -0.02em;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

/* ── Dot grid background ──────────────────────────────────────────── */

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(var(--color-bg-dots) 1.2px, transparent 1.2px);
    background-size: 20px 20px;
    pointer-events: none;
}

/* ── Layout ────────────────────────────────────────────────────────── */

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

.container--narrow { max-width: var(--container-narrow); }

.section { padding: 64px 0; }
.section--alt { background: var(--color-bg-alt); }

.section__title {
    font-size: clamp(28px, 4vw, 42px);
    text-align: center;
    margin-bottom: 12px;
    color: var(--color-text);
}

.section__lead {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 18px;
    margin-bottom: 48px;
}

@media (min-width: 768px) { .section { padding: 96px 0; } }

/* ── Header (glassmorphism) ───────────────────────────────────────── */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-bg);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid var(--color-border);
    transition: background var(--transition-theme), border-color var(--transition-theme);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    gap: 16px;
}

/* ── Logo ──────────────────────────────────────────────────────────── */

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-sans);
    font-weight: 800;
    font-size: 18px;
    letter-spacing: -0.02em;
}

.logo__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: var(--color-primary);
    color: var(--color-text-inverse);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
    transition: background var(--transition-theme);
}

.logo__text strong {
    color: var(--color-primary);
    transition: color var(--transition-theme);
}

.logo--light { color: var(--footer-heading); }
.logo--light .logo__text strong { color: var(--footer-heading); }

/* ── Nav ──────────────────────────────────────────────────────────── */

.nav {
    display: none;
    gap: 28px;
    font-weight: 500;
    font-size: 15px;
}

@media (min-width: 900px) { .nav { display: flex; } }

/* ── Header right (cart + theme) ──────────────────────────────────── */

.header__right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Theme Switcher ───────────────────────────────────────────────── */

.theme-switcher {
    position: relative;
}

.theme-switcher__btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--color-bg-alt);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
}

.theme-switcher__btn:hover {
    background: var(--color-primary);
    color: var(--color-text-inverse);
    border-color: var(--color-primary);
}

.theme-switcher__btn svg {
    width: 20px;
    height: 20px;
    transition: transform 0.4s ease;
}

.theme-switcher__btn:hover svg {
    transform: rotate(30deg);
}

.theme-switcher__panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 8px;
    min-width: 180px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition);
    z-index: 50;
}

.theme-switcher__panel.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-muted);
    transition: all var(--transition);
    cursor: pointer;
}

.theme-option:hover {
    background: var(--color-bg-alt);
    color: var(--color-text);
}

.theme-option.is-active {
    background: var(--color-primary);
    color: var(--color-text-inverse);
}

.theme-option__dot {
    width: 16px;
    height: 16px;
    border-radius: var(--radius-full);
    border: 2px solid var(--color-border);
    flex-shrink: 0;
}

.theme-option.is-active .theme-option__dot {
    border-color: var(--color-text-inverse);
}

/* ── Cart button ──────────────────────────────────────────────────── */

.cart-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: var(--color-bg-alt);
    color: var(--color-primary);
    transition: all var(--transition);
    border: 1px solid var(--color-border);
}

.cart-btn:hover {
    background: var(--color-primary);
    color: var(--color-text-inverse);
    border-color: var(--color-primary);
    transform: scale(1.05);
}

.cart-btn__count {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: var(--radius-full);
    background: var(--color-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--color-surface);
}

.cart-btn__count[data-empty="1"] { display: none; }

/* ── Buttons ───────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-full);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 16px;
    text-align: center;
    transition: all var(--transition);
    white-space: nowrap;
    cursor: pointer;
    border: 2px solid transparent;
}

.btn--primary {
    background: var(--color-primary);
    color: var(--color-text-inverse);
    box-shadow: var(--shadow-md);
}

.btn--primary:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    color: var(--color-text-inverse);
}

.btn--accent {
    background: var(--color-accent);
    color: #fff;
}

.btn--accent:hover {
    background: var(--color-accent-hover);
}

.btn--ghost {
    background: transparent;
    border-color: var(--color-border);
    color: var(--color-text);
}

.btn--ghost:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn--block { display: flex; width: 100%; }
.btn--small { padding: 8px 18px; font-size: 14px; }

.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: var(--color-bg-alt);
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
    border: 1px solid var(--color-border);
}

/* ── Hero ──────────────────────────────────────────────────────────── */

.hero {
    position: relative;
    overflow: hidden;
    background: var(--color-bg-alt);
    padding: 64px 0 80px;
    transition: background var(--transition-theme);
}

.hero__inner {
    position: relative;
    display: grid;
    gap: 60px;
    align-items: center;
}

@media (min-width: 900px) {
    .hero { padding: 100px 0 120px; }
    .hero__inner { grid-template-columns: 1.2fr 1fr; }
}

.hero__content { position: relative; z-index: 2; }

.hero__title {
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.05;
    margin-bottom: 24px;
}

.hero__title .highlight {
    color: var(--color-primary);
    transition: color var(--transition-theme);
}

.hero__subtitle {
    font-size: clamp(16px, 1.5vw, 20px);
    color: var(--color-text-muted);
    max-width: 540px;
    margin-bottom: 36px;
}

.hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 48px;
}

.hero__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-width: 480px;
}

.hero__stats > div { display: flex; flex-direction: column; }

.hero__stats strong {
    font-size: 28px;
    font-weight: 800;
    font-family: var(--font-sans);
    color: var(--color-primary);
    line-height: 1;
    transition: color var(--transition-theme);
}

.hero__stats span {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-top: 4px;
}

/* Hero decorative blobs */
.hero__visual {
    position: relative;
    height: 360px;
    display: none;
}

@media (min-width: 900px) { .hero__visual { display: block; } }

.hero__blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
    transition: background var(--transition-theme);
}

.blob-1 { width: 260px; height: 260px; background: var(--color-primary); top: 10%; left: 20%; }
.blob-2 { width: 220px; height: 220px; background: var(--color-accent); top: 30%; right: 5%; }
.blob-3 { width: 180px; height: 180px; background: var(--color-primary); bottom: 5%; left: 35%; opacity: 0.15; }

/* ── Features ──────────────────────────────────────────────────────── */

.features {
    display: grid;
    gap: 24px;
    grid-template-columns: 1fr;
}

@media (min-width: 640px)  { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .features { grid-template-columns: repeat(3, 1fr); } }

.feature {
    position: relative;
    background: var(--color-surface);
    padding: 32px 28px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    transition: all var(--transition);
    overflow: hidden;
    cursor: default;
}

.feature::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(300px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), var(--glow-color), transparent 60%);
    opacity: 0;
    transition: opacity var(--transition);
    pointer-events: none;
}

.feature:hover::before { opacity: 1; }

.feature:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
    border-color: var(--color-primary);
}

.feature__icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--color-bg-alt);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    color: var(--color-primary);
    transition: background var(--transition-theme), color var(--transition-theme);
}

.feature__icon svg {
    width: 24px;
    height: 24px;
}

.feature h3 {
    font-size: 19px;
    margin-bottom: 8px;
}

.feature p {
    color: var(--color-text-muted);
    font-size: 15px;
}

/* ── Tabs ──────────────────────────────────────────────────────────── */

.tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    background: var(--color-surface);
    padding: 4px;
    border-radius: var(--radius-full);
    margin: 0 auto 40px;
    max-width: 480px;
    border: 1px solid var(--color-border);
}

.tab {
    flex: 1;
    padding: 12px 20px;
    border-radius: var(--radius-full);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 15px;
    color: var(--color-text-muted);
    transition: all var(--transition);
    white-space: nowrap;
}

.tab.is-active {
    background: var(--color-primary);
    color: var(--color-text-inverse);
    box-shadow: var(--shadow-md);
}

/* ── Catalog / Products ───────────────────────────────────────────── */

.catalog { min-height: 200px; }

.catalog__loader {
    text-align: center;
    color: var(--color-text-muted);
    padding: 60px 0;
}

.products {
    display: grid;
    gap: 24px;
    grid-template-columns: 1fr;
}

@media (min-width: 600px)  { .products { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px)  { .products { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .products { grid-template-columns: repeat(4, 1fr); } }

.product {
    position: relative;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all var(--transition);
    cursor: pointer;
}

/* Glow on hover */
.product::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(250px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), var(--glow-color-strong), transparent 50%);
    opacity: 0;
    transition: opacity var(--transition);
    pointer-events: none;
    z-index: 1;
}

.product:hover::before { opacity: 1; }

.product:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-glow);
    border-color: var(--color-primary);
}

.product__image {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--color-bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 2;
    transition: background var(--transition-theme);
}

.product__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 16px;
    transition: transform 0.3s ease;
}

.product:hover .product__image img {
    transform: scale(1.06);
}

.product__color {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    border: 3px solid var(--color-surface);
    box-shadow: var(--shadow-md);
    z-index: 3;
}

.product__body {
    position: relative;
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
    z-index: 2;
}

.product__category {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--color-text-light);
    font-weight: 600;
}

.product__title {
    font-size: 16px;
    font-weight: 700;
    font-family: var(--font-sans);
    color: var(--color-text);
    line-height: 1.3;
    margin: 0;
}

.product__subtitle {
    color: var(--color-text-muted);
    font-size: 14px;
}

.product__footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    gap: 12px;
}

.product__price {
    font-size: 22px;
    font-weight: 800;
    font-family: var(--font-sans);
    color: var(--color-text);
    white-space: nowrap;
}

/* ── Delivery ─────────────────────────────────────────────────────── */

.delivery-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: 1fr;
    margin-bottom: 56px;
}

@media (min-width: 768px) { .delivery-grid { grid-template-columns: repeat(3, 1fr); } }

.delivery-card {
    position: relative;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    text-align: center;
    transition: all var(--transition);
    overflow: hidden;
}

.delivery-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(250px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), var(--glow-color), transparent 60%);
    opacity: 0;
    transition: opacity var(--transition);
    pointer-events: none;
}

.delivery-card:hover::before { opacity: 1; }

.delivery-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
    border-color: var(--color-primary);
}

.delivery-card__icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    background: var(--color-bg-alt);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--color-primary);
}

.delivery-card__icon svg { width: 28px; height: 28px; }

.delivery-card h3 { font-size: 20px; margin-bottom: 8px; }

.delivery-card p {
    color: var(--color-text-muted);
    font-size: 14px;
    margin-bottom: 16px;
}

.delivery-card__price {
    display: inline-block;
    padding: 8px 18px;
    background: var(--color-bg-alt);
    color: var(--color-primary);
    font-weight: 700;
    border-radius: var(--radius-full);
}

.payment-info {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 32px;
    border: 1px solid var(--color-border);
}

.payment-info h3 { margin-bottom: 16px; }

.payment-info ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
    color: var(--color-text-muted);
}

.payment-info li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.payment-info li svg {
    width: 20px;
    height: 20px;
    color: var(--color-primary);
    flex-shrink: 0;
}

/* ── FAQ ──────────────────────────────────────────────────────────── */

.faq {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq__item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 18px 24px;
    transition: all var(--transition);
}

.faq__item[open] {
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
}

.faq__item summary {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 17px;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.faq__item summary::-webkit-details-marker { display: none; }

.faq__item summary::after {
    content: '+';
    font-size: 24px;
    font-weight: 300;
    color: var(--color-primary);
    transition: transform var(--transition);
    flex-shrink: 0;
}

.faq__item[open] summary::after { content: '\2212'; }

.faq__item p {
    margin-top: 14px;
    color: var(--color-text-muted);
}

/* ── CTA ──────────────────────────────────────────────────────────── */

.cta-block {
    padding: 64px 0;
    background: var(--cta-bg);
    color: var(--cta-text);
    transition: background var(--transition-theme);
}

.cta-block__inner {
    display: grid;
    gap: 32px;
    align-items: center;
}

@media (min-width: 768px) { .cta-block__inner { grid-template-columns: 1.2fr 1fr; } }

.cta-block h2 {
    font-size: clamp(26px, 3vw, 36px);
    margin-bottom: 12px;
    color: inherit;
}

.cta-block p { opacity: 0.85; font-size: 17px; }

.cta-block__contacts {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cta-block__contacts a {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
    font-weight: 600;
    transition: all var(--transition);
    color: inherit;
}

.cta-block__contacts a:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateX(4px);
    color: inherit;
}

/* ── Footer ───────────────────────────────────────────────────────── */

.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 64px 0 24px;
    transition: background var(--transition-theme), color var(--transition-theme);
}

.footer__grid {
    display: grid;
    gap: 40px;
    grid-template-columns: 1fr;
    margin-bottom: 48px;
}

@media (min-width: 600px) { .footer__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }

.footer__about {
    color: var(--footer-text);
    font-size: 14px;
    margin-top: 16px;
    max-width: 320px;
}

.site-footer h4 {
    color: var(--footer-heading);
    font-family: var(--font-sans);
    font-size: 15px;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.site-footer ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 14px;
}

.site-footer ul a:hover { color: var(--color-primary); }

.footer__bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: space-between;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 13px;
}

/* ── Cart Drawer ──────────────────────────────────────────────────── */

.cart-drawer {
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
    visibility: hidden;
    transition: visibility var(--transition);
}

.cart-drawer.is-open {
    pointer-events: auto;
    visibility: visible;
}

.cart-drawer__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    transition: opacity var(--transition);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.cart-drawer.is-open .cart-drawer__overlay { opacity: 1; }

.cart-drawer__panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 420px;
    height: 100%;
    background: var(--color-surface);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.15);
}

.cart-drawer.is-open .cart-drawer__panel { transform: translateX(0); }

.cart-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border);
}

.cart-drawer__header h3 { margin: 0; font-size: 20px; }

.cart-drawer__header button {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--color-bg-alt);
    color: var(--color-text-muted);
    font-size: 18px;
    transition: all var(--transition);
}

.cart-drawer__header button:hover {
    background: var(--color-error);
    color: #fff;
}

.cart-drawer__body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
}

.cart-drawer__empty {
    text-align: center;
    color: var(--color-text-light);
    padding: 60px 0;
}

.cart-item {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--color-border);
}

.cart-item__image {
    width: 64px; height: 64px;
    border-radius: var(--radius-sm);
    background: var(--color-bg-alt);
    overflow: hidden;
}

.cart-item__image img {
    width: 100%; height: 100%;
    object-fit: contain;
    padding: 4px;
}

.cart-item__info { min-width: 0; }

.cart-item__title {
    font-size: 14px; font-weight: 600;
    line-height: 1.3; margin-bottom: 6px;
    overflow: hidden; text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.cart-item__qty {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--color-bg-alt);
    padding: 4px;
    border-radius: var(--radius-full);
}

.cart-item__qty button {
    width: 24px; height: 24px;
    border-radius: var(--radius-full);
    background: var(--color-surface);
    color: var(--color-primary);
    font-weight: 700; font-size: 14px;
    transition: all var(--transition);
}

.cart-item__qty button:hover {
    background: var(--color-primary);
    color: var(--color-text-inverse);
}

.cart-item__qty span {
    min-width: 20px; text-align: center;
    font-weight: 600; font-size: 14px;
}

.cart-item__side {
    display: flex; flex-direction: column;
    align-items: flex-end; justify-content: space-between;
    gap: 8px;
}

.cart-item__price { font-weight: 700; font-size: 14px; white-space: nowrap; }

.cart-item__remove {
    color: var(--color-text-light);
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
}

.cart-item__remove:hover { color: var(--color-error); }

.cart-drawer__footer {
    border-top: 1px solid var(--color-border);
    padding: 20px 24px 24px;
}

.cart-drawer__total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 16px;
}

.cart-drawer__total strong {
    font-size: 24px;
    font-family: var(--font-sans);
    color: var(--color-primary);
}

.cart-drawer__footer .btn:disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* ── Toast ─────────────────────────────────────────────────────────── */

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--color-text);
    color: var(--color-bg);
    padding: 14px 24px;
    border-radius: var(--radius-full);
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transition: all 0.25s ease;
    z-index: 300;
    pointer-events: none;
}

.toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ── Reduced motion ───────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}
