/* ============================================
   BASE STYLES — Cremniy Design System v2
   Reset, Design Tokens, Typography, Utilities
   ============================================ */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {
    /* Colors — Dark Theme (Default) */
    --bg-primary: #09090B;
    --bg-secondary: #0F0F12;
    --bg-tertiary: #17171C;
    --bg-elevated: #1C1C22;
    --text-primary: #FAFAFA;
    --text-secondary: #A1A1AA;
    --text-muted: #71717A;
    --accent: #FAFAFA;
    --accent-hover: #D4D4D8;
    --accent-color: #6366F1;
    --accent-color-hover: #4F46E5;
    --accent-color-subtle: rgba(99, 102, 241, 0.12);
    --border-color: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --border-subtle: rgba(255, 255, 255, 0.04);

    /* Light Theme values */
    --light-bg-primary: #FFFFFF;
    --light-bg-secondary: #FAFAFA;
    --light-bg-tertiary: #F4F4F5;
    --light-bg-elevated: #FFFFFF;
    --light-text-primary: #09090B;
    --light-text-secondary: #71717A;
    --light-text-muted: #A1A1AA;
    --light-accent: #09090B;
    --light-accent-hover: #27272A;
    --light-accent-color: #6366F1;
    --light-accent-color-hover: #4F46E5;
    --light-accent-color-subtle: rgba(99, 102, 241, 0.08);
    --light-border-color: rgba(0, 0, 0, 0.06);
    --light-border-hover: rgba(0, 0, 0, 0.12);
    --light-border-subtle: rgba(0, 0, 0, 0.03);

    /* Semantic Colors */
    --color-success: #22C55E;
    --color-success-subtle: rgba(34, 197, 94, 0.12);
    --color-warning: #EAB308;
    --color-warning-subtle: rgba(234, 179, 8, 0.12);
    --color-error: #EF4444;
    --color-error-subtle: rgba(239, 68, 68, 0.12);
    --color-info: #6366F1;
    --color-info-subtle: rgba(99, 102, 241, 0.12);

    /* Spacing — 4px base rhythm */
    --space-1: 0.25rem;   /* 4px */
    --space-2: 0.5rem;    /* 8px */
    --space-3: 0.75rem;   /* 12px */
    --space-4: 1rem;      /* 16px */
    --space-5: 1.25rem;   /* 20px */
    --space-6: 1.5rem;    /* 24px */
    --space-8: 2rem;      /* 32px */
    --space-10: 2.5rem;   /* 40px */
    --space-12: 3rem;     /* 48px */
    --space-16: 4rem;     /* 64px */
    --space-20: 5rem;     /* 80px */

    /* Legacy spacing aliases (for compatibility) */
    --space-xs: var(--space-2);
    --space-sm: var(--space-4);
    --space-md: var(--space-8);
    --space-lg: var(--space-6);
    --space-xl: var(--space-12);

    /* Typography Scale */
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.8125rem;
    --font-size-base: 0.875rem;
    --font-size-lg: 1rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.5rem;
    --font-size-5xl: 3rem;

    /* Radius Scale */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Shadow Scale */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25), 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.3), 0 4px 8px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.35), 0 8px 16px rgba(0, 0, 0, 0.25);

    /* Transitions */
    --transition-fast: 0.12s cubic-bezier(0.22, 1, 0.36, 1);
    --transition-base: 0.2s cubic-bezier(0.22, 1, 0.36, 1);
    --transition-slow: 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Light Theme Override */
[data-theme="light"] {
    --bg-primary: var(--light-bg-primary);
    --bg-secondary: var(--light-bg-secondary);
    --bg-tertiary: var(--light-bg-tertiary);
    --bg-elevated: var(--light-bg-elevated);
    --text-primary: var(--light-text-primary);
    --text-secondary: var(--light-text-secondary);
    --text-muted: var(--light-text-muted);
    --accent: var(--light-accent);
    --accent-hover: var(--light-accent-hover);
    --accent-color: var(--light-accent-color);
    --accent-color-hover: var(--light-accent-color-hover);
    --accent-color-subtle: var(--light-accent-color-subtle);
    --border-color: var(--light-border-color);
    --border-hover: var(--light-border-hover);
    --border-subtle: var(--light-border-subtle);
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08), 0 4px 8px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.06);
}

/* ============================================
   BASE STYLES
   ============================================ */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.55;
    font-size: var(--font-size-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    transition: background-color var(--transition-base), color var(--transition-base);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-6);
    overflow-x: hidden;
    width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button {
    font-family: inherit;
}

/* ============================================
   UTILITIES
   ============================================ */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-20) 0;
    gap: var(--space-4);
}

.spinner {
    width: 32px;
    height: 32px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.spin {
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

.loading-spinner p {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

.no-products {
    text-align: center;
    padding: var(--space-20) 0;
    color: var(--text-secondary);
}

.no-products i {
    font-size: var(--font-size-3xl);
    color: var(--text-muted);
    margin-bottom: var(--space-4);
    display: block;
}

.no-products h3 {
    font-size: var(--font-size-xl);
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.no-products p {
    font-size: var(--font-size-base);
    color: var(--text-muted);
}

.hidden {
    display: none !important;
}

/* ============================================
   NOTIFICATION TOAST (non-blocking)
   ============================================ */
.notification-gate {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.notification-gate.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.notification-gate.notification-gate--fallback {
    align-items: flex-end;
    justify-content: flex-end;
    background: transparent;
    padding: var(--space-4);
    pointer-events: none;
}
.notification-gate__content {
    text-align: center;
    max-width: 380px;
    padding: var(--space-10);
    background: transparent;
}
.notification-gate__icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-6);
    background: var(--accent-color-subtle);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    color: var(--accent-color);
}
.notification-gate__title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
    letter-spacing: -0.02em;
}
.notification-gate__text {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-8);
}
.notification-gate__btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    background: var(--accent-color);
    border: none;
    border-radius: var(--radius-md);
    color: #fff;
    font-size: var(--font-size-base);
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast);
}
.notification-gate__btn:hover {
    background: var(--accent-color-hover);
}
.notification-gate__btn:active {
    transform: scale(0.98);
}
.notification-gate__hint {
    margin-top: var(--space-4);
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    min-height: 20px;
}
.notification-gate__hint.error {
    color: var(--color-error);
}
.notification-gate--fallback .notification-gate__content {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: var(--space-6);
    width: min(400px, 100%);
    pointer-events: auto;
}
.notification-gate--fallback .notification-gate__icon {
    display: none;
}
.notification-gate--fallback .notification-gate__title {
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-2);
}
.notification-gate--fallback .notification-gate__text {
    margin-bottom: var(--space-4);
}
.notification-gate--fallback .notification-gate__btn {
    width: 100%;
    justify-content: center;
}

/* ============================================
   TOAST NOTIFICATIONS (JS uses these classes)
   ============================================ */
.notification {
    position: fixed;
    top: var(--space-4);
    right: var(--space-4);
    z-index: 100000;
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 500;
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    max-width: 360px;
}
.notification-success { border-left: 3px solid var(--color-success); }
.notification-error { border-left: 3px solid var(--color-error); }
.notification-warning { border-left: 3px solid var(--color-warning); }
.notification-info { border-left: 3px solid var(--color-info); }

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
/* ============================================
   HEADER & NAVIGATION — v2 Minimal
   ============================================ */

.header {
    background-color: rgba(9, 9, 11, 0.85);
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
}

[data-theme="light"] .header {
    background-color: rgba(255, 255, 255, 0.85);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    gap: var(--space-4);
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.mobile-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1.1rem;
    transition: all var(--transition-fast);
}

.mobile-menu-toggle:hover {
    background: var(--bg-secondary);
    border-color: var(--border-hover);
}

.mobile-menu-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1.1rem;
    transition: all var(--transition-fast);
}

.mobile-menu-close:hover {
    background: var(--bg-secondary);
    border-color: var(--border-hover);
}

body.mobile-nav-open {
    overflow: hidden;
}

.mobile-navigation {
    display: none;
}

.mobile-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
    z-index: 150;
    visibility: hidden;
}

body.mobile-nav-open .mobile-nav-backdrop {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

/* Logo */
.logo h1 {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    text-transform: lowercase;
    margin: 0;
}

/* Navigation */
.navigation ul {
    display: flex;
    list-style: none;
    gap: var(--space-6);
    margin: 0;
    padding: 0;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: var(--font-size-sm);
    transition: color var(--transition-fast);
    cursor: pointer;
    position: relative;
    letter-spacing: 0.02em;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--accent-color);
    transition: width var(--transition-base);
    border-radius: 1px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link.active::after,
.nav-link:hover::after {
    width: 100%;
}

/* Header Actions */
.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.cabinet-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    background: transparent;
    color: var(--text-muted);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--transition-fast);
    border: 1px solid var(--border-color);
    font-size: 1rem;
    padding: 0 10px;
    white-space: nowrap;
    gap: var(--space-2);
}

.cabinet-link__name {
    display: none;
    font-weight: 500;
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    margin-left: 6px;
}

.cabinet-link.has-name {
    width: auto;
    padding: 0 12px;
}

.cabinet-link.has-name .cabinet-link__name {
    display: inline;
}

.install-pwa-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    color: var(--text-muted);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    border: 1px solid var(--border-color);
    font-size: 1rem;
    cursor: pointer;
    padding: 0;
}

.install-pwa-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.install-pwa-btn.hidden {
    display: none;
}

.cabinet-link:hover,
.cabinet-link.active {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

/* Search */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
}

.search-input {
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 7px 14px 7px 34px;
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    width: 220px;
    transition: all var(--transition-fast);
    font-weight: 400;
    font-family: inherit;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: var(--bg-secondary);
    box-shadow: 0 0 0 3px var(--accent-color-subtle);
}

.search-input::placeholder {
    color: var(--text-muted);
}

/* Theme Toggle */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    padding: 0;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    border-color: var(--border-hover);
}

/* Cart Button */
.cart-button {
    background-color: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    padding: 7px 14px;
    font-weight: 500;
    font-size: var(--font-size-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-fast);
    height: 36px;
    font-family: inherit;
}

.cart-button i {
    font-size: 1.05rem;
}

.cart-button:hover {
    background-color: var(--accent-color-hover);
}

.cart-button:active {
    transform: scale(0.97);
}

.cart-count {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: var(--radius-full);
    padding: 0 5px;
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    display: inline-block;
}
/* ============================================
   HERO BANNER — v2 Compact Minimal
   ============================================ */

.hero {
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-16) 0 var(--space-12);
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border-subtle);
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 20% 40%, var(--accent-color-subtle) 0%, transparent 70%),
        radial-gradient(ellipse 40% 60% at 80% 60%, rgba(139, 92, 246, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

[data-theme="light"] .hero::before {
    background:
        radial-gradient(ellipse 60% 50% at 20% 40%, rgba(99, 102, 241, 0.05) 0%, transparent 70%),
        radial-gradient(ellipse 40% 60% at 80% 60%, rgba(139, 92, 246, 0.04) 0%, transparent 70%);
}

.hero-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 var(--space-6);
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: var(--space-4);
    text-transform: lowercase;
}

.hero-title .accent-word {
    color: var(--accent-color);
}

.hero-line {
    width: 40px;
    height: 2px;
    background: var(--accent-color);
    margin: var(--space-6) auto;
    border-radius: 1px;
    opacity: 0.6;
}

.hero-subtitle {
    font-size: var(--font-size-base);
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-10);
    text-transform: uppercase;
}

.hero-btn {
    padding: var(--space-3) var(--space-8);
    font-size: var(--font-size-base);
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    letter-spacing: 0.01em;
    background: var(--accent-color);
    color: #fff;
    border: none;
    font-family: inherit;
}

.hero-btn:hover {
    background: var(--accent-color-hover);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.25);
}

.hero-btn:active {
    transform: scale(0.97);
}

/* ============================================
   RESPONSIVE — Hero
   ============================================ */
@media (max-width: 1024px) {
    .hero {
        min-height: 35vh;
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: 30vh;
        padding: var(--space-12) 0 var(--space-10);
    }

    .hero-container {
        padding: 0 var(--space-6);
    }

    .hero-subtitle {
        font-size: var(--font-size-sm);
        margin-bottom: var(--space-8);
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 28vh;
        padding: var(--space-10) 0 var(--space-8);
    }

    .hero-btn {
        width: 100%;
        max-width: 260px;
    }
}
/* ============================================
   LAYOUT & SECTIONS — v2
   ============================================ */

.main {
    padding: var(--space-12) 0;
    min-height: calc(100vh - 80px);
    overflow-x: hidden;
}

.section-header {
    text-align: left;
    margin-bottom: var(--space-8);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-4);
}

.section-title {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    margin-bottom: var(--space-2);
    color: var(--text-primary);
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.section-description {
    font-size: var(--font-size-base);
    color: var(--text-muted);
    font-weight: 400;
}

.home-section {
    margin-bottom: var(--space-16);
}

.show-all-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: var(--font-size-xs);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-family: inherit;
}

.show-all-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.show-all-btn i {
    transition: transform var(--transition-fast);
    font-size: 0.85em;
}

.show-all-btn:hover i {
    transform: translateX(3px);
}
/* ============================================
   PRODUCTS — Grid, Carousel, Cards — v2 Minimal
   ============================================ */

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-12);
}

.products-carousel {
    display: flex;
    gap: var(--space-4);
    overflow-x: auto;
    padding: var(--space-2) 0 var(--space-6);
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x proximity;
}

.products-carousel::-webkit-scrollbar {
    display: none;
}

.products-carousel .product-card {
    flex: 0 0 240px;
    min-width: 240px;
    scroll-snap-align: start;
}

/* ============================================
   PRODUCT CARD — Clean Minimal
   ============================================ */
.product-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 100%;
}

.product-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.product-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.product-card:hover .product-image {
    transform: scale(1.03);
}

.product-info {
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    flex: 1;
}

.product-meta {
    display: flex;
    align-items: center;
    gap: 6px;
}

.product-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    background: var(--bg-tertiary);
    color: var(--text-muted);
    font-size: var(--font-size-xs);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 600;
}

.product-chip--accent {
    background: var(--accent-color-subtle);
    color: var(--accent-color);
}

.product-chip--hot {
    background: rgba(239, 68, 68, 0.12);
    color: #EF4444;
    animation: pulse-chip 2s ease-in-out infinite;
}

.product-chip--new {
    background: rgba(34, 197, 94, 0.12);
    color: #22C55E;
}

.product-stock-hint {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #EF4444;
    margin-top: 2px;
    animation: pulse-text 2.5s ease-in-out infinite;
}

.product-stock-hint i {
    font-size: 12px;
}

@keyframes pulse-chip {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes pulse-text {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.product-title {
    font-size: var(--font-size-base);
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    margin: 0;
    line-height: 1.4;
}

/* Sizes — compact pills */
.product-sizes {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.size-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.size-options {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    touch-action: pan-x;
}

.size-options::-webkit-scrollbar {
    display: none;
}

.size-option {
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
    text-align: center;
    min-width: 36px;
    user-select: none;
    background: transparent;
    font-family: inherit;
    position: relative;
}

.size-option:hover:not(.unavailable):not(.selected) {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: var(--accent-color-subtle);
}

.size-option.selected {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-color-subtle), 0 2px 8px rgba(99, 102, 241, 0.3);
    transform: scale(1.08);
    font-weight: 700;
}

.size-option.unavailable {
    opacity: 0.2;
    cursor: not-allowed;
    text-decoration: line-through;
    pointer-events: none;
}

.size-option.low-stock:not(.unavailable):not(.selected) {
    border-color: rgba(239, 68, 68, 0.4);
    color: var(--color-error, #EF4444);
}

.product-footer {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-top: auto;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: var(--space-2);
}

.current-price {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.current-price.discount {
    color: var(--accent-color);
}

.old-price {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    text-decoration: line-through;
    font-weight: 400;
}

/* Add to Cart — ghost button style */
.add-to-cart-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    width: 100%;
    font-family: inherit;
}

.add-to-cart-btn:hover:not(:disabled) {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}

.add-to-cart-btn:active:not(:disabled) {
    transform: scale(0.97);
}

.add-to-cart-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ============================================
   ANIMATIONS
   ============================================ */
.fade-in {
    animation: fadeInUp 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* ============================================
   MODALS & OVERLAYS — v2 Minimal
   ============================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--space-4);
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="light"] .modal {
    background-color: var(--bg-primary);
    box-shadow: var(--shadow-xl);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--border-subtle);
}

.modal-header h3 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.modal-close {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    font-size: var(--font-size-sm);
    flex-shrink: 0;
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.modal-body {
    padding: var(--space-6);
}

.modal-footer {
    padding: var(--space-4) var(--space-6);
    border-top: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

/* ============================================
   CART MODAL
   ============================================ */

.cart-items {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.cart-item {
    display: flex;
    gap: var(--space-4);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--border-subtle);
    align-items: flex-start;
}

.cart-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.cart-item-info h4 {
    font-size: var(--font-size-base);
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
}

.cart-item-info p {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin: 0;
}

.cart-item-image {
    width: 72px;
    height: 72px;
    object-fit: cover;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.cart-item-title {
    font-size: var(--font-size-base);
    font-weight: 500;
    color: var(--text-primary);
}

.cart-item-size {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.cart-item-price {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--text-primary);
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.quantity-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast);
    font-size: var(--font-size-base);
    font-family: inherit;
}

.quantity-btn:hover {
    background: var(--bg-tertiary);
}

.quantity-value,
.quantity {
    min-width: 28px;
    text-align: center;
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    font-weight: 500;
}

.remove-item-btn,
.remove-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    font-size: 0.8rem;
}

.remove-item-btn:hover,
.remove-btn:hover {
    background: var(--color-error-subtle);
    color: var(--color-error);
    border-color: transparent;
}

.cart-empty {
    text-align: center;
    padding: var(--space-10) 0;
    color: var(--text-muted);
}

.cart-empty i {
    font-size: var(--font-size-3xl);
    color: var(--text-muted);
    margin-bottom: var(--space-4);
    opacity: 0.4;
    display: block;
}

.cart-empty p {
    font-size: var(--font-size-base);
    color: var(--text-muted);
    margin: 0;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4) 0;
    border-top: 1px solid var(--border-subtle);
    margin-top: var(--space-4);
}

.cart-total span,
.cart-total-label {
    font-size: var(--font-size-base);
    color: var(--text-muted);
}

.cart-total strong,
.cart-total-value {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.checkout-btn,
.checkout-button {
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-6);
    font-size: var(--font-size-base);
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.checkout-btn:hover,
.checkout-button:hover {
    background: var(--accent-color-hover);
}

.checkout-btn:active,
.checkout-button:active {
    transform: scale(0.98);
}

/* ============================================
   SIZE SELECTION
   ============================================ */

.modal .size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: var(--space-4) 0;
}

.modal .size-option {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
    min-width: 48px;
    user-select: none;
    font-family: inherit;
}

.modal .size-option:hover:not(.unavailable) {
    border-color: var(--accent-color);
    background: var(--accent-color-subtle);
}

.modal .size-option.selected {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}

.modal .size-option.unavailable {
    opacity: 0.25;
    cursor: not-allowed;
    text-decoration: line-through;
}

.confirm-size-btn {
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-6);
    font-size: var(--font-size-base);
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    transition: all var(--transition-fast);
    margin-top: var(--space-4);
    font-family: inherit;
}

.confirm-size-btn:hover:not(:disabled) {
    background: var(--accent-color-hover);
}

.confirm-size-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.confirm-size-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ============================================
   VIBER MODAL
   ============================================ */

#viberModal {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    z-index: 10000;
    padding: var(--space-4);
}

#viberModal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.viber-modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    max-width: 400px;
    width: 100%;
    text-align: center;
    padding: var(--space-8);
    position: relative;
    animation: modalSlideIn 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="light"] .viber-modal-content {
    background: var(--bg-primary);
    box-shadow: var(--shadow-xl);
}

.viber-modal-content .modal-close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
}

.viber-modal-header {
    margin-bottom: var(--space-4);
}

.viber-modal-icon {
    width: 64px;
    height: 64px;
    background: var(--accent-color);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-4);
    font-size: 1.75rem;
    color: #fff;
}

.viber-modal-header h3 {
    font-size: var(--font-size-xl);
    margin: 0;
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.viber-modal-text {
    color: var(--text-muted);
    margin-bottom: var(--space-6);
    line-height: 1.6;
    font-size: var(--font-size-base);
}

.viber-phone-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-bottom: var(--space-6);
}

.viber-phone-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--accent-color);
    color: #fff;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-size: var(--font-size-lg);
    font-weight: 600;
    transition: all var(--transition-fast);
}

.viber-phone-btn:hover {
    background: var(--accent-color-hover);
}

.viber-phone-btn i {
    font-size: 1.2rem;
}

.compact-viber-list {
    margin-top: var(--space-2);
}

.viber-instructions {
    text-align: left;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    padding: var(--space-5) var(--space-6);
    margin-bottom: var(--space-6);
}

.viber-instructions h4 {
    margin: 0 0 var(--space-3) 0;
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

.viber-instructions ol {
    margin: 0;
    padding-left: 18px;
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: var(--font-size-base);
}

.viber-instructions li {
    margin-bottom: 2px;
}

.viber-ok-btn {
    width: 100%;
    background: var(--accent);
    color: var(--bg-primary);
    border: none;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.viber-ok-btn:hover {
    opacity: 0.9;
}

.request-account-btn {
    background: var(--accent-color);
    color: #fff;
    border: none;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.request-account-btn:hover {
    background: var(--accent-color-hover);
}
/* ============================================
   ORDER MODAL — v2 Minimal
   ============================================ */

.order-modal {
    max-width: 560px;
}

.order-section {
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-6);
    border-bottom: 1px solid var(--border-subtle);
}

.order-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.order-section .section-title {
    font-size: var(--font-size-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: var(--space-5);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.order-section .section-title i {
    font-size: var(--font-size-base);
    color: var(--text-muted);
}

/* ============================================
   FORM FIELDS
   ============================================ */

.form-group {
    margin-bottom: var(--space-4);
}

.form-group label {
    display: block;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: var(--font-size-base);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    font-family: inherit;
    height: 42px;
}

.form-group textarea {
    height: auto;
    min-height: 80px;
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-color-subtle);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.name-fields {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
}

.form-elements-shifted {
    opacity: 0.4;
    pointer-events: none;
}

/* ============================================
   ADDRESS AUTOCOMPLETE
   ============================================ */

.address-autocomplete-container {
    position: relative;
}

.address-autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--bg-elevated, var(--bg-secondary));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-top: var(--space-1);
    max-height: 240px;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    display: none;
}

.autocomplete-loading {
    padding: var(--space-4);
    text-align: center;
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

.autocomplete-results {
    padding: var(--space-1);
}

.autocomplete-item {
    padding: var(--space-3) var(--space-4);
    cursor: pointer;
    transition: background var(--transition-fast);
    border-radius: var(--radius-sm);
}

.autocomplete-item:hover {
    background: var(--bg-tertiary);
}

.autocomplete-item-title {
    font-size: var(--font-size-base);
    font-weight: 500;
    color: var(--text-primary);
}

.autocomplete-item-address {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-top: 2px;
}

.form-help {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    margin-top: var(--space-1);
}

/* ============================================
   ORDER TYPE OPTIONS
   ============================================ */

.order-type-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
}

.order-type-option {
    position: relative;
}

.order-type-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.order-type-label {
    display: block;
    padding: var(--space-4);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    cursor: pointer;
    transition: all var(--transition-fast);
    height: 100%;
}

.order-type-label:hover {
    border-color: var(--border-hover);
}

.order-type-option input:checked + .order-type-label {
    border-color: var(--accent-color);
    background: var(--accent-color-subtle);
}

.order-type-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
}

.order-type-header i {
    color: var(--accent-color);
    font-size: var(--font-size-lg);
}

.order-type-title {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--text-primary);
}

.order-type-description {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    line-height: 1.5;
}

.order-type-option--error .order-type-label {
    border-color: var(--color-error);
    animation: orderTypeShake 0.4s ease;
}

@keyframes orderTypeShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-4px); }
    40% { transform: translateX(4px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(3px); }
}

/* Also support old animation name */
@keyframes order-type-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-4px); }
    40% { transform: translateX(4px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(3px); }
}

/* ============================================
   NOTIFICATIONS & WARNINGS
   ============================================ */

.notification-warning {
    background: var(--color-warning-subtle);
    border: 1px solid rgba(234, 179, 8, 0.2);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.notification-warning i {
    color: var(--color-warning);
    font-size: var(--font-size-lg);
    flex-shrink: 0;
    margin-top: 1px;
}

.notification-warning span {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: 1.5;
}

.notification-request-btn {
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    padding: var(--space-2) var(--space-4);
    font-size: var(--font-size-sm);
    font-weight: 500;
    cursor: pointer;
    margin-top: var(--space-3);
    transition: all var(--transition-fast);
    font-family: inherit;
}

.notification-request-btn:hover {
    background: var(--accent-color-hover);
}

.notification-status {
    background: var(--color-success-subtle);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--font-size-sm);
    color: var(--color-success);
    font-weight: 500;
}

.notification-status.hidden {
    display: none;
}

.notification-status i {
    font-size: var(--font-size-lg);
}

.notification-fallback {
    margin-top: var(--space-3);
}

.notification-fallback.hidden {
    display: none;
}

.notification-fallback-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    cursor: pointer;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.notification-fallback-toggle input {
    accent-color: var(--accent-color);
    width: 16px;
    height: 16px;
}

.notification-fallback-hint {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    margin-top: var(--space-2);
    padding-left: 28px;
}

/* ============================================
   ORDER SUMMARY
   ============================================ */

.order-summary {
    margin-top: var(--space-4);
}

.order-item {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-3) 0;
    align-items: center;
}

.order-item-image {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--bg-tertiary);
    flex-shrink: 0;
}

.order-item-details {
    flex: 1;
    min-width: 0;
}

.order-item-name {
    font-size: var(--font-size-base);
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-item-size {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

.order-item-quantity {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

.order-item-price {
    font-weight: 600;
    font-size: var(--font-size-base);
    color: var(--text-primary);
    text-align: right;
    white-space: nowrap;
}

.order-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-subtle);
    margin-top: var(--space-4);
}

.order-total span {
    font-size: var(--font-size-base);
    color: var(--text-muted);
}

.order-total strong {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

/* ============================================
   MODAL FOOTER BUTTONS
   ============================================ */

.order-modal .modal-footer {
    flex-direction: row;
    gap: var(--space-3);
}

.modal-footer .btn-secondary {
    flex: 1;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.modal-footer .btn-secondary:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.modal-footer .btn-primary {
    flex: 1;
    background: var(--accent-color);
    color: #fff;
    border: none;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    font-family: inherit;
}

.modal-footer .btn-primary:hover {
    background: var(--accent-color-hover);
}

.modal-footer .btn-primary:active,
.modal-footer .btn-secondary:active {
    transform: scale(0.98);
}

.modal-footer .btn-primary i {
    font-size: var(--font-size-sm);
}

/* ============================================
   RESPONSIVE — Order Modal
   ============================================ */

@media (max-width: 640px) {
    .name-fields {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .order-type-options {
        grid-template-columns: 1fr;
    }

    .order-modal .modal-footer {
        flex-direction: column;
    }

    .modal-footer .btn-secondary,
    .modal-footer .btn-primary {
        width: 100%;
    }
}

/* ============================================
   THEME OVERRIDES
   ============================================ */

[data-theme="light"] .notification-warning {
    background: rgba(234, 179, 8, 0.06);
    border-color: rgba(234, 179, 8, 0.15);
}

[data-theme="light"] .notification-status {
    background: rgba(34, 197, 94, 0.06);
    border-color: rgba(34, 197, 94, 0.15);
}

[data-theme="light"] .form-group input,
[data-theme="light"] .form-group select,
[data-theme="light"] .form-group textarea {
    background: var(--bg-tertiary);
}

[data-theme="light"] .order-type-label {
    background: var(--bg-secondary);
}
/* ============================================
   RECIPIENT MATCHING — v2 (uses design tokens)
   ============================================ */

.match-result {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    margin-top: var(--space-4);
    animation: slideDown 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.match-status {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 600;
    font-size: var(--font-size-base);
    margin-bottom: var(--space-3);
}

.match-score {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    font-weight: 400;
    margin-left: auto;
}

/* New recipient */
.match-new {
    color: var(--accent-color);
}

.match-new i {
    color: var(--accent-color);
}

/* Auto match / success */
.match-success,
.match-auto {
    color: var(--color-success);
}

.match-success i,
.match-auto i {
    color: var(--color-success);
}

/* Needs review */
.match-review {
    color: var(--color-warning);
}

.match-review i {
    color: var(--color-warning);
}

/* Diff block */
.match-diff {
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    padding: var(--space-3);
    margin-top: var(--space-3);
}

.match-diff p {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.recipient-diff-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.recipient-diff-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--font-size-sm);
    padding: var(--space-2) var(--space-3);
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

.entered-value {
    color: var(--text-muted);
    text-decoration: line-through;
    flex: 1;
}

.normalized-value {
    color: var(--text-primary);
    font-weight: 500;
    flex: 1;
}

/* Confirm checkbox */
.match-confirm {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-top: var(--space-4);
    cursor: pointer;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.match-confirm input {
    accent-color: var(--accent-color);
    width: 16px;
    height: 16px;
}

.match-confirm span {
    user-select: none;
}

/* Debt */
.match-debt {
    margin-top: var(--space-4);
    animation: slideDown 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.debt-warning {
    background: var(--color-warning-subtle);
    border: 1px solid rgba(234, 179, 8, 0.2);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    font-size: var(--font-size-sm);
    color: var(--color-warning);
}

.debt-warning i {
    font-size: var(--font-size-lg);
    flex-shrink: 0;
    margin-top: 1px;
}

.debt-error {
    background: var(--color-error-subtle);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    font-size: var(--font-size-sm);
    color: var(--color-error);
}

.debt-error i {
    font-size: var(--font-size-lg);
    flex-shrink: 0;
    margin-top: 1px;
}

.debt-error strong {
    font-weight: 600;
}

/* Review warning */
.review-warning {
    background: var(--color-warning-subtle);
    border: 1px solid rgba(234, 179, 8, 0.15);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    margin-top: var(--space-3);
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    animation: slideDown 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.review-warning i {
    color: var(--color-warning);
    font-size: var(--font-size-lg);
    flex-shrink: 0;
    margin-top: 1px;
}

.match-warning-text {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: 1.5;
}

.match-warning-text p {
    margin: 0;
}

/* Containers with IDs */
#recipientMatchInfo,
#recipientMatchWarning {
    margin-top: var(--space-4);
}

/* Loading state */
.match-loading {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    padding: var(--space-3);
}

.match-loading i {
    animation: spin 0.8s linear infinite;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .match-result {
        padding: var(--space-3);
    }

    .recipient-diff-item {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-1);
    }
}
/* ============================================
   RESPONSIVE — v2 Mobile-first adjustments
   ============================================ */

/* ============================================
   TABLET — max 1024px
   ============================================ */
@media (max-width: 1024px) {
    .container {
        padding: 0 var(--space-5);
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .search-input {
        width: 180px;
    }

    .navigation ul {
        gap: var(--space-4);
    }

    .nav-link {
        font-size: var(--font-size-xs);
    }
}

/* ============================================
   MOBILE — max 768px
   ============================================ */
@media (max-width: 768px) {
    .container {
        padding: 0 var(--space-4);
    }

    /* Header mobile */
    .mobile-menu-toggle {
        display: flex;
    }

    .navigation,
    .search-container {
        display: none;
    }

    .header-content {
        padding: 8px 0;
        overflow: hidden;
    }

    .header-left {
        gap: var(--space-3);
        min-width: 0;
        flex-shrink: 1;
        overflow: hidden;
    }

    .logo h1 {
        font-size: var(--font-size-sm);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 140px;
    }

    .header-right {
        flex-shrink: 0;
    }

    .cabinet-link__name,
    .cabinet-link.has-name .cabinet-link__name {
        display: none !important;
    }

    .cabinet-link,
    .cabinet-link.has-name {
        width: 36px !important;
        padding: 0 !important;
        overflow: hidden;
    }

    /* Mobile navigation */
    .mobile-navigation {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: min(320px, 85vw);
        height: 100%;
        background: var(--bg-secondary);
        border-right: 1px solid var(--border-color);
        z-index: 200;
        transform: translateX(-100%);
        transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
        overflow-y: auto;
    }

    body.mobile-nav-open .mobile-navigation {
        transform: translateX(0);
    }

    .mobile-nav-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: var(--space-4) var(--space-5);
        border-bottom: 1px solid var(--border-subtle);
    }

    .mobile-nav-title {
        font-size: var(--font-size-base);
        font-weight: 600;
        color: var(--text-primary);
    }

    .mobile-search {
        padding: var(--space-3) var(--space-5);
        border-bottom: 1px solid var(--border-subtle);
    }

    .mobile-search-input {
        width: 100%;
        background: var(--bg-tertiary);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        padding: 10px 14px;
        color: var(--text-primary);
        font-size: var(--font-size-base);
        font-family: inherit;
    }

    .mobile-search-input:focus {
        outline: none;
        border-color: var(--accent-color);
    }

    .mobile-search-input::placeholder {
        color: var(--text-muted);
    }

    .mobile-nav-list {
        list-style: none;
        padding: var(--space-3) var(--space-3);
        margin: 0;
    }

    .mobile-nav-list .nav-link {
        display: block;
        padding: var(--space-3) var(--space-4);
        font-size: var(--font-size-base);
        font-weight: 500;
        color: var(--text-secondary);
        border-radius: var(--radius-md);
        transition: all var(--transition-fast);
    }

    .mobile-nav-list .nav-link::after {
        display: none;
    }

    .mobile-nav-list .nav-link:hover,
    .mobile-nav-list .nav-link.active {
        color: var(--text-primary);
        background: var(--bg-tertiary);
    }

    /* Cabinet dashboard: force single column on mobile */
    .cabinet-dashboard {
        grid-template-columns: 1fr !important;
        overflow: hidden;
    }

    .dashboard-column {
        min-width: 0;
        overflow: hidden;
    }

    .stats-card,
    .profile-card,
    .shipment-group,
    .order-card {
        max-width: 100%;
        overflow: hidden;
    }

    /* Cabinet tabs overflow fix */
    .section-header-small {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-3);
    }

    .orders-filter,
    .cabinet-tabs {
        width: 100%;
    }

    .filter-btn {
        flex: 1;
        text-align: center;
        font-size: var(--font-size-xs);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding: 8px 6px;
    }

    /* Product grid: 2 columns on mobile */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-3);
    }

    .products-carousel .product-card {
        flex: 0 0 200px;
        min-width: 200px;
    }

    /* Sections */
    .home-section {
        margin-bottom: var(--space-10);
    }

    .section-title {
        font-size: var(--font-size-xl);
    }

    /* Modals take full width on mobile */
    .modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .modal {
        max-width: 100%;
        max-height: 92vh;
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    }

    .modal-header {
        padding: var(--space-4) var(--space-5);
    }

    .modal-body {
        padding: var(--space-5);
    }

    .modal-footer {
        padding: var(--space-4) var(--space-5);
        padding-bottom: calc(var(--space-4) + env(safe-area-inset-bottom, 0px));
    }

    /* Orders */
    .orders-list {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: var(--space-3);
    }
}

/* ============================================
   SMALL MOBILE — max 480px
   ============================================ */
@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-3);
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-2);
    }

    .product-info {
        padding: var(--space-3);
        gap: var(--space-2);
    }

    .product-title {
        font-size: var(--font-size-sm);
    }

    .current-price {
        font-size: var(--font-size-base);
    }

    .products-carousel .product-card {
        flex: 0 0 170px;
        min-width: 170px;
    }

    .add-to-cart-btn {
        padding: 8px;
        font-size: var(--font-size-xs);
    }

    .size-option {
        padding: 3px 8px;
        font-size: 10px;
        min-width: 30px;
    }

    .header-right {
        gap: var(--space-1);
    }

    .cart-button {
        padding: 6px 10px;
        font-size: var(--font-size-xs);
    }

    .theme-toggle,
    .install-pwa-btn {
        width: 32px;
        height: 32px;
    }

    .cabinet-link,
    .cabinet-link.has-name {
        width: 32px !important;
        height: 32px;
        padding: 0 !important;
    }

    .orders-list {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-2);
    }

    .order-card {
        min-height: 220px;
    }

    .order-card__visual {
        height: 100px;
    }

    .order-card__content {
        padding: var(--space-3);
    }

    .order-card__number {
        font-size: var(--font-size-sm);
    }
}

/* ============================================
   PRINT
   ============================================ */
@media print {
    .header,
    .hero,
    .mobile-navigation,
    .mobile-nav-backdrop,
    .modal-overlay,
    #viberModal,
    .notification-gate,
    .theme-toggle,
    .cart-button,
    .search-container {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }
}
