/* =========================================
   ПЕРЕМЕННЫЕ И ТЕМЫ
   ========================================= */
:root {
    --bg: #ffffff;
    --header-bg: rgba(255, 255, 255, 0.85);
    --orb-1: rgba(0, 113, 227, 0.15);
    --orb-2: rgba(120, 0, 255, 0.1);

    --text: #1d1d1f;
    --text-muted: #86868b;
    --accent: #0071e3;
    --accent-hover: #0077ED;
    --accent-alpha: rgba(0, 113, 227, 0.1);
    --card-bg: #f5f5f7;
    --border: #e5e5ea;
    --modal-overlay: rgba(0, 0, 0, 0.5);
    --modal-bg: #ffffff;
    --scroll-track: transparent;
    --scroll-thumb: #d2d2d7;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 14px 40px rgba(0, 0, 0, 0.08);
    --bezier: cubic-bezier(0.25, 1, 0.5, 1);
}

html[data-theme="dark"] {
    --bg: #000000;
    --header-bg: rgba(0, 0, 0, 0.85);
    --orb-1: rgba(10, 132, 255, 0.15);
    --orb-2: rgba(94, 0, 255, 0.15);

    --text: #f5f5f7;
    --text-muted: #a1a1a6;
    --accent: #0a84ff;
    --accent-hover: #0071e3;
    --accent-alpha: rgba(10, 132, 255, 0.15);
    --card-bg: #1c1c1e;
    --border: #38383a;
    --modal-overlay: rgba(0, 0, 0, 0.8);
    --modal-bg: #1c1c1e;
    --scroll-track: transparent;
    --scroll-thumb: #444444;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 14px 40px rgba(0, 0, 0, 0.8);
}

/* =========================================
   БАЗА И АНИМИРОВАННЫЙ ФОН
   ========================================= */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    transition: background-color 0.4s var(--bezier), color 0.4s var(--bezier);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    position: relative;
    z-index: 0;
}

body::before, body::after {
    content: '';
    position: fixed;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
    animation: floatOrbs 25s ease-in-out infinite alternate;
}

body::before { top: -20%; left: -10%; background: var(--orb-1); }
body::after { bottom: -20%; right: -10%; background: var(--orb-2); animation-delay: -12.5s; }

@keyframes floatOrbs {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(10%, 15%) scale(1.1); }
    100% { transform: translate(-10%, -10%) scale(0.9); }
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--scroll-track); }
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 10px; }

.container { max-width: 1300px; margin: 0 auto; padding: 0 20px; }

/* =========================================
   ШАПКА И ПЕРЕКЛЮЧАТЕЛЬ ЯЗЫКА
   ========================================= */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
}
.header-flex { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; cursor: pointer; }

.main-nav { display: flex; gap: 30px; }
.nav-link { background: none; border: none; font-size: 15px; font-weight: 600; color: var(--text-muted); cursor: pointer; transition: color 0.2s; }
.nav-link:hover, .nav-link.active { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: 15px; }

.lang-select { background: transparent; color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; font-size: 14px; font-weight: 600; cursor: pointer; outline: none; appearance: none; -webkit-appearance: none; text-align: center; }
.lang-select option { background: var(--modal-bg); color: var(--text); }

.theme-btn, .cart-btn { background: none; border: none; cursor: pointer; color: var(--text); padding: 8px; border-radius: 50%; transition: background 0.2s; position: relative; display: flex; align-items: center; justify-content: center; }
.theme-btn:hover, .cart-btn:hover { background: var(--card-bg); }
.icon-svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cart-badge { position: absolute; top: 0; right: 0; background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

.view { display: none; opacity: 0; animation: fadeIn 0.4s forwards; }
.view.active { display: block; opacity: 1; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* =========================================
   ГЛАВНАЯ СТРАНИЦА (BENTO GRID)
   ========================================= */
.hero-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; margin-top: 30px; }
.hero-main { background: var(--card-bg); border-radius: 32px; padding: 80px 60px; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.hero-glow { position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle at 50% 50%, var(--accent-alpha), transparent 50%); opacity: 0.6; animation: rotateGlow 20s linear infinite; pointer-events: none; }
@keyframes rotateGlow { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.hero-title { font-size: 64px; font-weight: 800; line-height: 1.05; margin-bottom: 24px; letter-spacing: -1.5px; position: relative; z-index: 2; }
.hero-subtitle { font-size: 18px; color: var(--text-muted); margin-bottom: 40px; max-width: 420px; line-height: 1.5; font-weight: 500; position: relative; z-index: 2; }

.btn-primary { background: var(--text); color: var(--bg); border: none; padding: 18px 36px; border-radius: 20px; font-size: 16px; font-weight: 700; cursor: pointer; transition: transform 0.2s; }
.hero-btn { display: flex; align-items: center; gap: 12px; position: relative; z-index: 2; }
.hero-btn .icon-svg { transition: transform 0.3s var(--bezier); }
.hero-btn:hover .icon-svg { transform: translateX(6px); }
.btn-primary:active { transform: scale(0.96); }

.hero-categories { display: flex; flex-direction: column; gap: 24px; }
.hero-cat-card { background: var(--card-bg); border-radius: 32px; flex: 1; padding: 40px; display: flex; justify-content: space-between; align-items: flex-end; cursor: pointer; transition: all 0.4s var(--bezier); position: relative; overflow: hidden; }
.hero-cat-card:hover { transform: translateY(-6px); background: var(--text); color: var(--bg); box-shadow: var(--shadow-hover); }
.hero-cat-card:hover .cat-desc, .hero-cat-card:hover .cat-icon { color: var(--bg); }
.cat-content h3 { font-size: 36px; font-weight: 800; letter-spacing: -1px; margin-bottom: 8px; }
.cat-desc { font-size: 15px; font-weight: 600; color: var(--text-muted); transition: color 0.4s; }
.cat-icon { width: 90px; height: 90px; color: var(--text-muted); opacity: 0.15; transition: all 0.4s var(--bezier); transform-origin: bottom right; }
.hero-cat-card:hover .cat-icon { opacity: 1; transform: scale(1.1) rotate(-10deg); }

/* =========================================
   КАТАЛОГ И ФИЛЬТРЫ
   ========================================= */
.layout { display: flex; flex-direction: column; gap: 30px; margin-top: 40px; }
.catalog-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 10px; position: relative; z-index: 10; padding-top: 30px;}
.section-title { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; }
.items-count { font-size: 14px; font-weight: 600; color: var(--text-muted); }

.filter-toggle-btn { background: var(--card-bg); border: 1px solid var(--border); color: var(--text); padding: 8px 16px; border-radius: 14px; font-size: 14px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: all 0.2s var(--bezier); }
.filter-toggle-btn:hover { border-color: var(--text); }
.filter-toggle-btn:active { transform: scale(0.95); }

/* Внутренности выезжающей панели фильтров */
.filter-body { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 24px; }
.search-box { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: rgba(120, 120, 128, 0.12); border-radius: 14px; border: 1px solid transparent; transition: all 0.3s var(--bezier); }
.search-box:focus-within { background: var(--bg); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-alpha); }
.search-box input { border: none; background: transparent; color: var(--text); font-size: 15px; width: 100%; outline: none; font-weight: 500; }
.search-box input::placeholder { color: var(--text-muted); }

.filter-section { margin-bottom: 0; }
.filter-title { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--text-muted); margin-bottom: 12px; letter-spacing: 0.5px; }

/* Сетка брендов со скроллом при раскрытии */
.brands-grid { display: flex; flex-wrap: wrap; gap: 8px; max-height: 42px; overflow: hidden; transition: max-height 0.5s var(--bezier); }
.brands-grid.expanded { max-height: 200px; overflow-y: auto; padding-right: 6px; }

/* Сетка размеров со скроллом */
.sizes-grid { display: flex; flex-wrap: wrap; gap: 8px; max-height: 160px; overflow-y: auto; align-content: flex-start; padding-right: 6px; }
.sizes-grid::-webkit-scrollbar, .brands-grid.expanded::-webkit-scrollbar { width: 6px; }
.sizes-grid::-webkit-scrollbar-track, .brands-grid.expanded::-webkit-scrollbar-track { background: transparent; }
.sizes-grid::-webkit-scrollbar-thumb, .brands-grid.expanded::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
.sizes-grid::-webkit-scrollbar-thumb:hover, .brands-grid.expanded::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

.brand-box, .size-box { flex-shrink: 0; background: rgba(120, 120, 128, 0.08); border: 1px solid rgba(120, 120, 128, 0.2); color: var(--text); cursor: pointer; transition: all 0.2s var(--bezier); }
.brand-box { border-radius: 20px; padding: 10px 18px; font-size: 13px; font-weight: 600; height: 40px; display: inline-flex; align-items: center; }
.size-box { border-radius: 12px; min-width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; }

.brand-box:hover, .size-box:hover { background: rgba(120, 120, 128, 0.16); border-color: var(--text-muted); }
.brand-box:active, .size-box:active { transform: scale(0.95); }
.brand-box.selected, .size-box.selected { background: var(--text); color: var(--bg); border-color: var(--text); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }

.brand-box.show-more { background: transparent; color: var(--text-muted); border: 1px dashed rgba(120, 120, 128, 0.4); display: inline-block; margin-top: 12px; height: 40px; line-height: 18px; }
.brand-box.show-more:hover { background: rgba(120, 120, 128, 0.08); color: var(--text); border-style: solid; }

/* КАРТОЧКИ ТОВАРОВ */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 32px; position: relative; z-index: 1; margin-top: 20px;}
.card { cursor: pointer; position: relative; transition: transform 0.4s var(--bezier); }
.card:hover { transform: translateY(-6px); }
.card-img-wrap { background: var(--card-bg); border-radius: 20px; aspect-ratio: 4/5; overflow: hidden; margin-bottom: 16px; }
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; object-position: center bottom; transition: transform 0.6s var(--bezier); }
.card:hover .card-img-wrap img { transform: scale(1.06); }
.card-brand { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; margin-bottom: 6px; }
.card-title { font-size: 16px; font-weight: 600; line-height: 1.3; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-price { font-size: 16px; font-weight: 700; }
.price-cents { font-size: 0.65em; vertical-align: top; position: relative; top: 0.2em; font-weight: 700; }

.pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px; margin: 60px 0; width: 100%; }
.page-btn { width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 12px; background: transparent; color: var(--text); font-weight: 600; font-size: 15px; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; }
.page-btn.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.page-btn:hover:not(.active) { border-color: var(--text); background: var(--card-bg); }
.page-dots { display: flex; align-items: flex-end; justify-content: center; width: 44px; height: 44px; font-weight: 600; color: var(--text-muted); }

/* =========================================
   МОДАЛКА ТОВАРА, КОРЗИНА И ВЫЕЗЖАЮЩИЕ ПАНЕЛИ
   ========================================= */
.modal-overlay { position: fixed; inset: 0; background: var(--modal-overlay); backdrop-filter: blur(8px); z-index: 1000; display: flex; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: opacity 0.3s; padding: 20px; }
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-content { background: var(--modal-bg); border: 1px solid var(--border); border-radius: 28px; width: 100%; max-width: 960px; max-height: 90vh; overflow-y: auto; display: grid; grid-template-columns: 1fr 1fr; transform: translateY(20px) scale(0.98); transition: 0.4s var(--bezier); }
.modal-overlay.active .modal-content { transform: translateY(0) scale(1); }
.modal-img { width: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: center bottom; border-radius: 28px 0 0 28px; }
.modal-info { padding: 48px; position: relative; }
.close-btn { position: absolute; top: 24px; right: 24px; background: var(--card-bg); border: none; border-radius: 50%; width: 40px; height: 40px; cursor: pointer; color: var(--text); transition: 0.2s; display: flex; align-items: center; justify-content: center; }
.close-btn:hover { background: var(--border); }
.modal-brand { font-size: 14px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; margin-bottom: 12px; }
.modal-title { font-size: 32px; font-weight: 700; line-height: 1.1; margin-bottom: 16px; }
.modal-price { font-size: 24px; font-weight: 700; margin-bottom: 40px; color: var(--accent); }
.sizes-label { font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.btn-buy { width: 100%; background: var(--accent); color: #fff; border: none; padding: 18px; border-radius: 16px; font-size: 16px; font-weight: 600; cursor: pointer; transition: 0.2s; display: flex; justify-content: center; align-items: center; gap: 8px; }
.btn-buy:active { transform: scale(0.97); }

/* Выезжающая панель (используется для Корзины и Фильтров) */
.cart-overlay { position: fixed; inset: 0; background: var(--modal-overlay); z-index: 2000; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.cart-overlay.active { opacity: 1; pointer-events: auto; }
.cart-panel { position: absolute; right: 0; top: 0; height: 100vh; width: 400px; max-width: 100%; background: var(--modal-bg); box-shadow: -10px 0 40px rgba(0,0,0,0.1); transform: translateX(100%); transition: transform 0.4s var(--bezier); display: flex; flex-direction: column; }
.cart-overlay.active .cart-panel { transform: translateX(0); }
.cart-header { padding: 24px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.cart-header h3 { font-size: 24px; font-weight: 800; }
.cart-items { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.cart-item { display: flex; gap: 16px; border-bottom: 1px solid var(--border); padding-bottom: 20px; }
.cart-item-img { width: 80px; height: 80px; border-radius: 12px; object-fit: cover; background: var(--card-bg); }
.cart-item-info { flex: 1; }
.cart-item-title { font-size: 15px; font-weight: 600; line-height: 1.2; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cart-item-size { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.cart-item-price { font-size: 15px; font-weight: 700; }
.cart-controls { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.qty-btn { background: var(--card-bg); border: none; width: 28px; height: 28px; border-radius: 6px; font-weight: bold; cursor: pointer; color: var(--text); }
.cart-remove { background: none; border: none; color: #ff3b30; font-size: 13px; font-weight: 600; cursor: pointer; }
.cart-footer { padding: 24px; border-top: 1px solid var(--border); }
.cart-total { display: flex; justify-content: space-between; font-size: 20px; font-weight: 800; margin-bottom: 20px; }
.cart-empty { text-align: center; color: var(--text-muted); margin-top: 50px; font-weight: 500; }

.checkout-content { grid-template-columns: 1fr; max-width: 500px; padding: 40px; }
.checkout-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 13px; font-weight: 700; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; }
.form-group input { width: 100%; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); color: var(--text); font-size: 16px; font-weight: 500; outline: none; }
.form-group input:focus { border-color: var(--accent); }

.toast { position: fixed; bottom: 40px; right: 40px; background: var(--text); color: var(--bg); border-radius: 16px; overflow: hidden; box-shadow: 0 15px 40px rgba(0,0,0,0.2); transform: translateY(150px); opacity: 0; transition: all 0.5s var(--bezier); z-index: 3000; pointer-events: none; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast-content { display: flex; align-items: center; gap: 12px; padding: 16px 24px; font-weight: 600; font-size: 15px; }
.empty-state, .loader { grid-column: 1 / -1; text-align: center; padding: 80px 0; color: var(--text-muted); font-size: 16px; font-weight: 500; }

/* =========================================
   ВИДЖЕТ-ПЕРЕХОДНИК INSTAGRAM ЧАТА
   ========================================= */
.chat-widget {
    position: fixed;
    bottom: 40px;
    left: 40px;
    z-index: 900;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    pointer-events: none; /* ГЛАВНЫЙ ФИКС: Пропускаем клики сквозь контейнер */
}
.chat-toggle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #f99339;
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(249, 147, 57, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.3s var(--bezier);
    animation: pulse 2.5s infinite;
    pointer-events: auto; /* Возвращаем кликабельность кнопке */
}
.chat-toggle:hover { transform: scale(1.05); animation: none; }
.chat-toggle .icon-svg { width: 30px; height: 30px; transition: transform 0.3s var(--bezier); stroke: currentColor; fill: none;}
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(249, 147, 57, 0.4); } 70% { box-shadow: 0 0 0 20px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.chat-popup {
    width: 320px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    margin-bottom: 20px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s var(--bezier);
    transform-origin: bottom left;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
    pointer-events: auto; /* Возвращаем кликабельность окну чата */
}
.chat-popup.active { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

.chat-header { background: #1a1a1a; padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; color: #fff; }
.chat-agent { display: flex; align-items: center; gap: 12px; }
.agent-avatar { width: 44px; height: 44px; border-radius: 50%; background: #333; display: flex; justify-content: center; align-items: center; position: relative; border: 2px solid #f99339; }
.agent-avatar svg { width: 24px; height: 24px; color: #fff; }
.online-dot { position: absolute; bottom: 0; right: 0; width: 12px; height: 12px; background: #31a24c; border: 2px solid #1a1a1a; border-radius: 50%; }
.agent-name { font-size: 16px; font-weight: 700; line-height: 1.2; }
.agent-role { font-size: 13px; color: #aaa; }
.chat-close { background: none; border: none; color: #aaa; cursor: pointer; display: flex; transition: 0.2s; }
.chat-close:hover { color: #fff; }
.chat-close svg { width: 20px; height: 20px; }

.chat-body { padding: 20px; background: #fff; }
.chat-time { text-align: center; font-size: 11px; color: #b0b3b8; margin-bottom: 16px; font-weight: 500; }
.chat-message-row { display: flex; gap: 10px; margin-bottom: 24px; }
.chat-msg-avatar { width: 32px; height: 32px; border-radius: 50%; background: #f0f2f5; display: flex; justify-content: center; align-items: center; flex-shrink: 0; }
.chat-msg-avatar svg { width: 18px; height: 18px; color: #65676b; }
.chat-bubble { background: #f0f2f5; color: #1c1e21; padding: 12px 16px; border-radius: 0 16px 16px 16px; font-size: 14px; line-height: 1.4; font-weight: 500; }

.chat-ig-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; background: #f99339; color: #fff; text-decoration: none; padding: 14px; border-radius: 8px; font-weight: 700; font-size: 15px; transition: 0.2s; }
.chat-ig-btn:hover { background: #e08433; }
.chat-ig-btn svg { width: 20px; height: 20px; }

/* =========================================
   МОБИЛЬНАЯ ВЕРСИЯ (ДО 1024px)
   ========================================= */
@media (max-width: 1024px) {
    /* --- ИСПРАВЛЕННАЯ ШАПКА И НАВИГАЦИЯ --- */
    .header-flex { flex-wrap: wrap; }
    .logo { order: 1; font-size: 22px; }
    .header-actions { order: 2; }
    .main-nav {
        display: flex;
        order: 3;
        width: 100%;
        justify-content: space-around; /* Равномерно распределяем кнопки */
        gap: 10px;
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid var(--border);
    }
    .nav-link { font-size: 15px; padding: 5px; }

    /* --- ОСТАЛЬНЫЕ БЛОКИ --- */
    .hero-grid { grid-template-columns: 1fr; margin-top: 10px; }
    .hero-main { padding: 40px 24px; border-radius: 28px; }
    .hero-title { font-size: 42px; letter-spacing: -1px; }
    .hero-categories { flex-direction: column; }
    .hero-cat-card { padding: 30px 24px; border-radius: 28px; }
    .cat-icon { width: 60px; height: 60px; }
    .cat-content h3 { font-size: 28px; }

    .layout { gap: 16px; margin-top: 20px; }

    .grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; position: relative; z-index: 1; margin-top: 20px;}
    .card:active { transform: scale(0.98); }
    .card-title { font-size: 13px; }
    .card-price { font-size: 14px; }

    .modal-overlay { align-items: flex-end; padding: 0; }
    .modal-content { grid-template-columns: 1fr; border-radius: 28px 28px 0 0; border: none; transform: translateY(100%); max-height: 90vh; }
    .modal-img { border-radius: 28px 28px 0 0; }
    .modal-info { padding: 24px; }
    .close-btn { background: rgba(0,0,0,0.4); color: white; top: 16px; right: 16px; }

    /* Выезжающие панели для Корзины и Фильтров (снизу на телефоне) */
    .cart-panel { width: 100%; border-radius: 24px 24px 0 0; height: 90vh; top: auto; bottom: 0; transform: translateY(100%); }
    .cart-overlay.active .cart-panel { transform: translateY(0); }
    .checkout-content { border-radius: 28px 28px 0 0; padding: 24px; }

    .toast { bottom: 20px; left: 20px; right: 20px; }

    /* Чат-виджет слева */
    .chat-widget { bottom: 20px; left: 20px; right: auto; }
    .chat-toggle { width: 54px; height: 54px; }
    .chat-toggle .icon-svg { width: 24px; height: 24px; }
    .chat-popup { width: calc(100vw - 40px); transform-origin: bottom left; }
}