.product-quantity-btn {
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.3s;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.product-quantity-btn:hover {
    background: var(--bg-card-hover);
}

.product-quantity-btn:active {
    background: var(--glow-purple);
}

/* Светлая тема - кнопки +/- на карточках товаров */
[data-theme="light"] .product-quantity-btn:hover {
    background: rgba(155, 135, 245, 0.15);
}

[data-theme="light"] .product-quantity-btn:active {
    background: rgba(155, 135, 245, 0.3);
}

/* Тёмная тема (по умолчанию) */
:root,
[data-theme="dark"] {
    /* Основные цвета фона */
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #16213e;
    --bg-card: rgba(255, 255, 255, 0.1);
    --bg-card-hover: rgba(255, 255, 255, 0.15);
    
    /* Цвета текста */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.5);
    --text-quaternary: rgba(255, 255, 255, 0.4);
    
    /* Акцентные цвета */
    --accent-purple: #8a2be2;
    --accent-blue: #00bfff;
    --accent-green: #00ff88;
    --accent-red: #ff4444;
    --accent-orange: #ffaa00;
    
    /* Градиенты */
    --gradient-primary: linear-gradient(135deg, #8a2be2, #00bfff);
    --gradient-success: linear-gradient(135deg, #00ff88, #00bfff);
    --gradient-danger: linear-gradient(135deg, #ff0080, #ff4040);
    --gradient-bg: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
    
    /* Границы */
    --border-primary: rgba(255, 255, 255, 0.2);
    --border-secondary: rgba(255, 255, 255, 0.1);
    
    /* Тени */
    --shadow-sm: 0 2px 8px rgba(138, 43, 226, 0.4);
    --shadow-md: 0 5px 20px rgba(138, 43, 226, 0.3);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
    
    /* Эффект blur */
    --blur-backdrop: blur(10px);
    
    /* Свечение */
    --glow-purple: rgba(138, 43, 226, 0.4);
    --glow-blue: rgba(0, 191, 255, 0.3);
    --glow-pink: rgba(255, 0, 128, 0.3);
    
    /* Иконки и кнопки */
    --icon-color: #ffffff;
    --button-shadow: 0 5px 20px rgba(138, 43, 226, 0.3);
}

/* Светлая тема */
[data-theme="light"] {
    /* Основные цвета фона */
    --bg-primary: #FAFAF8;
    --bg-secondary: #F5F5DC;
    --bg-tertiary: #EFEFEF;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-card-hover: rgba(255, 255, 255, 1);
    
    /* Цвета текста */
    --text-primary: #1a1a2e;
    --text-secondary: #333333;
    --text-tertiary: #666666;
    --text-quaternary: #999999;
    
    /* Акцентные цвета (остаются яркими) */
    --accent-purple: #7a1bd2;
    --accent-blue: #0099cc;
    --accent-green: #00cc66;
    --accent-red: #dd3333;
    --accent-orange: #ff9900;
    
    /* Градиенты (более мягкие) */
    --gradient-primary: linear-gradient(135deg, #7a1bd2, #0099cc);
    --gradient-success: linear-gradient(135deg, #00cc66, #0099cc);
    --gradient-danger: linear-gradient(135deg, #dd3333, #ff4444);
    --gradient-bg: linear-gradient(135deg, #FAFAF8 0%, #F5F5DC 100%);
    
    /* Границы */
    --border-primary: rgba(0, 0, 0, 0.15);
    --border-secondary: rgba(0, 0, 0, 0.08);
    
    /* Тени (более мягкие) */
    --shadow-sm: 0 2px 8px rgba(122, 27, 210, 0.15);
    --shadow-md: 0 5px 20px rgba(122, 27, 210, 0.12);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
    
    /* Эффект blur */
    --blur-backdrop: blur(15px);
    
    /* Свечение (приглушённое) */
    --glow-purple: rgba(122, 27, 210, 0.15);
    --glow-blue: rgba(0, 153, 204, 0.12);
    --glow-pink: rgba(221, 51, 51, 0.12);
    
    /* Иконки и кнопки */
    --icon-color: #1a1a2e;
    --button-shadow: 0 5px 20px rgba(122, 27, 210, 0.2);
}

/* ============================================
   БАЗОВЫЕ СТИЛИ
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    -webkit-font-smoothing: antialiased;
    transition: background 0.3s ease, color 0.3s ease;
}

/* ============================================
   АНИМИРОВАННЫЙ ФОН
   ============================================ */

.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: -1;
    background: var(--gradient-bg);
    transition: background 0.3s ease;
}

.animated-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, transparent 20%, var(--bg-primary) 20%, var(--bg-primary) 80%, transparent 80%, transparent),
                radial-gradient(circle, transparent 20%, var(--bg-primary) 20%, var(--bg-primary) 80%, transparent 80%, transparent);
    background-size: 80px 80px, 120px 120px;
    background-position: 0 0, 40px 40px;
    animation: bgAnimation 20s linear infinite;
    opacity: 0.1;
}

.animated-bg .glow {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--glow-purple) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.animated-bg .glow:nth-child(2) {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--glow-blue) 0%, transparent 70%);
    animation-duration: 8s;
    animation-delay: -2s;
    top: 60%;
    left: 70%;
}

.animated-bg .glow:nth-child(3) {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, var(--glow-pink) 0%, transparent 70%);
    animation-duration: 10s;
    animation-delay: -4s;
    top: 20%;
    left: 80%;
}

@keyframes bgAnimation {
    0% { transform: translate(0, 0); }
    100% { transform: translate(40px, 40px); }
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-30px) scale(1.1); }
}

/* ============================================
   КОНТЕЙНЕР ПРИЛОЖЕНИЯ
   ============================================ */

.app-container {
    max-width: 600px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    padding-bottom: 0;
}

/* ============================================
   HEADER
   ============================================ */

.header {
    background: linear-gradient(135deg, var(--glow-purple) 0%, var(--glow-blue) 100%);
    backdrop-filter: var(--blur-backdrop);
    -webkit-backdrop-filter: var(--blur-backdrop);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-secondary);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

.header-title {
    font-size: 20px;
    font-weight: bold;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
    transition: transform 0.3s;
}

.header-title:hover {
    transform: scale(1.05);
}

.header-title:active {
    transform: scale(0.98);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

/* Кнопка переключения темы */
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--icon-color);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
    line-height: 1;
    padding: 0;
    position: relative;
}

.theme-toggle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: var(--shadow-sm);
}

.theme-toggle:active {
    transform: scale(0.95);
}

/* ============================================
   ПЕРЕКЛЮЧАТЕЛЬ ВАЛЮТЫ
   ============================================ */

.currency-switcher {
    position: relative;
    display: flex;
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
}

.currency-option {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text-tertiary);
    background: transparent;
    border: none;
    outline: none;
}

.currency-option.active {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.currency-option:not(.active):hover {
    color: var(--text-secondary);
    background: var(--bg-card-hover);
}

/* Светлая тема - яркая активная валюта */
[data-theme="light"] .currency-option.active {
    background: linear-gradient(135deg, #9b87f5, #7c6fd8);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(122, 27, 210, 0.3);
}

/* ============================================
   АВАТАР ПОЛЬЗОВАТЕЛЯ
   ============================================ */

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid var(--border-primary);
    overflow: hidden;
    position: relative;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-avatar:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.user-avatar:active {
    transform: scale(0.95);
}

/* ============================================
   МЕНЮ ПРОФИЛЯ
   ============================================ */

.profile-menu {
    display: none;
    position: fixed;
    top: 70px;
    right: 20px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    padding: 10px;
    min-width: 200px;
    z-index: 1001;
    box-shadow: var(--shadow-lg);
    animation: slideInFromTop 0.3s ease;
}

.profile-menu.active {
    display: block;
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-menu-header {
    padding: 15px;
    border-bottom: 1px solid var(--border-secondary);
    margin-bottom: 5px;
}

.profile-menu-user {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.profile-menu-id {
    font-size: 12px;
    color: var(--text-tertiary);
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text-primary);
    text-decoration: none;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    font-size: 14px;
}

.profile-menu-item:hover {
    background: var(--glow-purple);
}

.profile-menu-item:active {
    transform: scale(0.98);
}

/* Светлая тема - подсветка пунктов меню */
[data-theme="light"] .profile-menu-item:hover {
    background: rgba(155, 135, 245, 0.15);
}

.profile-menu-icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

/* ============================================
   ИСТОРИЯ ЗАКАЗОВ
   ============================================ */

.order-history {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.order-accordion {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card-hover) 100%);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s;
}

.order-accordion:hover {
    box-shadow: var(--shadow-md);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    cursor: pointer;
    transition: background 0.3s;
}

.order-header:hover {
    background: var(--bg-card-hover);
}

.order-header:active {
    transform: scale(0.99);
}

.order-info {
    flex: 1;
}

.order-number {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.order-meta {
    font-size: 12px;
    color: var(--text-tertiary);
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.order-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 10px;
}

.order-status.delivered {
    background: rgba(0, 255, 136, 0.2);
    color: var(--accent-green);
}

.order-status.paid {
    background: rgba(0, 191, 255, 0.2);
    color: var(--accent-blue);
}

.order-status.cancelled {
    background: rgba(255, 68, 68, 0.2);
    color: var(--accent-red);
}

.order-chevron {
    font-size: 20px;
    transition: transform 0.3s;
    color: var(--text-tertiary);
}

.order-accordion.active .order-chevron {
    transform: rotate(180deg);
}

.order-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.order-accordion.active .order-body {
    max-height: 5000px;
}

.order-items {
    padding: 0 15px 15px 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.order-download {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2), rgba(0, 191, 255, 0.2));
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--accent-green);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 15px;
    margin-top: 0;
    width: calc(100% - 30px);
}

.order-download:hover {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.3), rgba(0, 191, 255, 0.3));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 136, 0.3);
}

.order-download:active {
    transform: translateY(0) scale(0.98);
}

.item-accordion {
    background: var(--bg-card);
    border: 1px solid var(--border-secondary);
    border-radius: 12px;
    overflow: hidden;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    cursor: pointer;
    transition: background 0.3s;
}

.item-header:hover {
    background: var(--bg-card-hover);
}

.item-info {
    flex: 1;
}

.item-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.item-quantity {
    font-size: 12px;
    color: var(--text-tertiary);
}

.item-chevron {
    font-size: 16px;
    transition: transform 0.3s;
    color: var(--text-tertiary);
}

.item-accordion.active .item-chevron {
    transform: rotate(180deg);
}

.item-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.item-accordion.active .-body {
    max-height: 3000px;
}

.item-codes {
    padding: 10px 12px;
    border-top: 1px solid var(--border-secondary);
}

.code-item {
    padding: 8px 12px;
    background: rgba(0, 191, 255, 0.1);
    border: 1px solid rgba(0, 191, 255, 0.2);
    border-radius: 8px;
    margin-bottom: 8px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    transition: all 0.3s;
}

.code-item:last-child {
    margin-bottom: 0;
}

.code-item:hover {
    background: rgba(0, 191, 255, 0.15);
}

.code-value {
    flex: 1;
    color: var(--accent-blue);
    word-break: break-all;
    white-space: pre-wrap;
    line-height: 1.5;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 5px;
}

.code-value::-webkit-scrollbar {
    width: 4px;
}

.code-value::-webkit-scrollbar-track {
    background: var(--bg-card);
    border-radius: 2px;
}

.code-value::-webkit-scrollbar-thumb {
    background: rgba(0, 191, 255, 0.3);
    border-radius: 2px;
}

.code-copy {
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
    transition: all 0.3s;
    flex-shrink: 0;
}

.code-copy:hover {
    color: var(--accent-blue);
}

.code-copy:active {
    transform: scale(0.9);
}

.codes-controls {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-secondary);
}

.codes-show-all {
    flex: 1;
    background: rgba(0, 191, 255, 0.15);
    border: 1px solid rgba(0, 191, 255, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--accent-blue);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.codes-show-all:hover {
    background: rgba(0, 191, 255, 0.25);
}

.codes-show-all:active {
    transform: scale(0.98);
}

.codes-hidden {
    display: none !important;
}

/* ============================================
   ПЛАВАЮЩАЯ КОРЗИНА
   ============================================ */

.floating-cart {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--button-shadow);
    z-index: 1000;
    border: none;
}

.floating-cart:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.floating-cart:active {
    transform: scale(0.95);
}

.floating-cart .cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--gradient-danger);
    color: #fff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid var(--bg-primary);
}

/* Светлая тема - яркие насыщенные тона для корзины */
[data-theme="light"] .floating-cart {
    background: linear-gradient(135deg, #9b87f5, #7c6fd8);
    color: #ffffff;
    box-shadow: 0 5px 20px rgba(122, 27, 210, 0.3);
}

[data-theme="light"] .floating-cart:hover {
    background: linear-gradient(135deg, #8a76e8, #6d5ec8);
    box-shadow: 0 8px 25px rgba(122, 27, 210, 0.4);
}

[data-theme="light"] .floating-cart .cart-count {
    background: linear-gradient(135deg, #ff6b6b, #ff8787);
    border: 2px solid #FAFAF8;
}

/* ============================================
   КНОПКА ПРОКРУТКИ ВВЕРХ
   ============================================ */

.scroll-to-top {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--button-shadow);
    z-index: 999;
    border: none;
    backdrop-filter: var(--blur-backdrop);
    -webkit-backdrop-filter: var(--blur-backdrop);
}

.scroll-to-top.visible {
    display: flex;
}

.scroll-to-top:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: var(--shadow-md);
}

.scroll-to-top:active {
    transform: scale(0.95);
}

/* Светлая тема - яркие насыщенные тона для кнопки прокрутки */
[data-theme="light"] .scroll-to-top {
    background: linear-gradient(135deg, #9b87f5, #7c6fd8);
    color: #ffffff;
    box-shadow: 0 5px 20px rgba(122, 27, 210, 0.3);
}

[data-theme="light"] .scroll-to-top:hover {
    background: linear-gradient(135deg, #8a76e8, #6d5ec8);
    box-shadow: 0 8px 25px rgba(122, 27, 210, 0.4);
}

/* ============================================
   НАВИГАЦИЯ
   ============================================ */

.navigation-bar {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-secondary);
    min-height: 50px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { 
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.back-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--glow-purple), var(--glow-blue));
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 8px 16px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: var(--blur-backdrop);
    -webkit-backdrop-filter: var(--blur-backdrop);
    position: relative;
    overflow: hidden;
}

.back-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--bg-card-hover), transparent);
    transition: left 0.5s;
}

.back-button:hover::before {
    left: 100%;
}

.back-button:hover {
    background: linear-gradient(135deg, var(--glow-purple), var(--glow-blue));
    transform: translateX(-3px);
    box-shadow: var(--shadow-md);
}

.back-button:active {
    transform: translateX(-1px) scale(0.98);
}

/* Светлая тема - яркие насыщенные тона для кнопки "Назад" */
[data-theme="light"] .back-button {
    background: linear-gradient(135deg, rgba(155, 135, 245, 0.2), rgba(124, 111, 216, 0.2));
    color: var(--text-primary);
    border: 1px solid rgba(122, 27, 210, 0.3);
}

[data-theme="light"] .back-button:hover {
    background: linear-gradient(135deg, rgba(155, 135, 245, 0.3), rgba(124, 111, 216, 0.3));
    box-shadow: 0 4px 12px rgba(122, 27, 210, 0.2);
}

.back-button-icon {
    font-size: 18px;
    display: flex;
    align-items: center;
    transition: transform 0.3s;
}

.back-button:hover .back-button-icon {
    transform: translateX(-2px);
}

.current-category {
    margin-left: auto;
    font-size: 16px;
    font-weight: 600;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding-right: 10px;
    animation: fadeIn 0.5s ease;
}

.navigation-bar.hidden {
    display: none;
}

/* ============================================
   ОСНОВНОЙ КОНТЕНТ
   ============================================ */

.main-content {
    flex: 1;
    padding: 20px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   СЕТКА КАТЕГОРИЙ
   ============================================ */

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.category-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card-hover) 100%);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent, var(--glow-purple));
    opacity: 0;
    transition: opacity 0.3s;
}

.category-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-md);
}

.category-card:hover::before {
    opacity: 1;
}

.category-card:active {
    transform: translateY(-2px) scale(1.01);
}

.category-image {
    width: 100%;
    height: 130px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 10px;
    background: var(--bg-card);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-image.loaded {
    opacity: 1;
}

.category-emoji {
    font-size: 48px;
    margin-bottom: 10px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.category-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.category-count {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 5px;
}

/* ============================================
   СЕТКА ТОВАРОВ
   ============================================ */

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.product-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card-hover) 100%);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    transition: all 0.3s;
}

.product-card:hover {
    box-shadow: var(--shadow-md);
}

.product-card-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.product-image {
    width: 100%;
    height: 100px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--bg-card);
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-image.loaded {
    opacity: 1;
}

.product-info {
    flex: 1;
    min-width: 0;
}

.product-name {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
    min-height: 31px;
    color: var(--text-primary);
}

.product-price {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 5px;
}

.price-value {
    font-size: 14px;
    font-weight: bold;
    background: var(--gradient-success);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.product-stock {
    font-size: 10px;
    color: var(--text-tertiary);
}

.product-stock.in-stock {
    color: var(--accent-green);
}

.product-stock.low-stock {
    color: var(--accent-orange);
}

.product-stock.out-of-stock {
    color: var(--accent-red);
}

.product-has-description {
    font-size: 11px;
    color: var(--accent-blue);
    margin-top: 5px;
}

.product-actions {
    display: flex;
    gap: 6px;
    margin-top: 5px;
    flex-direction: column;
}

.product-quantity-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

.product-quantity-selector {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    overflow: hidden;
    flex: 0 0 auto;
}

.product-quantity-value {
    padding: 0 10px;
    min-width: 30px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
}

.product-quick-add {
    background: var(--gradient-primary);
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
    flex: 1;
    justify-content: center;
}

.product-quick-add:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.product-quick-add:active {
    transform: scale(0.98);
}

.product-quick-add:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Светлая тема - яркие насыщенные тона для кнопки "В корзину" */
[data-theme="light"] .product-quick-add {
    background: linear-gradient(135deg, #9b87f5, #7c6fd8);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(122, 27, 210, 0.25);
}

[data-theme="light"] .product-quick-add:hover {
    background: linear-gradient(135deg, #8a76e8, #6d5ec8);
    box-shadow: 0 4px 15px rgba(122, 27, 210, 0.35);
}

[data-theme="light"] .product-quick-add:disabled {
    background: linear-gradient(135deg, #c0c0c0, #a8a8a8);
    color: #ffffff;
    opacity: 0.6;
}

.product-buttons-row {
    display: flex;
    gap: 8px;
}

.product-view-details {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    padding: 8px 16px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    flex: 1;
}

.product-view-details:hover {
    background: var(--bg-card-hover);
}

.product-view-details:active {
    transform: scale(0.98);
}

/* Светлая тема - кнопка подробнее */
[data-theme="light"] .product-view-details {
    background: rgba(155, 135, 245, 0.1);
    border: 1px solid rgba(122, 27, 210, 0.3);
    color: #5a5a7a;
}

[data-theme="light"] .product-view-details:hover {
    background: rgba(155, 135, 245, 0.2);
    border-color: #7c6fd8;
}

/* ============================================
   ДЕТАЛИ ТОВАРА (МОДАЛЬНОЕ ОКНО)
   ============================================ */

.product-details-body {
    max-height: 70vh;
    overflow-y: auto;
}

.product-details-image {
    width: 100%;
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
}

.product-details-image img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-details-image img.loaded {
    opacity: 1;
}

.product-details-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.product-details-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--bg-card);
    border-radius: 12px;
}

.price-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.product-details-stock {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.product-details-description {
    padding: 15px;
    background: rgba(138, 43, 226, 0.1);
    border: 1px solid rgba(138, 43, 226, 0.2);
    border-radius: 12px;
    margin-top: 20px;
}

.product-details-description h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--accent-blue);
}

.description-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    white-space: pre-wrap;
}

.product-details-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}

.product-unavailable {
    padding: 15px;
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    border-radius: 12px;
    text-align: center;
    color: #ff6b6b;
    font-weight: 600;
}

.quantity-selector {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.3s;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:hover {
    background: var(--bg-card-hover);
}

.quantity-btn:active {
    background: var(--glow-purple);
}

/* Светлая тема - кнопки +/- в модальном окне товара */
[data-theme="light"] .quantity-btn:hover {
    background: rgba(155, 135, 245, 0.15);
}

[data-theme="light"] .quantity-btn:active {
    background: rgba(155, 135, 245, 0.3);
}

.quantity-value {
    padding: 0 15px;
    min-width: 40px;
    text-align: center;
    font-weight: 600;
    color: var(--text-primary);
}

.add-to-cart-btn {
    background: var(--gradient-primary);
    border: none;
    border-radius: 8px;
    padding: 8px 20px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    flex: 1;
}

.add-to-cart-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.add-to-cart-btn:active {
    transform: scale(0.98);
}

.add-to-cart-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.add-to-cart-btn.in-cart {
    background: var(--gradient-success);
}

/* Светлая тема - яркие насыщенные тона для кнопки добавления в корзину */
[data-theme="light"] .add-to-cart-btn {
    background: linear-gradient(135deg, #9b87f5, #7c6fd8);
    color: #ffffff;
    box-shadow: 0 3px 12px rgba(122, 27, 210, 0.25);
}

[data-theme="light"] .add-to-cart-btn:hover {
    background: linear-gradient(135deg, #8a76e8, #6d5ec8);
    box-shadow: 0 5px 18px rgba(122, 27, 210, 0.35);
}

[data-theme="light"] .add-to-cart-btn.in-cart {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: #ffffff;
}

/* ============================================
   РЕКОМЕНДАЦИИ
   ============================================ */

.recommendations-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-secondary);
}

.recommendations-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.recommendations-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
}

.recommendations-scroll::-webkit-scrollbar {
    display: none;
}

.recommendations-scroll:active {
    cursor: grabbing;
}

.recommendation-card {
    flex: 0 0 140px;
    background: var(--bg-card);
    border: 1px solid var(--border-secondary);
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.recommendation-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    background: var(--bg-card-hover);
}

.recommendation-card:active {
    transform: translateY(-1px);
}

.recommendation-image {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 8px;
    background: var(--bg-card);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.recommendation-image.loaded {
    opacity: 1;
}

.recommendation-placeholder {
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    background: var(--bg-card);
    border-radius: 8px;
    margin-bottom: 8px;
}

.recommendation-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.recommendation-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
    min-height: 34px;
}

.recommendation-price {
    font-size: 14px;
    font-weight: bold;
    background: var(--gradient-success);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-top: auto;
}

.recommendation-add-btn {
    background: var(--gradient-primary);
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 5px;
}

.recommendation-add-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 10px var(--glow-purple);
}

.recommendation-add-btn:active {
    transform: scale(0.95);
}

/* Светлая тема - яркие насыщенные тона для кнопок в рекомендациях */
[data-theme="light"] .recommendation-add-btn {
    background: linear-gradient(135deg, #9b87f5, #7c6fd8);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(122, 27, 210, 0.25);
}

[data-theme="light"] .recommendation-add-btn:hover {
    background: linear-gradient(135deg, #8a76e8, #6d5ec8);
    box-shadow: 0 3px 12px rgba(122, 27, 210, 0.35);
}

.recommendation-unavailable {
    font-size: 11px;
    color: #ff6b6b;
    text-align: center;
    padding: 6px 0;
    margin-top: 5px;
}

/* ============================================
   МОДАЛЬНОЕ ОКНО ВЫБОРА КОЛИЧЕСТВА
   ============================================ */

.quantity-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2500;
    animation: fadeIn 0.3s ease;
}

.quantity-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.quantity-modal-content {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border: 1px solid var(--border-primary);
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.quantity-modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-secondary);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.quantity-modal-title {
    font-size: 18px;
    font-weight: 600;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.quantity-modal-close {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-modal-close:hover {
    opacity: 1;
}

/* Светлая тема - кнопка закрытия модального окна количества */
[data-theme="light"] .quantity-modal-close {
    color: var(--text-primary);
}

[data-theme="light"] .quantity-modal-close:hover {
    opacity: 1;
    color: #5a5a7a;
}

.quantity-modal-body {
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.quantity-modal-product-name {
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    color: var(--text-primary);
    line-height: 1.4;
}

.quantity-modal-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 10px 20px;
}

.quantity-modal-btn {
    width: 44px;
    height: 44px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: var(--shadow-sm);
}

.quantity-modal-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.quantity-modal-btn:active {
    transform: scale(0.95);
}

.quantity-modal-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

/* Светлая тема - яркие насыщенные тона для кнопок +/- в модалке количества */
[data-theme="light"] .quantity-modal-btn {
    background: linear-gradient(135deg, #9b87f5, #7c6fd8);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(122, 27, 210, 0.25);
}

[data-theme="light"] .quantity-modal-btn:hover {
    background: linear-gradient(135deg, #8a76e8, #6d5ec8);
    box-shadow: 0 4px 15px rgba(122, 27, 210, 0.35);
}

[data-theme="light"] .quantity-modal-btn:disabled {
    background: linear-gradient(135deg, #c0c0c0, #a8a8a8);
    opacity: 0.5;
}

.quantity-modal-input {
    width: 100px;
    height: 50px;
    background: var(--bg-card);
    border: 2px solid var(--border-primary);
    border-radius: 12px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    color: var(--text-primary);
    outline: none;
    transition: all 0.3s;
}

.quantity-modal-input:focus {
    border-color: var(--accent-blue);
    background: var(--bg-card-hover);
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.3);
}

.quantity-modal-max {
    font-size: 12px;
    color: var(--text-tertiary);
    text-align: center;
}

.quantity-modal-actions {
    display: flex;
    gap: 10px;
    width: 100%;
}

.quantity-modal-cancel {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 14px 20px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.quantity-modal-cancel:hover {
    background: var(--bg-card-hover);
}

.quantity-modal-cancel:active {
    transform: scale(0.98);
}

.quantity-modal-confirm {
    flex: 2;
    background: var(--gradient-primary);
    border: none;
    border-radius: 12px;
    padding: 14px 20px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow-md);
}

.quantity-modal-confirm:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.quantity-modal-confirm:active {
    transform: translateY(0) scale(0.98);
}

.quantity-modal-confirm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Светлая тема - яркие тона для кнопки подтверждения количества */
[data-theme="light"] .quantity-modal-confirm {
    background: linear-gradient(135deg, #9b87f5, #7c6fd8);
    color: #ffffff;
    box-shadow: 0 3px 15px rgba(122, 27, 210, 0.3);
}

[data-theme="light"] .quantity-modal-confirm:hover {
    background: linear-gradient(135deg, #8a76e8, #6d5ec8);
    box-shadow: 0 5px 20px rgba(122, 27, 210, 0.4);
}

/* ============================================
   МОДАЛЬНЫЕ ОКНА
   ============================================ */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border: 1px solid var(--border-primary);
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-secondary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.modal-header-content {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.modal-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--text-primary);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    opacity: 1;
}

/* Светлая тема - кнопка закрытия модальных окон */
[data-theme="light"] .modal-close {
    color: var(--text-primary);
}

[data-theme="light"] .modal-close:hover {
    opacity: 1;
    color: #5a5a7a;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* ============================================
   КОРЗИНА
   ============================================ */

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.cart-item {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-primary);
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.4;
}

.cart-item-price {
    font-size: 14px;
    color: var(--text-secondary);
}

.cart-item-timer {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 5px;
}

.cart-item-timer.warning {
    color: var(--accent-orange);
}

.cart-item-timer.danger {
    color: var(--accent-red);
}

.cart-item-remove {
    background: rgba(255, 68, 68, 0.2);
    border: 1px solid rgba(255, 68, 68, 0.4);
    border-radius: 8px;
    padding: 5px 10px;
    color: var(--accent-red);
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.cart-item-remove:hover {
    background: rgba(255, 68, 68, 0.3);
}

.cart-item-remove:active {
    transform: scale(0.95);
}

.cart-total {
    padding: 15px;
    background: var(--bg-card);
    border-radius: 12px;
    margin-bottom: 20px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.total-row:last-child {
    margin-bottom: 0;
    padding-top: 10px;
    border-top: 1px solid var(--border-secondary);
    font-size: 18px;
    font-weight: bold;
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.payment-method {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.payment-method:hover:not(.disabled) {
    background: var(--bg-card-hover);
    border-color: var(--accent-blue);
}

.payment-method:active:not(.disabled) {
    transform: scale(0.98);
}

.payment-method.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Светлая тема - яркие границы для методов оплаты */
[data-theme="light"] .payment-method:hover:not(.disabled) {
    background: var(--bg-card-hover);
    border-color: #7c6fd8;
    box-shadow: 0 3px 12px rgba(122, 27, 210, 0.15);
}

.payment-method-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.payment-method-name {
    font-weight: 600;
    color: var(--text-primary);
}

.payment-method-status {
    font-size: 12px;
    color: var(--text-tertiary);
}

.payment-method-icon {
    font-size: 20px;
}

/* ============================================
   ФУТЕР
   ============================================ */

.footer {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.8) 0%, rgba(22, 33, 62, 0.8) 100%);
    backdrop-filter: var(--blur-backdrop);
    -webkit-backdrop-filter: var(--blur-backdrop);
    border-top: 1px solid var(--border-secondary);
    padding: 30px 20px 20px;
    margin-top: auto;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    justify-content: center;
}

.footer-logo-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.footer-brand {
    font-size: 20px;
    font-weight: bold;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-description {
    text-align: center;
    color: var(--text-tertiary);
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-link:hover {
    color: var(--accent-blue);
}

.footer-copyright {
    text-align: center;
    color: var(--text-quaternary);
    font-size: 12px;
    padding-top: 15px;
    border-top: 1px solid var(--border-secondary);
}

/* ============================================
   ЗАГРУЗЧИК
   ============================================ */

.loader {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    backdrop-filter: var(--blur-backdrop);
    -webkit-backdrop-filter: var(--blur-backdrop);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.loader.active {
    display: flex;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loader-logo {
    width: 120px;
    height: 120px;
    margin-bottom: 20px;
    animation: pulse 1.5s ease-in-out infinite;
    filter: drop-shadow(0 0 30px var(--glow-purple));
}

.loader-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.loader-brand {
    font-size: 28px;
    font-weight: bold;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    animation: pulse 1.5s ease-in-out infinite;
    animation-delay: 0.2s;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-secondary);
    border-top: 3px solid var(--accent-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-text {
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
}

/* ============================================
   УВЕДОМЛЕНИЯ
   ============================================ */

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    left: 20px;
    max-width: 400px;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 15px 20px;
    z-index: 3000;
    animation: slideInDown 0.3s ease;
    box-shadow: var(--shadow-lg);
    color: var(--text-primary);
}

@keyframes slideInDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.notification.success {
    border-color: var(--accent-green);
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1), rgba(0, 255, 136, 0.05));
}

.notification.error {
    border-color: var(--accent-red);
    background: linear-gradient(135deg, rgba(255, 68, 68, 0.1), rgba(255, 68, 68, 0.05));
}

.notification.info {
    border-color: var(--accent-blue);
    background: linear-gradient(135deg, rgba(0, 191, 255, 0.1), rgba(0, 191, 255, 0.05));
}

/* ============================================
   ПУСТОЕ СОСТОЯНИЕ
   ============================================ */

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-tertiary);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.empty-state-description {
    font-size: 14px;
}

/* ============================================
   АНИМАЦИЯ ПОЛЁТА ТОВАРА В КОРЗИНУ
   ============================================ */

.flying-product {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
}

.flying-product img {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--glow-purple);
}

@keyframes flyToCart {
    0% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(0.8) rotate(180deg);
    }
    100% {
        opacity: 0;
        transform: scale(0.2) rotate(360deg);
    }
}

/* ============================================
   АДАПТИВ
   ============================================ */

@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .recommendation-card {
        flex: 0 0 130px;
    }
    
    .quantity-modal-content {
        max-width: 350px;
    }
    
    .quantity-modal-input {
        width: 80px;
        height: 44px;
        font-size: 20px;
    }
    
    .quantity-modal-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

/* ============================================
   ПРОКРУТКА
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-card);
}

::-webkit-scrollbar-thumb {
    background: var(--border-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-secondary);
}

/* ============================================
   SKELETON LOADING
   ============================================ */

/* Skeleton базовые стили */
.skeleton-grid {
    position: relative;
}

.skeleton {
    pointer-events: none;
    position: relative;
    overflow: hidden;
}

.skeleton::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, 0.05) 20%,
        rgba(255, 255, 255, 0.1) 60%,
        rgba(255, 255, 255, 0)
    );
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* Skeleton элементы */
.skeleton-image {
    width: 100%;
    height: 130px;
    background: var(--bg-card);
    border-radius: 12px;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
}

.skeleton-text {
    height: 16px;
    background: var(--bg-card);
    border-radius: 4px;
    margin-bottom: 8px;
    position: relative;
    overflow: hidden;
}

.skeleton-text.small {
    width: 60%;
    height: 12px;
}

.skeleton-button {
    height: 36px;
    background: var(--bg-card);
    border-radius: 8px;
    margin-top: 8px;
    position: relative;
    overflow: hidden;
}

/* Skeleton для товаров */
.product-grid.skeleton-grid .skeleton-image {
    height: 100px;
}

/* Светлая тема - более контрастные skeleton */
[data-theme="light"] .skeleton-image,
[data-theme="light"] .skeleton-text,
[data-theme="light"] .skeleton-button {
    background: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .skeleton::after {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, 0.4) 20%,
        rgba(255, 255, 255, 0.6) 60%,
        rgba(255, 255, 255, 0)
    );
}

/* Плавная анимация контента */
#mainContent {
    transition: opacity 0.2s ease;
}

/* Убираем задержки анимации при быстрых переходах */
.category-card,
.product-card {
    animation-duration: 0.3s !important;
    animation-delay: 0s !important;
}

/* ============================================
   СТРАНИЦА КОНТАКТОВ
   ============================================ */

.contact-page {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
}

.contact-header {
    text-align: center;
    margin-bottom: 30px;
}

.contact-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.contact-title {
    font-size: 24px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #8a2be2, #00bfff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
}

.contact-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    padding: 20px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s;
}

.contact-item-telegram {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.2), rgba(0, 191, 255, 0.2));
    cursor: pointer;
}

.contact-item-telegram:hover {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.3), rgba(0, 191, 255, 0.3));
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.contact-item-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.contact-item-content {
    flex: 1;
}

.contact-item-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.contact-item-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

.contact-item-arrow {
    font-size: 20px;
    opacity: 0.5;
    color: var(--text-tertiary);
}

.contact-notice {
    margin-top: 30px;
    padding: 20px;
    background: rgba(0, 191, 255, 0.1);
    border: 1px solid rgba(0, 191, 255, 0.2);
    border-radius: 12px;
}

.contact-notice-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.contact-notice-strong {
    color: var(--accent-blue);
}

/* Светлая тема - страница контактов */
[data-theme="light"] .contact-subtitle {
    color: var(--text-secondary);
}

[data-theme="light"] .contact-item {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    color: var(--text-primary);
}

[data-theme="light"] .contact-item-telegram {
    background: linear-gradient(135deg, rgba(155, 135, 245, 0.15), rgba(124, 111, 216, 0.15));
}

[data-theme="light"] .contact-item-telegram:hover {
    background: linear-gradient(135deg, rgba(155, 135, 245, 0.25), rgba(124, 111, 216, 0.25));
    box-shadow: 0 4px 15px rgba(122, 27, 210, 0.2);
}

[data-theme="light"] .contact-item-title {
    color: var(--text-primary);
}

[data-theme="light"] .contact-item-subtitle {
    color: var(--text-secondary);
}

[data-theme="light"] .contact-item-arrow {
    color: var(--text-tertiary);
}

[data-theme="light"] .contact-notice {
    background: rgba(0, 153, 204, 0.1);
    border: 1px solid rgba(0, 153, 204, 0.3);
}

[data-theme="light"] .contact-notice-text {
    color: var(--text-secondary);
}

[data-theme="light"] .contact-notice-strong {
    color: var(--accent-blue);
}