﻿@font-face {
            font-family: 'Inter';
            font-style: normal;
            font-weight: 400 700;
            font-display: swap;
            src: url('fonts/inter/inter-cyrillic-ext-400-700.woff2') format('woff2');
            unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
        }

        @font-face {
            font-family: 'Inter';
            font-style: normal;
            font-weight: 400 700;
            font-display: swap;
            src: url('fonts/inter/inter-cyrillic-400-700.woff2') format('woff2');
            unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
        }

        @font-face {
            font-family: 'Inter';
            font-style: normal;
            font-weight: 400 700;
            font-display: swap;
            src: url('fonts/inter/inter-latin-400-700.woff2') format('woff2');
            unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
        }
        
        /* ================= ДИЗАЙН-СИСТЕМА (Переменные) ================= */
        :root {
            --c-primary: #059669;
            --c-primary-hover: #047857;
            --c-primary-light: #d1fae5;
            --c-primary-text: #065f46;
            
            --c-bg-body: #f1f5f9;
            --c-bg-app: #f8fafc;
            --c-surface: #ffffff;
            
            --c-text-main: #1e293b;
            --c-text-muted: #64748b;
            --c-text-light: #94a3b8;
            
            --c-border: #f1f5f9;
            --c-border-dark: #e2e8f0;
            
            --c-danger: #f43f5e;
            --c-danger-light: #fff1f2;
            
            --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
            --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
            --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
            
            --radius-md: 0.5rem;
            --radius-lg: 0.75rem;
            --radius-xl: 1rem;
            --radius-2xl: 1.5rem;
            --bottom-nav-height: 68px;
            --bottom-content-gap: 1.5rem;
        }

        * { box-sizing: border-box; margin: 0; padding: 0; }

        body {
            font-family: 'Inter', sans-serif;
            background-color: var(--c-bg-body);
            color: var(--c-text-main);
            -webkit-tap-highlight-color: transparent;
            line-height: 1.5;
        }

        a { text-decoration: none; color: inherit; }
        button { border: none; background: none; cursor: pointer; font-family: inherit; }
        input { font-family: inherit; }

        .active-scale { transition: transform 0.15s ease; }
        .active-scale:active { transform: scale(0.96); }

        .mobile-frame {
            width: 100%; height: 100vh; height: 100dvh; background-color: var(--c-bg-app);
            position: relative; display: flex; flex-direction: column; overflow: hidden;
        }

        @supports not (height: 100dvh) {
            .mobile-frame { height: -webkit-fill-available; }
        }

        .desktop-header, .desktop-sidebar, .desktop-back-btn { display: none; }
        .desktop-cart-panel { display: none; }
        .desktop-body { display: flex; flex: 1; flex-direction: column; overflow: hidden; width: 100%; }
        .app-content-wrapper { display: flex; flex: 1; flex-direction: column; width: 100%; overflow: hidden; position: relative; }

        /* ================= SPA ЛОГИКА ================= */
        .view-panel {
            display: none; flex-direction: column; height: 100%; width: 100%;
            background-color: var(--c-bg-app); animation: fadeIn 0.2s ease-in-out;
        }
        .view-panel.active { display: flex; }
        
        .scroll-area {
            flex: 1; overflow-y: auto;
            padding-bottom: calc(var(--bottom-nav-height) + var(--bottom-content-gap) + env(safe-area-inset-bottom));
            position: relative; -ms-overflow-style: none;
            scroll-padding-bottom: calc(var(--bottom-nav-height) + var(--bottom-content-gap) + env(safe-area-inset-bottom));
        }
        .scroll-area::-webkit-scrollbar { display: none; }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(5px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* ================= КОМПОНЕНТЫ ================= */
        .header {
            background-color: var(--c-primary); color: white; padding: 1rem 1.25rem;
            display: flex; justify-content: space-between; align-items: center;
            z-index: 10; flex-shrink: 0; box-shadow: var(--shadow-sm);
        }
        .header h1 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.025em; margin: 0; }
        .header-light { background-color: var(--c-surface); color: var(--c-text-main); border-bottom: 1px solid var(--c-border); }
        .header-transparent { background-color: transparent; color: var(--c-text-main); position: absolute; top: 0; left: 0; width: 100%; box-shadow: none; z-index: 20; }

        /* АККОРДЕОН КАТЕГОРИЙ */
        .catalog-accordion { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
        #view-home .scroll-area,
        #view-catalog .scroll-area,
        #view-category .scroll-area {
            overflow-y: auto;
            -ms-overflow-style: none;
        }
        #view-home .scroll-area::-webkit-scrollbar,
        #view-catalog .scroll-area::-webkit-scrollbar,
        #view-category .scroll-area::-webkit-scrollbar {
            width: 0;
            height: 0;
            display: none;
        }
        .accordion-item { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-xl); overflow: hidden; }
        .accordion-header { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 1rem; color: var(--c-text-main); font-weight: 600; font-size: 0.875rem; transition: background 0.2s; }
        .accordion-header:hover { background: var(--c-bg-app); }
        .accordion-icon { width: 1.25rem; height: 1.25rem; transition: transform 0.3s ease; color: var(--c-text-muted); }
        .accordion-item.open .accordion-icon { transform: rotate(180deg); }
        .accordion-content { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; background: var(--c-bg-app); border-top: 1px solid transparent; }
        .accordion-item.open .accordion-content { border-top-color: var(--c-border-dark); max-height: 2000px; }
        .accordion-inner { padding: 0.5rem 1rem 1rem 3.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
        .subcat-link { font-size: 0.875rem; color: var(--c-text-main); font-weight: 500; padding: 0.25rem 0; display: block; transition: color 0.2s;}
        .subcat-link:hover { color: var(--c-primary); }
        .subcat-link.active { color: var(--c-primary); font-weight: 700; }

        .subcategory-nav {
            display: flex; overflow-x: auto; gap: 0.5rem; padding: 0.75rem 1rem; background: var(--c-bg-app);
            border-bottom: 1px solid var(--c-border-dark); -ms-overflow-style: none; flex-shrink: 0; z-index: 5;
        }
        .subcategory-nav::-webkit-scrollbar { display: none; }
        .subcat-item {
            padding: 0.375rem 1rem; background: var(--c-surface); color: var(--c-text-main);
            border-radius: var(--radius-xl); font-size: 0.875rem; font-weight: 600; white-space: nowrap;
            transition: all 0.2s; border: 1px solid var(--c-border-dark);
        }
        .subcat-item.active { background: var(--c-text-main); color: white; border-color: var(--c-text-main); }

        .bottom-nav {
            background-color: var(--c-primary); min-height: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom)); width: 100%;
            position: fixed; left: 0; right: 0; bottom: 0;
            display: flex; justify-content: space-around; align-items: stretch; padding: 0 0.25rem env(safe-area-inset-bottom);
            box-shadow: 0 -4px 10px -2px rgba(0,0,0,0.1); z-index: 3900; transform: translateZ(0);
        }
        .nav-btn { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: white; opacity: 0.6; transition: opacity 0.2s; position: relative; }
        .nav-btn.active, .nav-btn:hover { opacity: 1; }
        .nav-btn svg { width: 1.5rem; height: 1.5rem; margin-bottom: 0.25rem; }
        .nav-btn span { font-size: 0.625rem; font-weight: 500; }
        .nav-badge { position: absolute; top: 0.25rem; right: calc(50% - 1.25rem); width: 18px; height: 18px; background-color: var(--c-danger); color: white; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 2px solid var(--c-primary); }

        .fab { position: absolute; bottom: 5rem; right: 1rem; width: 3rem; height: 3rem; background-color: var(--c-primary); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-lg); transition: all 0.3s; opacity: 0; pointer-events: none; transform: translateY(1rem); z-index: 20; }
        .fab.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
        .fab svg { width: 1.5rem; height: 1.5rem; flex-shrink: 0; }

        .toast { position: fixed; top: 1.25rem; left: 50%; transform: translateX(-50%) translateY(-1.25rem); background-color: var(--c-text-main); color: white; padding: 0.625rem 1rem; border-radius: var(--radius-xl); font-size: 0.875rem; font-weight: 500; white-space: nowrap; opacity: 0; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); z-index: 1000; pointer-events: none; box-shadow: var(--shadow-lg); }
        .toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

        .grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; padding: 1rem; }
        .grid-2 > * { min-width: 0; }
        #view-home .home-products { padding: 0; }
        .category-scroll { padding-top: 0; }
        .category-products { align-content: start; }
        .p-4 { padding: 1rem; } .p-5 { padding: 1.25rem; }
        .scroll-area.p-4 { padding: 1rem 1rem calc(var(--bottom-nav-height) + var(--bottom-content-gap) + env(safe-area-inset-bottom)); }
        .scroll-area.p-5 { padding: 1.25rem 1.25rem calc(var(--bottom-nav-height) + var(--bottom-content-gap) + env(safe-area-inset-bottom)); }
        
        .category-card { background-color: var(--c-surface); border-radius: var(--radius-2xl); padding: 1rem; display: flex; flex-direction: column; justify-content: space-between; gap: 0.75rem; position: relative; overflow: hidden; min-height: 7.5rem; border: 1px solid var(--c-border-dark); box-shadow: var(--shadow-sm); cursor: pointer; width: 100%; text-align: left; isolation: isolate; transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; }
        .category-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--c-primary-light); }
        .category-card__title { display: block; position: relative; z-index: 1; max-width: calc(100% - 2rem); color: var(--c-text-main); font-size: 0.95rem; line-height: 1.25; margin: 0; font-weight: 700; pointer-events: none; overflow-wrap: anywhere; }
        .category-card__bg-emoji { align-self: flex-end; width: 3.5rem; height: 3.5rem; border-radius: 1.1rem; display: flex; align-items: center; justify-content: center; background: var(--c-primary-light); color: var(--c-primary-text); font-size: 2rem; line-height: 1; pointer-events: none; -webkit-user-select: none; user-select: none; box-shadow: inset 0 0 0 1px rgba(5, 150, 105, 0.08); }
        #view-catalog .category-card { min-height: 5.3125rem; padding: 1rem 1.05rem; border: 0; border-radius: 0.875rem; background: #74cb1f36; box-shadow: none; display: flex; flex-direction: column; justify-content: center; gap: 0; }
        #view-catalog .category-card:hover { transform: translateY(-3px); box-shadow: 0 0.75rem 1.5rem rgba(31, 41, 55, 0.08); }
        #view-catalog .category-card__title { max-width: 62%; font-size: 0.875rem; line-height: 1.2; font-weight: 600; overflow-wrap: normal; }
        #view-catalog .category-card__bg-emoji { position: absolute; top: 50%; left: 72%; transform: translate(-50%, -50%); width: auto; height: auto; border-radius: 0; background: transparent; box-shadow: none; color: inherit; font-size: 4.5rem; opacity: 0.42; transition: transform 0.3s ease, opacity 0.3s ease; }
        #view-catalog .category-card:hover .category-card__bg-emoji { transform: translate(-50%, -50%) scale(1.06) rotate(-5deg); opacity: 0.62; }

        .product-card { position: relative; min-width: 0; height: 100%; background-color: var(--c-surface); border-radius: var(--radius-2xl); padding: 0.75rem; display: flex; flex-direction: column; border: 1px solid var(--c-border); box-shadow: var(--shadow-sm); cursor: pointer;}
        .product-img { position: relative; width: 100%; aspect-ratio: 1 / 1; background-color: var(--c-bg-app); border-radius: var(--radius-xl); display: flex; align-items: center; justify-content: center; font-size: 3rem; margin-bottom: 0.75rem; overflow: hidden; }
        .product-title { font-weight: 600; font-size: 0.75rem; color: var(--c-text-main); line-height: 1.25; margin-bottom: 0.25rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; height: 2rem; pointer-events: none;}
        .product-weight { font-size: 0.625rem; color: var(--c-text-muted); pointer-events: none;}
        .cart-action-overlay { position: absolute; right: 0.5rem; bottom: 0.5rem; width: 5.875rem; height: 2.375rem; border-radius: 999px; z-index: 5; pointer-events: auto; transition: width 0.3s ease; }
        .cart-action-overlay.is-active { width: 6.875rem; }
        .product-price { font-weight: 800; font-size: 0.875rem; color: inherit; white-space: nowrap; pointer-events: none; }
        .cart-action-price { position: absolute; right: 0.5rem; bottom: calc(100% + 0.375rem); padding: 0.1875rem 0.5rem; border-radius: 999px; background: var(--c-surface); color: var(--c-text-main); font-weight: 800; font-size: 0.75rem; line-height: 1.2; white-space: nowrap; box-shadow: 0 0.375rem 0.75rem rgba(15, 23, 42, 0.12); opacity: 0; transform: translateY(0.25rem); transition: opacity 0.2s ease, transform 0.2s ease; pointer-events: none; }
        .cart-action-overlay.is-active .cart-action-price { opacity: 1; transform: translateY(0); }
        .product-discount-badge { display: inline-flex; align-items: center; justify-content: center; min-height: 1.45rem; padding: 0.2rem 0.45rem; border-radius: 999px; background: #dc2626; color: #fff; font-size: 0.75rem; font-weight: 800; line-height: 1; white-space: nowrap; }
        .product-discount-badge--card { position: absolute; top: 0.5rem; left: 0.5rem; z-index: 3; box-shadow: 0 0.375rem 0.75rem rgba(127, 29, 29, 0.18); }
        .product-list-badges { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-bottom: 0.5rem; }
        .product-list-badges--card { position: absolute; top: 0.5rem; right: 0.5rem; z-index: 3; justify-content: flex-end; max-width: calc(100% - 4rem); margin-bottom: 0; }
        .product-list-badge { display: inline-flex; align-items: center; justify-content: center; min-height: 1.35rem; padding: 0.18rem 0.42rem; border-radius: 999px; color: #fff; font-size: 0.7rem; font-weight: 800; line-height: 1; white-space: nowrap; box-shadow: 0 0.375rem 0.75rem rgba(15, 23, 42, 0.14); }
        .product-list-badge--hit { background: #ea580c; }
        .product-list-badge--new { background: #059669; }
        
        .product-action-container { z-index: 5; pointer-events: auto; }
        .btn-add { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0 0.8125rem; border-radius: 999px; background-color: var(--c-surface); color: var(--c-text-main); display: flex; align-items: center; justify-content: center; gap: 0.35rem; font-size: 0.8125rem; font-weight: 800; box-shadow: 0 0.5rem 1rem rgba(15, 23, 42, 0.13); transition: color 0.2s ease, opacity 0.2s ease; }
        .btn-add:hover { color: var(--c-primary); }
        .cart-action-overlay.is-active .btn-add { opacity: 0; pointer-events: none; }
        .btn-add__icon { font-size: 0.9rem; line-height: 1; }
        .counter-box { display: none; align-items: center; height: 2rem; background-color: var(--c-primary-light); border-radius: 1rem; padding: 0.25rem; gap: 0.25rem; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
        .cart-action-overlay .counter-box { position: absolute; inset: 0; justify-content: space-between; width: 100%; height: 100%; min-width: 0; padding: 0 0.25rem; background-color: var(--c-primary); color: white; border-radius: 999px; box-shadow: 0 0.5rem 1rem rgba(15, 23, 42, 0.16); }

        /* Карточка детального просмотра товара */
        .detail-hero { width: 100%; aspect-ratio: 1 / 1; background-color: var(--c-bg-body); display: flex; align-items: center; justify-content: center; font-size: 8rem; margin-bottom: -1rem;}
        .detail-content { background: var(--c-surface); border-radius: 1.5rem 1.5rem 0 0; padding: 1.5rem 1.25rem; position: relative; flex: 1;}
        .detail-badge { background: var(--c-bg-app); color: var(--c-text-muted); font-size: 0.75rem; font-weight: 600; padding: 0.375rem 0.75rem; border-radius: var(--radius-md); display: inline-block; margin-bottom: 1rem; }
        .detail-title { font-size: 1.5rem; font-weight: 800; line-height: 1.2; margin-bottom: 0.5rem; color: var(--c-text-main); }
        .detail-info-block { border-top: 1px solid var(--c-border); padding-top: 1rem; margin-top: 1rem; }
        .detail-info-title { font-size: 0.875rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--c-text-main); }
        .detail-info-text { font-size: 0.875rem; color: var(--c-text-muted); line-height: 1.6; }
        
        .form-group { margin-bottom: 1rem; }
        .form-label { display: block; font-size: 0.75rem; font-weight: 600; color: var(--c-text-muted); text-transform: uppercase; margin-bottom: 0.5rem; margin-left: 0.25rem; }
        .form-input { width: 100%; background-color: var(--c-bg-app); border: 1px solid var(--c-border-dark); color: var(--c-text-main); border-radius: var(--radius-xl); padding: 0.875rem 1rem; outline: none; transition: all 0.2s; font-size: 1rem; font-weight: 500; }
        .form-input:focus { background-color: var(--c-surface); border-color: var(--c-primary); box-shadow: 0 0 0 2px var(--c-primary-light); }
        .form-input[readonly] { color: var(--c-text-muted); cursor: default; }
        .form-input:disabled { opacity: 0.7; cursor: not-allowed; }
        .payment-methods { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; margin: 0.25rem 0 1rem; }
        .payment-method { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.35rem; min-height: 4.25rem; padding: 0.65rem 0.35rem; border: 1px solid var(--c-border-dark); border-radius: var(--radius-xl); background: var(--c-surface); color: var(--c-text-main); font-weight: 700; font-size: 0.72rem; line-height: 1.1; text-align: center; }
        .payment-method input { position: absolute; opacity: 0; pointer-events: none; }
        .payment-method__icon { display: grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 999px; background: var(--c-bg-app); font-size: 1.05rem; }
        .payment-method:has(input:checked) { border-color: var(--c-primary); background: var(--c-primary-light); color: var(--c-primary-text); }
        .payment-method:has(input:checked) .payment-method__icon { background: var(--c-surface); }
        .payment-method--disabled { color: var(--c-text-muted); background: var(--c-bg-app); opacity: 0.55; cursor: not-allowed; }
        .btn-primary { width: 100%; background-color: var(--c-primary); color: white; font-weight: 600; border-radius: var(--radius-xl); padding: 1rem; text-align: center; box-shadow: 0 4px 14px 0 rgba(5, 150, 105, 0.3); transition: background-color 0.2s; }
        .btn-primary:hover { background-color: var(--c-primary-hover); }
        .order-submit-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 0.625rem; min-height: 3.5rem; overflow: hidden; transition: background-color 0.2s, opacity 0.2s, transform 0.2s; }
        .order-submit-btn:disabled { cursor: wait; opacity: 0.92; }
        .order-submit-btn.is-loading { background-color: var(--c-primary-hover); animation: orderSubmitPulse 1.25s ease-in-out infinite; }
        .order-submit-btn.is-loading::before { content: ""; width: 1.125rem; height: 1.125rem; border-radius: 50%; border: 2px solid rgba(255,255,255,0.42); border-top-color: #fff; animation: orderSubmitSpin 0.7s linear infinite; flex: 0 0 auto; }
        .order-submit-btn__label { line-height: 1.2; }
        @keyframes orderSubmitSpin { to { transform: rotate(360deg); } }
        @keyframes orderSubmitPulse {
            0%, 100% { box-shadow: 0 4px 14px 0 rgba(5, 150, 105, 0.28); }
            50% { box-shadow: 0 8px 22px 0 rgba(5, 150, 105, 0.42); }
        }
        .btn-outline { width: 100%; background-color: var(--c-surface); color: var(--c-danger); font-weight: 600; border-radius: var(--radius-xl); padding: 1rem; text-align: center; border: 1px solid var(--c-danger-light); }
        .hidden { display: none !important; }
        .surface-view { background: var(--c-surface); }
        .header-row { display: flex; align-items: center; gap: 0.75rem; }
        .header-row--wide { width: 100%; gap: 1rem; }
        .heading-md { font-size: 1.25rem; }
        .icon-btn { color: inherit; padding: 0.25rem; margin-left: -0.25rem; }
        .icon-btn--muted { color: var(--c-text-muted); display: block; margin-left: 0; }
        .icon-btn--main { color: var(--c-text-main); }
        .icon-btn--floating { background: rgba(255,255,255,0.8); border-radius: 50%; padding: 0.5rem; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
        .section-kicker { font-size: 0.75rem; font-weight: 700; color: var(--c-text-light); text-transform: uppercase; margin-bottom: 0.75rem; }
        .product-detail-scroll { padding-bottom: 7rem; padding-top: 0; }
        .price-block { margin: 1.5rem 0; }
        .detail-price { font-size: 2rem; font-weight: 800; color: var(--c-text-main); }
        .mb-6 { margin-bottom: 1.5rem; }
        .header-clean { border: none; }
        .auth-main { display: flex; flex-direction: column; padding-top: 1rem; }
        .auth-intro { text-align: center; margin-bottom: 2rem; }
        .auth-intro--compact { margin-bottom: 1rem; }
        .auth-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.25rem; }
        .auth-copy { font-size: 0.875rem; color: var(--c-text-muted); }
        .stack-form { display: flex; flex-direction: column; gap: 1rem; }
        .login-phone { text-align: center; font-size: 1.125rem; letter-spacing: 1px; }
        .clear-cart-btn { color: var(--c-primary-light); font-size: 0.75rem; font-weight: 500; }
        .flex-col { display: flex; flex-direction: column; }
        .full-height-form { display: flex; flex-direction: column; height: 100%; }
        .address-actions--bottom { margin-top: auto; padding-top: 1rem; }
        .btn-outline--primary { color: var(--c-primary); border-color: var(--c-primary-light); background: var(--c-bg-app); }
        .btn-outline--neutral { color: var(--c-text-main); border-color: var(--c-border-dark); background: var(--c-surface); }
        .summary-row { font-size: 0.875rem; color: var(--c-text-muted); margin-bottom: 0.5rem; }
        .summary-total-row { border-top: 1px solid var(--c-bg-app); padding-top: 0.75rem; margin-bottom: 1rem; }
        .summary-total-label { font-weight: 700; }
        .summary-total-value { font-weight: 800; font-size: 1.125rem; }
        .nav-badge--empty { display: none; }
        .category-label { display: flex; align-items: center; gap: 0.75rem; }
        .category-label__icon { font-size: 1.5rem; }
        .sidebar-label { display: flex; align-items: center; }
        .cart-price { font-weight: 800; font-size: 0.875rem; }
        .counter-box--surface { background: var(--c-surface); }
        .counter-box--body { background: var(--c-bg-body); }
        .counter-btn--muted { color: var(--c-text-muted); }
        .counter-val--main { color: var(--c-text-main); }
        .btn-add--hidden { display: none; }
        .product-card__body { display: flex; flex-direction: column; flex: 1; }
        .cart-item { display: flex; align-items: flex-start; gap: 1rem; position: relative; }
        .cart-item__media { width: 4rem; height: 4rem; flex: 0 0 4rem; background: var(--c-bg-app); border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; font-size: 2rem; overflow: hidden; }
        .cart-item__media img { width: 100%; height: 100%; object-fit: contain; display: block; }
        .cart-item__body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; }
        .cart-item__title { font-size: 0.875rem; font-weight: 600; padding-right: 1.5rem; line-height: 1.2; }
        .cart-item__price { font-weight: 700; font-size: 0.875rem; }
        .cart-summary { margin-bottom: 0; }
        .summary-row--spacious { margin-bottom: 0.75rem; }
        .summary-free { color: var(--c-primary); font-weight: 500; }
        .order-success-icon { font-size: 3rem; margin-bottom: 1rem; }
        .order-success-title { font-size: 1.25rem; margin-bottom: 0.5rem; }
        .order-success-text { color: var(--c-text-muted); margin-bottom: 1rem; }
        .order-success-number { display: inline-flex; justify-content: center; align-items: center; min-height: 2.5rem; padding: 0.5rem 0.85rem; border-radius: var(--radius-lg); background: var(--c-primary-light); color: var(--c-primary-text); font-size: 1.15rem; font-weight: 800; margin: 0.25rem 0 0.65rem; }
        .order-success-support { color: var(--c-text-muted); font-size: 0.8rem; margin-bottom: 1rem; word-break: break-word; }
        .order-success-items { display: grid; gap: 0.5rem; margin: 1rem 0; text-align: left; }
        .order-success-item { display: flex; justify-content: space-between; gap: 0.75rem; color: var(--c-text-muted); font-size: 0.9rem; }
        .order-success-item span:first-child { color: var(--c-text-main); }
        .order-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.75rem; }
        .order-card__id { font-size: 0.95rem; font-weight: 700; color: var(--c-text-main); }
        .order-card__meta { font-size: 0.8rem; color: var(--c-text-muted); margin-top: 0.25rem; }
        .order-status { flex-shrink: 0; border-radius: 999px; padding: 0.35rem 0.65rem; font-size: 0.75rem; font-weight: 700; background: var(--c-bg-app); color: var(--c-text-muted); }
        .order-status--active { background: var(--c-primary-light); color: var(--c-primary); }
        .order-status--ready { background: #fff4d6; color: #8a5a00; }
        .order-status--done { background: #e8f7ee; color: #177245; }
        .order-status--cancelled { background: #fdecec; color: var(--c-danger); }
        .order-card__items { display: grid; gap: 0.45rem; margin: 0.75rem 0; }
        .order-card__item { display: flex; justify-content: space-between; gap: 0.75rem; color: var(--c-text-muted); font-size: 0.9rem; }
        .order-card__item span:first-child { color: var(--c-text-main); }
        .order-card__footer { border-top: 1px solid var(--c-border); padding-top: 0.75rem; display: grid; gap: 0.35rem; }
        .order-card__payment { color: var(--c-text-muted); font-size: 0.9rem; }
        .order-card__pay { margin-top: 0.5rem; }
        .profile-card { position: relative; }
        .profile-row { display: flex; align-items: center; gap: 1rem; min-width: 0; width: 100%; }
        .profile-main { min-width: 0; flex: 1; }
        .profile-line { display: flex; align-items: center; gap: 0.35rem; min-width: 0; }
        .avatar--brand { background: var(--c-primary-light); color: var(--c-primary-text); }
        .profile-title { min-width: 0; font-size: 1.125rem; font-weight: 700; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .profile-text { min-width: 0; font-size: 0.875rem; color: var(--c-text-muted); }
        .profile-address-card { padding-top: 0.85rem; padding-bottom: 0.85rem; }
        .profile-address-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .profile-edit-btn { flex: 0 0 2rem; width: 2rem; height: 2rem; border: 0; border-radius: 999px; background: var(--c-primary-light); color: var(--c-primary); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
        .profile-edit-btn svg { width: 1rem; height: 1rem; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: none; }
        .menu-card { padding: 0; overflow: hidden; }
        .menu-label { display: flex; align-items: center; }
        .menu-icon--orders { background: #fef3c7; color: #d97706; }
        .menu-icon--addresses { background: #dbeafe; color: #2563eb; }
        .menu-item__text { font-weight: 500; }
        .address-card { border: 2px solid var(--c-primary); }
        .address-card__body { display: flex; gap: 0.75rem; min-width: 0; }
        .address-card__content { min-width: 0; flex: 1; }
        .address-card__icon { font-size: 1.25rem; }
        .address-card__title { font-size: 0.875rem; font-weight: 700; }
        .address-card__text { font-size: 0.75rem; color: var(--c-text-muted); margin-top: 0.25rem; }
        .address-card__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; margin-top: 0.85rem; }
        .text-muted { color: var(--c-text-muted); }
        .text-sm { font-size: 0.875rem; }
        .full-width { width: 100%; }
        .btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; text-align: center; padding: 0.6rem 1.2rem; border-radius: var(--radius-lg); font-weight: 600; cursor: pointer; transition: all 0.2s; border: 1px solid transparent; text-decoration: none; font-size: 0.95rem; }
        .btn--primary { background: var(--c-primary); color: white; }
        .btn--primary:hover { background: var(--c-primary-hover); }
        .btn--outline { background: white; border-color: var(--c-border-dark); color: var(--c-text-main); }
        .btn--outline:hover { background: #ecfdf5; border-color: #a7f3d0; color: var(--c-primary); }
        .btn--text { background: none; color: var(--c-primary); padding: 0.25rem; }
        .btn--text:hover { color: var(--c-primary-hover); text-decoration: underline; }
        .input { width: 100%; padding: 0.75rem 1rem; border: 1px solid var(--c-border-dark); border-radius: var(--radius-lg); font-size: 1rem; outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
        .input:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.14); }
        .alert { padding: 0.75rem; border-radius: var(--radius-lg); font-size: 0.9rem; margin: 1rem 0; }
        .alert--error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

        .modal-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.6); z-index: 4000; display: flex; align-items: center; justify-content: center; padding: 1rem; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: fadeInOverlay 0.2s forwards; }
        .modal-overlay.hidden { display: none !important; animation: none; }
        #modal-auth { z-index: 4100; }
        .modal { background: var(--c-surface); width: 100%; max-width: 480px; max-height: 90vh; border-radius: 16px; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); position: relative; display: flex; flex-direction: column; animation: slideInModal 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards; overflow: hidden; }
        .modal h3 { margin: 0; padding: 1.5rem 1.5rem 1rem; font-size: 1.25rem; border-bottom: 1px solid var(--c-border-dark); }
        .modal__close { position: absolute; top: 1rem; right: 1rem; width: 32px; height: 32px; border-radius: 50%; background: #f1f5f9; border: none; font-size: 1.5rem; line-height: 1; color: var(--c-text-muted); cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; z-index: 10; }
        .modal__close:hover { background: #e2e8f0; color: var(--c-danger); transform: rotate(90deg); }
        #modal-product { z-index: 4050; }
        #modal-product .modal { max-width: 680px; max-height: min(92vh, 720px); border-radius: 18px; }
        .product-modal { padding: 0.875rem; overflow-y: auto; }
        .product-modal__top { display: grid; grid-template-columns: minmax(104px, 0.8fr) minmax(0, 1.2fr); gap: 0.875rem; align-items: start; }
        .product-modal__media { aspect-ratio: 1 / 1; border-radius: var(--radius-xl); background: var(--c-bg-app); display: flex; align-items: center; justify-content: center; overflow: hidden; font-size: 4rem; }
        .product-modal__media img { width: 100%; height: 100%; object-fit: contain; display: block; }
        .product-modal__body { min-width: 0; padding-right: 2.25rem; }
        .product-modal__title { margin: 0 0 0.375rem; color: var(--c-text-main); font-size: 1.08rem; line-height: 1.18; font-weight: 800; overflow-wrap: anywhere; }
        .product-modal__measure { color: var(--c-text-muted); font-size: 0.8rem; margin-bottom: 0.6rem; }
        .product-modal__price { color: var(--c-text-main); font-size: 1.5rem; line-height: 1; font-weight: 800; margin-bottom: 0.65rem; }
        .product-modal__price-row { display: flex; align-items: center; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 0.65rem; }
        .product-modal__price-row .product-modal__price { margin-bottom: 0; }
        .product-modal__old-price { color: var(--c-text-muted); font-size: 0.95rem; font-weight: 700; text-decoration: line-through; }
        .product-modal__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
        .product-modal__actions .btn-primary { width: auto; min-height: 44px; padding: 0.75rem 1rem; border-radius: var(--radius-lg); box-shadow: none; }
        .product-modal__counter { min-width: 7.5rem; min-height: 44px; padding: 0.35rem 0.5rem; border: 1px solid var(--c-border-dark); border-radius: var(--radius-lg); gap: 0.65rem; box-shadow: none; }
        .product-modal__counter .counter-btn { width: 2rem; height: 2rem; background: var(--c-bg-app); }
        .product-modal__counter .counter-val { min-width: 1.5rem; text-align: center; font-size: 0.95rem; font-weight: 800; }
        .product-modal__section { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--c-border); }
        .product-modal__section-title { margin-bottom: 0.45rem; color: var(--c-text-main); font-size: 0.78rem; font-weight: 800; text-transform: uppercase; }
        .product-modal__meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem; }
        .product-modal__meta-item { min-width: 0; border: 1px solid var(--c-border); border-radius: var(--radius-lg); padding: 0.45rem 0.55rem; background: var(--c-bg-app); }
        .product-modal__meta-label { display: block; color: var(--c-text-muted); font-size: 0.66rem; margin-bottom: 0.1rem; }
        .product-modal__meta-value { display: block; color: var(--c-text-main); font-size: 0.8rem; font-weight: 650; overflow-wrap: anywhere; }
        .product-modal__description-wrap { display: grid; gap: 0.4rem; }
        .product-modal__description { color: var(--c-text-muted); font-size: 0.82rem; line-height: 1.42; white-space: pre-wrap; overflow-wrap: anywhere; }
        .product-modal__description.is-collapsed { position: relative; max-height: 3.55rem; overflow: hidden; }
        .product-modal__description.is-collapsed::after { content: ""; position: absolute; right: 0; bottom: 0; left: 0; height: 1.8rem; background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--c-surface)); pointer-events: none; }
        .product-modal__description-toggle { justify-self: start; color: var(--c-primary); font-size: 0.82rem; font-weight: 800; line-height: 1.2; padding: 0.25rem 0; }
        .product-modal__description-toggle:hover { color: var(--c-primary-hover); }
        .product-modal__barcode { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.78rem; }
        .auth-step { padding: 1.5rem; overflow-y: auto; }
        #modal-auth .auth-step { padding: 2.5rem; }
        #modal-auth h3 { font-size: 1.5rem; text-align: center; margin-bottom: 0.5rem; border: none; padding: 0; }
        #modal-auth .text-muted { text-align: center; margin-bottom: 2rem; display: block; font-size: 1rem; }
        #modal-auth .form-group { margin-bottom: 1.5rem; }
        #modal-auth .btn { min-height: 52px; margin-top: 0.5rem; font-size: 1rem; }
        .auth-consents { display: grid; gap: 0.5rem; margin-bottom: 0.75rem; text-align: left; }
        .auth-consents__item { display: flex; gap: 0.5rem; align-items: flex-start; font-size: 0.88rem; color: var(--c-text-muted); }
        .auth-consents__item input[type="checkbox"] { margin-top: 0.2rem; flex-shrink: 0; }
        .auth-social-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; margin-bottom: 1rem; }
        .auth-social-grid .btn { justify-content: flex-start; margin-top: 0; background: #fff !important; border: 1px solid var(--c-border-dark) !important; color: var(--c-text-main) !important; }
        .auth-social-logo { height: 18px; width: auto; max-width: 56px; display: inline-block; object-fit: contain; flex: 0 0 auto; }
        .auth-divider { margin: 1rem 0 0.75rem; font-size: 0.875rem; }
        .spinner-box { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; padding: 2rem; background: #f8fafc; border-radius: 12px; text-align: center; }
        .spinner { width: 40px; height: 40px; border: 4px solid #e2e8f0; border-top-color: var(--c-primary); border-radius: 50%; animation: spin 1s linear infinite; }
        .code-verify-block { margin-top: 1rem; padding: 1rem; border-radius: 12px; border: 1px solid var(--c-border-dark); background: #fff; }
        .flashcall-note { margin-top: 0.75rem; padding: 1rem; border-radius: 14px; background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; text-align: center; font-size: 1rem; line-height: 1.55; font-weight: 600; }
        .flashcall-message, .flashcall-status { font-size: 1.05rem; line-height: 1.6; }
        .flashcall-message { font-weight: 600; }
        .flashcall-status { color: var(--c-text-muted); }
        .flashcall-phone-link { color: var(--c-primary); font-weight: 700; font-size: 1.1em; text-decoration: underline; }
        .flashcall-phone-link--block { display: block; text-align: center; margin: 0.2rem 0 0.35rem; font-size: 1.25em; }
        .flashcall-text-line { display: block; text-align: center; }
        @keyframes fadeInOverlay { from { opacity: 0; } to { opacity: 1; } }
        @keyframes slideInModal { from { opacity: 0; transform: translateY(20px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
        @keyframes spin { to { transform: rotate(360deg); } }

        /* Ввод кода подтверждения */
        .code-input-container { display: flex; gap: 0.75rem; justify-content: center; margin: 1.5rem 0; }
        .code-input { width: 3.5rem; height: 4rem; font-size: 1.5rem; font-weight: 700; text-align: center; border-radius: var(--radius-xl); border: 1px solid var(--c-border-dark); background: var(--c-bg-app); outline: none; transition: all 0.2s; color: var(--c-text-main); }
        .code-input:focus { border-color: var(--c-primary); box-shadow: 0 0 0 2px var(--c-primary-light); background: var(--c-surface); }

        .list-card { background-color: var(--c-surface); border-radius: var(--radius-2xl); padding: 1rem; border: 1px solid var(--c-border); box-shadow: var(--shadow-sm); margin-bottom: 1rem; }
        .menu-item { display: flex; justify-content: space-between; align-items: center; padding: 1rem; border-bottom: 1px solid var(--c-bg-app); }
        .menu-item:last-child { border-bottom: none; }
        .menu-icon { width: 2rem; height: 2rem; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; margin-right: 0.75rem; font-size: 0.875rem; }
        .address-input-wrap { position: relative; }
        .address-apartment-hint {
            display: none;
            margin: 0 0 0.4rem;
            font-size: 0.78rem;
            font-weight: 700;
            color: var(--c-text-muted);
        }
        .address-apartment-hint.visible { display: block; }
        .address-actions { display: grid; gap: 0.75rem; margin-top: 1rem; }
        .address-suggest-list {
            position: absolute;
            top: calc(100% + 4px);
            left: 0;
            right: 0;
            max-height: 220px;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            overscroll-behavior: contain;
            touch-action: pan-y;
            background: var(--c-surface);
            border: 1px solid var(--c-border-dark);
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow-lg);
            z-index: 60;
        }
        .address-suggest-title {
            padding: 0.55rem 0.7rem 0.15rem;
            color: var(--c-text-muted);
            font-size: 0.78rem;
            font-weight: 600;
        }
        .address-zone-label {
            margin-bottom: 0.5rem;
            color: var(--c-text-muted);
            font-size: 0.95rem;
            font-weight: 600;
        }
        .address-suggest-zone {
            padding: 0 0.7rem 0.55rem;
            color: var(--c-text-muted);
            font-size: 0.72rem;
            line-height: 1.25;
        }
        .address-suggest-item {
            width: 100%;
            border: 0;
            background: transparent;
            padding: 0.55rem 0.7rem;
            text-align: left;
            cursor: pointer;
            color: var(--c-text-main);
            display: block;
            touch-action: pan-y;
        }
        .address-suggest-item + .address-suggest-item { border-top: 1px solid var(--c-border); }
        .address-suggest-item:hover,
        .address-suggest-item:focus-visible {
            background: var(--c-bg-app);
            outline: none;
        }
        .address-suggest-item__meta {
            display: block;
            font-size: 0.78rem;
            color: var(--c-text-muted);
            margin-top: 0.15rem;
        }
        
        .flex-between { display: flex; justify-content: space-between; align-items: center; }
        .text-center { text-align: center; }
        .mt-auto { margin-top: auto; }
        .mb-2 { margin-bottom: 0.5rem; }
        .mb-4 { margin-bottom: 1rem; }
        .avatar { width: 4rem; height: 4rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.25rem; flex-shrink: 0; }
        
        .search-bar { flex: 1; position: relative; }
        .search-bar svg { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); width: 1.25rem; height: 1.25rem; color: var(--c-text-light); }
        .search-bar input { width: 100%; background: var(--c-bg-app); border-radius: var(--radius-xl); padding: 0.625rem 1rem 0.625rem 2.5rem; border: 1px solid var(--c-border-dark); outline: none; font-size: 0.875rem; transition: border-color 0.2s; }
        .search-bar input:focus { border-color: var(--c-primary); }
        .tag { background: var(--c-bg-app); border: 1px solid var(--c-border-dark); color: var(--c-text-main); padding: 0.375rem 0.75rem; border-radius: var(--radius-md); font-size: 0.875rem; font-weight: 500; display: inline-block; margin: 0.25rem; }

        /* ================= АДАПТИВНОСТЬ ДЛЯ ПК ================= */
        @media (min-width: 768px) {
            .mobile-frame { background-color: var(--c-bg-body); }
            
            .desktop-header { display: flex; height: 80px; padding: 0 2rem; background-color: var(--c-surface); border-bottom: 1px solid var(--c-border-dark); align-items: center; justify-content: space-between; z-index: 50; }
            .desktop-logo { display: flex; align-items: center; gap: 0.75rem; height: 100%; cursor: pointer; color: var(--c-text-main); }
            .desktop-logo img { display: block; width: auto; height: 46px; max-width: 80px; object-fit: contain; }
            .desktop-logo__text { display: flex; flex-direction: column; font-weight: 800; font-size: 1.25rem; line-height: 1; letter-spacing: -0.02em; }
            .desktop-logo__text span { color: var(--c-primary); font-size: 0.95rem; margin-top: 0.15rem; }
            .desktop-search-container { flex: 1; max-width: 500px; margin: 0 2rem; }
            .desktop-address {
                display: flex; align-items: center; gap: 0.5rem; max-width: 260px; min-height: 42px;
                padding: 0.625rem 0.875rem; border-radius: var(--radius-lg); background: var(--c-bg-body);
                color: var(--c-text-main); font-size: 0.8125rem; font-weight: 600; cursor: pointer;
                transition: background 0.2s; text-align: left;
            }
            .desktop-address:hover { background: var(--c-border-dark); }
            .desktop-address svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--c-primary); }
            .desktop-address span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
            .desktop-address.empty { color: var(--c-primary); }
            
            .desktop-actions { display: flex; gap: 1rem; align-items: center; }
            .desktop-btn { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; font-size: 0.875rem; padding: 0.625rem 1rem; border-radius: var(--radius-lg); cursor: pointer; transition: background 0.2s; background: var(--c-bg-body); color: var(--c-text-main); }
            .desktop-btn:hover { background: var(--c-border-dark); }
            .desktop-btn.cart { background: var(--c-primary); color: white; }
            .desktop-btn.cart:hover { background: var(--c-primary-hover); }

            .desktop-body { flex-direction: row; }
            
            /* Сайдбар с аккордеоном */
            .desktop-sidebar { display: flex; flex-direction: column; width: 260px; background: var(--c-surface); border-right: 1px solid var(--c-border-dark); overflow-y: auto; padding: 1.5rem 0; }
            .desktop-sidebar, .app-content-wrapper { -ms-overflow-style: none; }
            .desktop-sidebar::-webkit-scrollbar, .app-content-wrapper::-webkit-scrollbar { width: 0; height: 0; display: none; }
            .sidebar-title { padding: 0 1.5rem 0.75rem; font-weight: 700; font-size: 0.75rem; color: var(--c-text-light); text-transform: uppercase; letter-spacing: 0.05em; }
            .sidebar-item { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 1.5rem; cursor: pointer; color: var(--c-text-main); font-weight: 500; font-size: 0.875rem; transition: all 0.2s; }
            .sidebar-item:hover { background: var(--c-bg-body); }
            .sidebar-item.active { color: var(--c-primary); font-weight: 600; background: var(--c-primary-light); border-right: 3px solid var(--c-primary); }
            .sidebar-icon { margin-right: 0.75rem; font-size: 1.25rem; }
            
            .sidebar-group { display: flex; flex-direction: column; }
            .sidebar-chevron { width: 1rem; height: 1rem; transition: transform 0.2s; color: var(--c-text-muted); }
            .sidebar-group.open .sidebar-chevron { transform: rotate(180deg); }
            .sidebar-subcontent { max-height: 0; overflow: hidden; transition: max-height 0.2s; background: var(--c-bg-body); }
            .sidebar-group.open .sidebar-subcontent { max-height: 2000px; }
            .sidebar-subitem { display: block; padding: 0.5rem 1.5rem 0.5rem 3.5rem; font-size: 0.8125rem; cursor: pointer; color: var(--c-text-muted); font-weight: 500; transition: color 0.2s; }
            .sidebar-subitem:hover, .sidebar-subitem.active { color: var(--c-primary); font-weight: 600; }

            .app-content-wrapper { flex: 1; overflow-y: auto; display: flex; flex-direction: column; align-items: center; background-color: var(--c-bg-app); }
            .desktop-cart-panel {
                display: flex; flex-direction: column; width: 320px; background: var(--c-surface);
                border-left: 1px solid var(--c-border-dark); padding: 1.25rem; overflow: hidden;
            }
            .desktop-cart-panel__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
            .desktop-cart-panel__title { font-size: 1rem; font-weight: 800; color: var(--c-text-main); }
            .desktop-cart-panel__count { font-size: 0.75rem; color: var(--c-text-muted); font-weight: 600; }
            .desktop-cart-panel__items { display: flex; flex-direction: column; gap: 0.75rem; overflow-y: auto; min-height: 0; flex: 1; -ms-overflow-style: none; }
            .desktop-cart-panel__items::-webkit-scrollbar { display: none; }
            .desktop-cart-item { display: flex; gap: 0.75rem; padding: 0.75rem; border: 1px solid var(--c-border); border-radius: var(--radius-xl); background: var(--c-bg-app); }
            .desktop-cart-item__media { width: 3.25rem; height: 3.25rem; border-radius: var(--radius-lg); background: var(--c-surface); display: flex; align-items: center; justify-content: center; font-size: 1.75rem; overflow: hidden; flex-shrink: 0; }
            .desktop-cart-item__media img { width: 100%; height: 100%; object-fit: contain; display: block; }
            .desktop-cart-item__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.5rem; }
            .desktop-cart-item__title { font-size: 0.8125rem; font-weight: 700; line-height: 1.2; color: var(--c-text-main); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
            .desktop-cart-panel__summary { border-top: 1px solid var(--c-border-dark); padding-top: 1rem; margin-top: 1rem; }
            .view-panel { max-width: 1200px; padding: 2rem; background: transparent; }
            
            .bottom-nav { display: none; }
            .view-panel > .header { display: none; }
            .scroll-area { padding-bottom: 2rem; padding-top: 0; overflow: visible; }

            .desktop-back-btn { display: block; padding: 1.5rem 3rem 0; flex-shrink: 0; width: 100%; max-width: 1200px; }
            .desktop-back-btn button { color: var(--c-text-muted); display: flex; align-items: center; gap: 0.5rem; font-weight: 500; font-size: 0.875rem; padding-bottom: 1rem; }
            .desktop-back-btn button:hover { color: var(--c-primary); }
            .desktop-back-btn h2 { font-size: 2rem; font-weight: 800; color: var(--c-text-main); margin: 0; }

            .subcategory-nav { padding: 1.5rem 3rem 1rem; border-bottom: none; background: var(--c-bg-app); }
            .grid-2 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; padding: 0 3rem; }
            
            #view-cart main, #view-profile main, #view-edit-profile main, #view-orders main, #view-addresses main, #view-add-address main, #view-catalog main, #view-verify main {
                max-width: 700px; margin: 0 auto; width: 100%; padding: 2rem;
                background: var(--c-surface); border-radius: var(--radius-2xl); border: 1px solid var(--c-border); box-shadow: var(--shadow-sm);
            }
            #view-catalog.view-panel { width: 100%; max-width: 1200px; }
            #view-catalog main {
                max-width: none; padding: 2rem 3rem; background: transparent;
                border: 0; border-radius: 0; box-shadow: none;
            }
            #view-catalog .catalog-accordion {
                grid-template-columns: repeat(3, minmax(0, 1fr));
                gap: 1.75rem;
            }
            #view-catalog .category-card {
                min-height: 5.3125rem; padding: 1rem 1.25rem; border: 0;
                border-radius: 0.875rem; background: #74cb1f36; box-shadow: none;
                display: flex; flex-direction: column; justify-content: center; gap: 0;
            }
            #view-catalog .category-card:hover {
                transform: translateY(-4px);
                box-shadow: 0 8px 16px rgba(0, 0, 0, 0.05);
                border-color: transparent;
            }
            #view-catalog .category-card__title {
                max-width: 60%; font-size: 0.9375rem; line-height: 1.2;
                font-weight: 600; overflow-wrap: normal;
            }
            #view-catalog .category-card__bg-emoji {
                position: absolute; top: 50%; left: 70%; transform: translate(-50%, -50%);
                width: auto; height: auto; border-radius: 0; background: transparent; box-shadow: none;
                color: inherit; font-size: 6.875rem; opacity: 0.42; transition: transform 0.3s ease, opacity 0.3s ease;
            }
            #view-catalog .category-card:hover .category-card__bg-emoji {
                transform: translate(-50%, -50%) scale(1.1) rotate(-5deg);
                opacity: 0.68;
            }
            #view-profile main .list-card { box-shadow: none; border: 1px solid var(--c-border-dark); }
            
            #view-login, #view-verify { justify-content: center; align-items: center; }
            #view-login main, #view-verify main { background: var(--c-surface); padding: 3rem; border-radius: var(--radius-2xl); border: 1px solid var(--c-border); box-shadow: var(--shadow-lg); width: 100%; max-width: 420px; }
            
            #view-product main { max-width: 800px; margin: 0 auto; background: var(--c-surface); border-radius: var(--radius-2xl); padding: 0; border: 1px solid var(--c-border); display: flex; flex-direction: row; overflow: hidden;}
            .detail-hero { width: 50%; aspect-ratio: auto; height: 100%; }
            .detail-content { width: 50%; border-radius: 0; padding: 2.5rem; display: flex; flex-direction: column;}
            
            .fab { bottom: 2rem; right: 2rem; width: auto; padding: 0 1.25rem; border-radius: var(--radius-xl); gap: 0.5rem; }
            .fab::after { content: "Наверх"; font-weight: 600; font-size: 0.875rem; display: block; }
        }
        @media (min-width: 1200px) { .grid-2 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

        .counter-box.show { display: flex; }
        .counter-btn {
            width: 1.5rem; height: 1.5rem; border-radius: 50%;
            display: inline-flex; align-items: center; justify-content: center;
            color: var(--c-primary-hover); font-weight: 800;
        }
        .cart-action-overlay .counter-btn { width: 1.875rem; height: 100%; color: white; font-size: 1.125rem; }
        .cart-action-overlay .counter-btn:hover { background: rgba(255, 255, 255, 0.18); }
        .cart-action-overlay .counter-val { min-width: 1rem; color: white; font-size: 0.875rem; font-weight: 800; text-align: center; }
        .product-img img, .detail-hero img {
            width: 100%; height: 100%; object-fit: contain; display: block;
        }
        .detail-hero img { padding: 2rem; }
        .empty-state {
            grid-column: 1 / -1; padding: 2rem 1rem; text-align: center;
            color: var(--c-text-muted); background: var(--c-surface);
            border: 1px solid var(--c-border); border-radius: var(--radius-2xl);
        }
        .cart-form {
            display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1rem;
        }
        .search-results {
            display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 0.75rem; margin-top: 1rem;
        }
        @media (min-width: 768px) {
            .search-results { grid-template-columns: repeat(3, minmax(0, 1fr)); }
        }
        @media (max-width: 767px) {
            .modal { max-width: 92vw; max-height: 88vh; border-radius: 16px; }
            #modal-product { align-items: flex-end; padding: 0; }
            #modal-product .modal { width: 100%; max-width: none; max-height: 92vh; border-radius: 18px 18px 0 0; }
            .product-modal { padding: 0.85rem 0.85rem calc(1rem + env(safe-area-inset-bottom)); }
            .product-modal__top { grid-template-columns: 105px minmax(0, 1fr); gap: 0.85rem; }
            .product-modal__title { font-size: 1rem; }
            .product-modal__price { font-size: 1.35rem; }
            .product-modal__meta { grid-template-columns: 1fr; }
            #modal-auth .modal { max-height: 92vh; }
            #modal-auth .modal__close { top: 0.75rem; right: 0.75rem; width: 36px; height: 36px; }
            #modal-auth .auth-step { padding: 1.25rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom)); }
            #modal-auth h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }
            #modal-auth .text-muted { margin-bottom: 1.25rem; }
            #modal-auth .btn { min-height: 48px; }
        }
