/* =========================================
   NINE?NINE?NINE? — DESKTOP STYLES (v1.2)
   ========================================= */

:root { 
    --bg: #f4f5f7; 
    --text: #111; 
    --text-2: #666; 
    --text-3: #999; 
    --card: #fff; 
    --border: #eaeaea; 
    --red: #ff3b30; 
    --green: #27ae60; 
    --header-h: 72px;
}

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

body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 
    background: var(--bg); 
    color: var(--text); 
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden; /* Защита от горизонтальной прокрутки */
}

/* --- ШАПКА --- */
.header { 
    position: fixed; top: 0; left: 0; right: 0; height: var(--header-h); 
    background: rgba(255,255,255,0.95); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border); z-index: 1000; 
    display: flex; align-items: center; justify-content: space-between; padding: 0 40px; 
}
.header-left { display: flex; align-items: center; gap: 24px; }
.logo { font-size: 22px; font-weight: 900; cursor: pointer; letter-spacing: -0.5px; }
.header-right { display: flex; align-items: center; gap: 24px; }

/* Поиск */
.search-box { 
    display: flex; align-items: center; gap: 10px;
    background: #f0f0f0; padding: 0 16px; height: 40px; border-radius: 8px; width: 320px;
    transition: width 0.2s, background 0.2s;
}
.search-box:focus-within { width: 400px; background: #e8e8e8; }
.search-box input { flex: 1; background: transparent; border: none; outline: none; font-size: 14px; color: var(--text); }
.search-box input::placeholder { color: var(--text-3); }

.nav-link { font-size: 14px; font-weight: 600; cursor: pointer; color: var(--text); text-decoration: none; }
.nav-link:hover { opacity: 0.7; }

/* --- КОНТЕНТ --- */
.container { max-width: 1600px; margin: calc(var(--header-h) + 40px) auto 60px; padding: 0 32px; }

/* --- СЕТКА (АВТО-КОЛОНКИ, ЧТОБЫ НЕ ЛОМАЛОСЬ НА ЛЮБОМ ЭКРАНЕ) --- */
.grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); 
    gap: 20px; 
    width: 100%; 
}

/* --- КАРТОЧКА ТОВАРА --- */
.card { 
    background: var(--card); border-radius: 12px; padding: 10px; cursor: pointer; 
    transition: transform 0.2s, box-shadow 0.2s; display: flex; flex-direction: column; 
    text-decoration: none; color: inherit;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.06); }

.card-img { 
    width: 100%; aspect-ratio: 3/4; border-radius: 8px; overflow: hidden; 
    background: #f0f0f0; position: relative; flex-shrink: 0; 
}
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s; }
.card:hover .card-img img { transform: scale(1.03); }

.card-info { padding-top: 10px; flex: 1; display: flex; flex-direction: column; }
.card-brand { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; }
.card-name { font-size: 14px; font-weight: 600; margin: 4px 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
.card-price-row { display: flex; align-items: center; gap: 6px; margin-top: auto; flex-wrap: wrap; }
.card-price { font-size: 16px; font-weight: 800; }
.card-old { font-size: 13px; color: var(--text-3); text-decoration: line-through; }
.card-discount { font-size: 12px; color: var(--red); font-weight: 700; background: #ffeeee; padding: 2px 6px; border-radius: 4px; }

.card-tags-stack { position: absolute; top: 8px; left: 8px; display: flex; gap: 4px; flex-wrap: wrap; z-index: 2; }
.card-tag { padding: 4px 8px; border-radius: 6px; font-size: 10px; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: 0.5px; }
.card-tag.instock { background: var(--green); }
.card-tag.china { background: #8b5cf6; }
.card-tag.premium { background: #facc15; color: #000; }

/* --- ПОДБОРКИ --- */
.collection-section { margin-bottom: 56px; }
.collection-title { font-size: 24px; font-weight: 900; margin-bottom: 4px; letter-spacing: -0.5px; }
.collection-subtitle { font-size: 12px; color: var(--text-3); margin-bottom: 20px; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }

/* --- КНОПКА КАТАЛОГА --- */
.btn-catalog { 
    display: inline-block; padding: 14px 32px; background: var(--text); color: #fff; 
    border: none; border-radius: 10px; font-size: 15px; font-weight: 700; cursor: pointer; 
    text-decoration: none; transition: opacity 0.2s;
}
.btn-catalog:hover { opacity: 0.8; }

/* --- СТРАНИЦА ТОВАРА --- */
.product-layout { display: grid; grid-template-columns: 55% 45%; gap: 40px; align-items: start; max-width: 1200px; margin: 0 auto; }
.product-photo { background: var(--card); border-radius: 16px; padding: 20px; display: flex; align-items: center; justify-content: center; aspect-ratio: 3/4; position: relative; }
.product-photo img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
.product-info { background: var(--card); border-radius: 16px; padding: 32px; }
.product-title { font-size: 26px; font-weight: 900; margin: 8px 0 16px; line-height: 1.2; letter-spacing: -0.5px; }
.product-price-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 24px; }
.product-price { font-size: 24px; font-weight: 900; }
.product-old { font-size: 16px; color: var(--text-3); text-decoration: line-through; }
.product-discount { font-size: 14px; color: var(--red); font-weight: 700; }

.size-grid { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.size-chip { padding: 10px 16px; background: #f0f0f0; border: 2px solid transparent; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 13px; transition: all 0.2s; }
.size-chip:hover { background: #e0e0e0; }
.size-chip.active { border-color: var(--text); background: #fff; }

.btn-primary { padding: 14px 24px; border: none; background: var(--text); color: #fff; border-radius: 10px; font-weight: 700; font-size: 15px; cursor: pointer; flex: 1; transition: opacity 0.2s; }
.btn-primary:hover { opacity: 0.8; }
.btn-outline { padding: 14px 24px; border: 2px solid var(--text); background: transparent; color: var(--text); border-radius: 10px; font-weight: 700; font-size: 15px; cursor: pointer; flex: 1; transition: all 0.2s; }
.btn-outline:hover { background: #f0f0f0; }

.section-header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.btn-back { border: none; background: none; font-size: 24px; cursor: pointer; font-weight: 700; padding: 8px; border-radius: 8px; transition: background 0.2s; text-decoration: none; color: inherit; }
.btn-back:hover { background: #e0e0e0; }

/* --- ЗАГЛУШКИ --- */
.loading { text-align: center; padding: 60px; color: var(--text-3); font-size: 16px; grid-column: 1 / -1; }
.no-products { text-align: center; padding: 60px; color: var(--text-3); font-size: 16px; grid-column: 1 / -1; }

.bottom-nav, .filter-tabs { display: none !important; }

/* --- БУРГЕР И МЕНЮ (ВСТРОЕНО) --- */




.sidebar-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4); z-index: 1005;
    opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s;
}
.sidebar-overlay.active { opacity: 1; visibility: visible; }

.sidebar {
    position: fixed; top: 0; left: -320px; width: 320px; height: 100vh;
    background: #fff; z-index: 1006; box-shadow: 2px 0 12px rgba(0,0,0,0.1);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; flex-direction: column; padding: 24px;
}
.sidebar.active { left: 0; }
.sidebar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; }
.sidebar-title { font-size: 20px; font-weight: 900; letter-spacing: -0.5px; }
.sidebar-close { cursor: pointer; padding: 8px; border-radius: 8px; transition: background 0.2s; display: flex; align-items: center; justify-content: center; }
.sidebar-close:hover { background: #f0f0f0; }
.sidebar-menu { display: flex; flex-direction: column; gap: 8px; }
.sidebar-link { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 10px; text-decoration: none; color: var(--text); font-weight: 600; font-size: 15px; transition: background 0.2s; }
.sidebar-link:hover { background: #f4f5f7; }
.sidebar-link svg { opacity: 0.6; }

/* --- ОБНОВЛЕННАЯ КАРТОЧКА ТОВАРА И ГАЛЕРЕЯ --- */
.product-layout { display: grid; grid-template-columns: 50% 50%; gap: 40px; align-items: start; max-width: 1200px; margin: 0 auto; }

.product-gallery { width: 100%; }
.product-photo { 
    background: var(--card); border-radius: 16px; padding: 20px; 
    display: flex; align-items: center; justify-content: center; 
    aspect-ratio: 3/4; position: relative; overflow: hidden;
}
.product-photo img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; transition: opacity 0.3s; }

/* Стрелки */
.slider-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.7); border: none; width: 40px; height: 40px;
    border-radius: 50%; cursor: pointer; font-size: 18px; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); transition: background 0.2s;
}
.slider-arrow:hover { background: rgba(255,255,255,1); }
.slider-arrow.prev { left: 16px; }
.slider-arrow.next { right: 16px; }

/* Точки */
.slider-dots { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.slider-dot {
    width: 8px; height: 8px; border-radius: 50%; background: rgba(0,0,0,0.2); cursor: pointer; transition: background 0.2s;
}
.slider-dot.active { background: rgba(0,0,0,0.7); }

/* Инфо блок */
.product-info { background: var(--card); border-radius: 16px; padding: 32px; }
.info-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.info-brand { font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.info-label { font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }

.tags-row { display: flex; gap: 6px; margin-bottom: 16px; }
.product-badge { padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }

.product-title { font-size: 26px; font-weight: 900; margin: 0 0 16px 0; line-height: 1.2; letter-spacing: -0.5px; }

/* --- СТИЛИ ДЛЯ ПОХОЖИХ ТОВАРОВ --- */
#similarGrid .card { height: 100%; }
#similarGrid .card-img { aspect-ratio: 3/4; }
.info-top-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.info-brand { font-size: 14px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700; }
.info-tags { display: flex; gap: 8px; }

/* Ссылка на бренд в карточке */
.info-brand-link {
    font-size: 14px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700;
    text-decoration: none; transition: color 0.2s;
}
.info-brand-link:hover { color: var(--text); text-decoration: underline; }

/* --- БАННЕР БРЕНДА --- */
.brand-banner {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 20px;
}

.brand-banner-bg {
    height: 180px;
    background: linear-gradient(135deg, #2c3e50, #000000);
    width: 100%;
}

.brand-banner-content {
    position: absolute;
    bottom: 20px;
    left: 40px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #fff;
    border: 4px solid #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    overflow: hidden;
    flex-shrink: 0;
}

.brand-title {
    font-size: 36px;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    margin: 0;
    letter-spacing: -0.5px;
}

/* --- КРАСИВЫЙ БАННЕР БРЕНДА --- */
.brand-banner {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 40px;
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.brand-banner-content {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 40px 48px;
    position: relative;
    z-index: 2;
}

/* Аватарка */
.brand-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid rgba(255,255,255,0.2);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    overflow: hidden;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}
.brand-banner:hover .brand-avatar {
    transform: scale(1.03);
}

/* Название */
.brand-title {
    font-size: 48px;
    font-weight: 900;
    color: #fff;
    letter-spacing: -1px;
    margin: 0;
    line-height: 1.1;
    text-transform: uppercase;
}

/* Легкий блик на фоне для красоты */
.brand-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 50%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 70%);
    transform: rotate(30deg);
    pointer-events: none;
}

/* Переопределяем старые стили, чтобы убрать черную дыру */
.brand-banner-bg { display: none !important; }

.brand-banner {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 40px;
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    /* Убираем фиксированную высоту, чтобы баннер подстраивался под контент */
    height: auto; 
}

.brand-banner-content {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 32px 40px; /* Чуть уменьшили отступы */
    position: relative;
    z-index: 2;
}

.brand-avatar {
    width: 100px; /* Чуть уменьшили аватарку */
    height: 100px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid rgba(255,255,255,0.15);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    overflow: hidden;
    flex-shrink: 0;
}

.brand-title {
    font-size: 36px; /* Уменьшили шрифт, чтобы не орал */
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.5px;
    margin: 0;
    line-height: 1.1;
    text-transform: uppercase;
}

/* Обновляем баннер для фонового фото */
.brand-banner {
    background-size: cover;
    background-position: center;
    position: relative;
    /* Убираем жесткий градиент из inline-стилей, если он там был */
}

/* Создаем темное затемнение поверх фото, чтобы текст читался */
.brand-banner::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 100%);
    z-index: 1;
}

/* Контент поверх затемнения */
.brand-banner-content {
    position: relative;
    z-index: 2; /* Поднимаем выше затемнения */
}

/* Красивая кнопка Назад */
.btn-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #fff !important;
    border: 1px solid #eaeaea !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.2s;
    color: #111 !important;
}
.btn-back:hover {
    background: #f4f5f7 !important;
    transform: translateX(-2px);
}

/* --- ИНТЕРАКТИВНЫЕ ТЭГИ --- */
.card-tag {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: opacity 0.2s;
}
.card-tag:hover { opacity: 0.8; }

.card-tag svg {
    width: 12px;
    height: 12px;
    opacity: 0.7;
}

/* --- ВСПЛЫВАЮЩЕЕ ОКНО (TOOLTIP) --- */
.tag-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    backdrop-filter: blur(2px);
}

.tag-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.tag-modal {
    background: #fff;
    padding: 24px;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    transform: scale(0.95);
    transition: transform 0.2s;
    text-align: center;
}

.tag-modal-overlay.active .tag-modal {
    transform: scale(1);
}

.tag-modal h3 {
    font-size: 20px;
    font-weight: 900;
    margin-bottom: 12px;
    color: var(--text);
}

.tag-modal p {
    font-size: 15px;
    color: var(--text-2);
    line-height: 1.5;
    margin-bottom: 24px;
}

.tag-modal button {
    background: var(--text);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    width: 100%;
    transition: opacity 0.2s;
}

.tag-modal button:hover {
    opacity: 0.8;
}

/* Выравнивание иконки в тэгах на странице товара */
.product-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* --- КНОПКА "ПОКАЗАТЬ ЕЩЕ" В ПОДБОРКАХ --- */
.collection-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 20px;
}

.btn-show-more {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.btn-show-more:hover {
    background: var(--text);
    color: #fff;
}

/* --- КРАСИВАЯ КНОПКА "ПОКАЗАТЬ ЕЩЕ" --- */
.btn-show-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--border);
    transition: all 0.2s;
    margin-bottom: 20px;
}

.btn-show-more:hover {
    background: #f4f5f7;
    border-color: #ddd;
    transform: translateX(2px);
}

/* --- НОВАЯ ПОДБОРКА (ГОРИЗОНТАЛЬНАЯ) --- */
.collection-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 20px;
}

.collection-scroll-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    /* Прячем вылезающие за край карточки (если их больше 5) */
    overflow: hidden; 
}

.collection-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    flex: 1; /* Занимает всё доступное место */
}

/* Красивая круглая стрелка справа */
.btn-arrow-next {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    color: var(--text);
    text-decoration: none;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.btn-arrow-next:hover {
    background: var(--text);
    color: #fff;
    transform: scale(1.05);
}

.btn-arrow-next svg {
    width: 24px;
    height: 24px;
}

/* На всякий случай убираем старую кнопку, если она где-то осталась */
.btn-show-more { display: none !important; }

/* Расширяем строку поиска */
.search-box {
    width: 450px; /* Было 320px */
}
.search-box:focus-within {
    width: 550px; /* Еще шире при клике */
}

/* Увеличиваем строку поиска */
.search-box {
    width: 550px; /* Было 450px */
}
.search-box:focus-within {
    width: 650px; /* Было 550px */
}

/* --- КАРТОЧКА БРЕНДА В ПОИСКЕ --- */
.search-brand-card {
    display: flex;
    align-items: center;
    gap: 24px;
    background: #fff;
    padding: 24px 32px;
    border-radius: 16px;
    margin-bottom: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
}
.search-brand-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.search-brand-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    background: #f0f0f0;
    flex-shrink: 0;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.search-brand-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.search-brand-info {
    flex: 1;
}
.search-brand-title {
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}
.search-brand-desc {
    font-size: 14px;
    color: var(--text-3);
}
.search-brand-btn {
    background: var(--text);
    color: #fff;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    transition: opacity 0.2s;
}
.search-brand-card:hover .search-brand-btn {
    opacity: 0.8;
}

/* --- ПОДВАЛ САЙТА (FOOTER) --- */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Обертка для всего контента, чтобы прижать футер к низу */
.main-content-wrapper {
    flex: 1; /* Занимает всё свободное пространство */
}

.footer {
    background: #f7f7f7;
    border-top: 1px solid var(--border);
    padding: 60px 0 40px;
    margin-top: 80px;
    color: var(--text);
}

.footer-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 32px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.footer-col h4 {
    font-size: 16px;
    font-weight: 900;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col li {
    margin-bottom: 12px;
}

.footer-col a {
    color: var(--text-2);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--text);
    text-decoration: underline;
}

/* Соцсети */
.social-links {
    display: flex;
    gap: 16px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 50%;
    transition: all 0.2s;
    color: var(--text);
}

.social-links a:hover {
    background: var(--text);
    color: #fff;
}

.footer-bottom {
    max-width: 1600px;
    margin: 40px auto 0;
    padding: 20px 32px 0;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-3);
}

/* Защита от перекрытия кликов в футере */
.footer {
    position: relative;
    z-index: 10;
}
.footer a {
    position: relative;
    z-index: 20;
    cursor: pointer;
}

.card-tag.partner { background: #8b5cf6; color: #fff; }

/* Тэг партнера - зеленый, как наличие */
.card-tag.partner { background: var(--green); color: #fff; }

/* --- ИСПРАВЛЕНИЕ ВИЗУАЛЬНЫХ БАГОВ В КАРТОЧКАХ --- */

/* Фиксируем высоту карточки, чтобы сетка не ломалась */
.card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Обрезаем название ровно в 2 строки */
.card-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 38px; /* Фиксируем высоту под 2 строки, чтобы цены стояли ровно */
    margin-bottom: 8px;
    line-height: 1.35;
}

/* Прижимаем цену и сердечко к низу */
.card-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto; /* Прижимает к низу */
    padding-top: 10px;
}

.card-price-inner {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* Кнопка "В избранное" (Сердечко) */
.btn-favorite {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    transition: color 0.2s, transform 0.2s;
}

.btn-favorite:hover {
    color: var(--red);
    transform: scale(1.1);
}

.btn-favorite.active {
    color: var(--red);
}

.btn-favorite svg {
    width: 22px;
    height: 22px;
}

/* --- ЖЕСТКАЯ ФИКСАЦИЯ РАЗМЕРА КАРТИНКИ В КАРТОЧКАХ --- */
.card {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Чтобы ничего не вылезало */
}

.card-img {
    width: 100%;
    /* Фиксируем пропорции: высота = 133% от ширины (соотношение 3:4) */
    aspect-ratio: 3 / 4; 
    position: relative;
    background: #f0f0f0;
    flex-shrink: 0; /* Запрещаем сжимать картинку */
    border-radius: 8px;
    overflow: hidden;
}

.card-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Заполняет блок, лишнее обрезает (без искажений) */
    object-position: center; /* Центрируем фото */
    transition: transform 0.3s;
}

.card:hover .card-img img {
    transform: scale(1.03);
}

/* Фиксируем высоту инфо-блока, чтобы все цены и сердечки были на одном уровне */
.card-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding-top: 12px;
}

/* Название строго в 2 строки */
.card-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.35;
    margin-bottom: 8px;
    min-height: 38px;
    flex-grow: 1; /* Занимает свободное место, прижимая цену вниз */
}

/* Цена и сердечко в самом низу */
.card-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #f5f5f5; /* Легкая линия-разделитель для красоты */
}

/* --- БЛОКИ "О НАС" И "СЕРВИС" НА ГЛАВНОЙ --- */
.hero-section {
    background: linear-gradient(135deg, #111 0%, #2a2a2a 100%);
    border-radius: 24px;
    padding: 60px 40px;
    color: #fff;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: -50%; right: -10%;
    width: 50%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 70%);
    transform: rotate(30deg);
    pointer-events: none;
}

.hero-content {
    max-width: 600px;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 48px;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.hero-subtitle {
    font-size: 16px;
    color: #aaa;
    line-height: 1.5;
}

.hero-btn {
    display: inline-block;
    background: #fff;
    color: #111;
    padding: 16px 32px;
    border-radius: 12px;
    font-weight: 800;
    text-decoration: none;
    margin-top: 24px;
    transition: transform 0.2s, background 0.2s;
}

.hero-btn:hover {
    transform: translateY(-2px);
    background: #f0f0f0;
}

/* Блок преимуществ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 60px;
}

.feature-card {
    background: #fff;
    padding: 30px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    border: 1px solid var(--border);
    transition: transform 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: #f4f5f7;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
}

.feature-title {
    font-size: 18px;
    font-weight: 800;
}

.feature-desc {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.5;
}

/* --- КНОПКА "НАВЕРХ" --- */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    background: var(--text);
    color: #fff;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: #333;
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.scroll-to-top svg {
    width: 24px;
    height: 24px;
    transition: transform 0.2s;
}

.scroll-to-top:hover svg {
    transform: translateY(-2px);
}

/* --- ЛОГОТИП В БАННЕРЕ --- */
.hero-section {
    position: relative;
    overflow: hidden;
    /* Делаем градиент, который уходит в черный справа */
    background: linear-gradient(to right, #111 40%, #1a1a1a 70%, #000 100%);
}

.hero-image {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 50%;
    pointer-events: none; /* Чтобы картинка не мешала кликам */
    z-index: 1;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center right;
    /* Плавно растворяем края картинки слева, чтобы она сливалась с градиентом */
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 40%);
    mask-image: linear-gradient(to right, transparent 0%, black 40%);
    opacity: 0.6; /* Делаем немного прозрачной, чтобы не перебивать текст */
}

/* Контент должен быть поверх картинки */
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 60%; /* Ограничиваем текст, чтобы он не залезал на картинку */
}

/* --- ГАЛЕРЕЯ ДИЗАЙНЕРОВ --- */
.designers-section {
    margin: 80px 0;
}
.designers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.designer-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 3/4;
    group;
}
.designer-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.designer-card:hover .designer-img {
    transform: scale(1.05);
}
.designer-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    padding: 30px 20px 20px;
    color: #fff;
}
.designer-name {
    font-size: 24px;
    font-weight: 900;
    text-transform: uppercase;
}
.designer-desc {
    font-size: 14px;
    opacity: 0.8;
    margin-top: 4px;
}

/* --- ЛЕНТА СКЛАДА (ГОРИЗОНТАЛЬНЫЙ СКРОЛЛ) --- */
.warehouse-strip {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 20px;
    margin: 40px 0 80px;
    scrollbar-width: thin;
}
.warehouse-strip img {
    height: 300px;
    width: auto;
    border-radius: 16px;
    object-fit: cover;
    flex-shrink: 0;
    transition: transform 0.3s;
}
.warehouse-strip img:hover {
    transform: translateY(-5px);
}

/* --- БАННЕР "ИЗ КИТАЯ" --- */
.china-banner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    margin: 80px 0;
    border: 1px solid var(--border);
}
.china-banner-text {
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.china-banner-title {
    font-size: 36px;
    font-weight: 900;
    margin-bottom: 16px;
    line-height: 1.1;
    letter-spacing: -1px;
}
.china-banner-desc {
    font-size: 16px;
    color: var(--text-2);
    line-height: 1.6;
    margin-bottom: 24px;
}
.china-banner-img {
    background: url('uploads/lookbook/china.jpg') center/cover;
    min-height: 400px;
}

/* --- ИМИДЖЕВАЯ ОБЛОЖКА ДИЗАЙНЕРА (ВНУТРИ ПОДБОРКИ) --- */
.designer-banner-link {
    display: block;
    text-decoration: none;
    margin-bottom: 24px;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
}

.designer-banner {
    height: 400px;
    background-size: cover;
    background-position: center 20%;
    position: relative;
    transition: transform 0.7s ease;
}

.designer-banner-link:hover .designer-banner {
    transform: scale(1.02);
}

.designer-banner-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 60px;
}

.designer-banner-title {
    font-size: 64px;
    font-weight: 900;
    color: #fff;
    letter-spacing: -2px;
    text-transform: uppercase;
    line-height: 1;
    margin-bottom: 20px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.designer-banner-btn {
    display: inline-block;
    background: #fff;
    color: #111;
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 16px;
    width: max-content;
    transition: background 0.3s;
}

.designer-banner-link:hover .designer-banner-btn {
    background: #f0f0f0;
}

/* --- КАРТОЧКА ДИЗАЙНЕРА ВНУТРИ СЕТКИ --- */
.designer-card-inside {
    padding: 10px;
    text-decoration: none;
}

.designer-img-container {
    background-size: cover;
    background-position: center 20%;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 20px;
    overflow: hidden;
}

.designer-img-container::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
    z-index: 1;
}

.designer-badge {
    position: relative;
    z-index: 2;
    color: #fff;
    font-size: 24px;
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1;
    letter-spacing: -1px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.designer-card-btn {
    font-size: 13px;
    font-weight: 800;
    color: var(--text);
    background: #f4f5f7;
    padding: 10px 16px;
    border-radius: 8px;
    width: 100%;
    text-align: center;
    transition: background 0.2s;
}

.designer-card-inside:hover .designer-card-btn {
    background: var(--text);
    color: #fff;
}

/* --- ПОДБОРКА С ФОНОВЫМ ФОТО ДИЗАЙНЕРА --- */
.collection-wrapper {
    position: relative;
    padding: 40px;
    margin-bottom: 60px;
    border-radius: 24px;
    background-color: #f9f9f9;
    overflow: hidden; /* Чтобы фон не вылезал */
}

.collection-wrapper.with-bg {
    background-size: cover;
    background-position: center 20%;
    background-attachment: fixed; /* Эффект параллакса при скролле (по желанию) */
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* Затемнение, чтобы карточки читались на любом фоне */
.collection-bg-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.8) 100%);
    z-index: 1;
}

/* Контент поверх фона */
.collection-inner {
    position: relative;
    z-index: 2;
}

/* Меняем цвета текста в подборках с фоном на белый */
.collection-wrapper.with-bg .collection-title {
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.collection-wrapper.with-bg .collection-subtitle {
    color: rgba(255,255,255,0.7);
}

/* Кнопка стрелки становится прозрачной с белой обводкой */
.collection-wrapper.with-bg .btn-arrow-next {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.3);
    color: #fff;
    backdrop-filter: blur(10px);
}
.collection-wrapper.with-bg .btn-arrow-next:hover {
    background: #fff;
    color: #000;
}

/* Перекрываем старые стили, чтобы сетка не ломалась */
.collection-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    flex: 1;
    max-width: calc(100% - 80px);
}

/* Делаем карточки товаров на фоне чуть более плотными */
.collection-wrapper.with-bg .card {
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border: none;
}

/* --- ГАЛЕРЕЯ СО СКЛАДА --- */
.warehouse-gallery-section {
    margin: 80px 0;
    padding: 40px;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}

.warehouse-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.warehouse-grid img {
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 5; /* Делаем фото вертикальными */
    object-fit: cover; /* Заполняем блок без искажений */
    border-radius: 16px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    cursor: pointer;
}

/* Делаем первую картинку большой (на 2 ряда) */
.warehouse-grid img:first-child {
    grid-column: span 2;
    aspect-ratio: auto;
    height: 100%;
}

.warehouse-grid img:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* --- ГЛОБАЛЬНОЕ ИСПРАВЛЕНИЕ ПОДБОРОК --- */

/* Возвращаем жесткую сетку в 5 колонок для всех подборок */
.collection-grid {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 20px !important;
    flex: 1;
    max-width: calc(100% - 80px);
}

/* Убираем любые "растягивания" карточек, если они есть */
.collection-wrapper .card {
    width: 100% !important;
    height: auto !important;
}

/* Фиксируем высоту картинок в подборках, чтобы они не растягивались */
.collection-wrapper .card-img {
    aspect-ratio: 3 / 4 !important;
    height: auto !important;
}

/* Чиним отображение заголовка и фона для Партнёров (если фон пропал) */
.collection-wrapper.with-bg {
    background-size: cover !important;
    background-position: center !important;
}

.collection-wrapper {
    position: relative;
    padding: 40px;
    margin-bottom: 60px;
    border-radius: 24px;
    background-color: #f9f9f9;
    overflow: hidden;
}

/* --- ИСПРАВЛЕНИЕ ГАЛЕРЕИ СКЛАДА --- */
.warehouse-gallery-section {
    margin: 80px 0;
    padding: 40px;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}

.warehouse-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Отменяем растягивание первой картинки на 2 колонки (это ломало вид) */
.warehouse-grid img {
    width: 100%;
    height: 300px; /* Фиксируем высоту */
    object-fit: cover;
    border-radius: 16px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    cursor: pointer;
}

.warehouse-grid img:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* --- ОТКАТ: ПРИНУДИТЕЛЬНО ЧИНИМ СЕТКУ ПОДБОРОК --- */
.collection-grid {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 20px !important;
    flex: 1;
    max-width: calc(100% - 80px) !important;
}

.collection-wrapper .card {
    width: 100% !important;
    height: auto !important;
}

.collection-wrapper .card-img {
    aspect-ratio: 3 / 4 !important;
    height: auto !important;
}

/* Прячем галерею, если она осталась в коде */
.warehouse-gallery-section { display: none !important; }

/* --- ГОРИЗОНТАЛЬНАЯ ЛЕНТА С ФОТО СКЛАДА --- */
.warehouse-strip-section {
    margin: 60px 0;
    padding: 40px;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}

.warehouse-strip {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 10px;
    scroll-snap-type: x mandatory;
    /* Скрываем скроллбар для красоты (работает в Chrome/Safari) */
    scrollbar-width: none; 
}
.warehouse-strip::-webkit-scrollbar {
    display: none;
}

.warehouse-strip img {
    height: 320px;
    width: auto;
    border-radius: 16px;
    object-fit: cover;
    flex-shrink: 0;
    scroll-snap-align: start;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.warehouse-strip img:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* --- ИСПРАВЛЕНИЕ ЛЕНТЫ ФОТО --- */
.warehouse-strip {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 20px;
    padding-right: 40px; /* Отступ справа, чтобы последняя картинка не прилипала к краю */
    scroll-snap-type: x mandatory;
    /* Возвращаем красивый тонкий скроллбар */
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

/* Стилизуем полосу прокрутки для Chrome/Safari */
.warehouse-strip::-webkit-scrollbar {
    height: 6px;
}
.warehouse-strip::-webkit-scrollbar-track {
    background: transparent;
}
.warehouse-strip::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}
.warehouse-strip::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.warehouse-strip img {
    height: 300px;
    width: auto;
    border-radius: 16px;
    object-fit: cover;
    flex-shrink: 0;
    scroll-snap-align: start;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: 1px solid var(--border); /* Легкая рамка для аккуратности */
}

.warehouse-strip img:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    z-index: 2; /* Чтобы приподнятая картинка была поверх остальных */
}

/* --- КАРУСЕЛЬ С ФОТО (СТРЕЛКИ) --- */
.warehouse-carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Контейнер с картинками */
.warehouse-strip {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 10px;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    flex: 1;
    
    /* Скрываем стандартный ползунок */
    scrollbar-width: none; 
}
.warehouse-strip::-webkit-scrollbar {
    display: none;
}

.warehouse-strip img {
    height: 320px;
    width: auto;
    border-radius: 16px;
    object-fit: cover;
    flex-shrink: 0;
    scroll-snap-align: start;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: 1px solid var(--border);
}

.warehouse-strip img:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Кнопки-стрелки */
.carousel-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.2s;
    color: var(--text);
    flex-shrink: 0;
    z-index: 10;
}

.carousel-btn:hover {
    background: var(--text);
    color: #fff;
    transform: scale(1.05);
}

.carousel-btn:active {
    transform: scale(0.95);
}

/* --- КОМПАКТНАЯ ЛЕНТА С ФОТО --- */

/* Уменьшаем отступы самой секции (белого блока) */
.warehouse-strip-section {
    margin: 30px 0 !important; /* Было 60px */
    padding: 24px 30px !important; /* Было 40px */
}

/* Уменьшаем отступы у заголовка */
.warehouse-strip-section .collection-header {
    margin-bottom: 16px !important;
}

.warehouse-strip-section .collection-title {
    font-size: 24px !important; /* Чуть уменьшили заголовок */
}

.warehouse-strip-section .collection-subtitle {
    font-size: 12px !important; /* Уменьшили подзаголовок */
    margin-top: 4px !important;
}

/* Уменьшаем высоту самих фотографий */
.warehouse-strip img {
    height: 220px !important; /* Было 320px, теперь более приземистые */
    border-radius: 12px !important;
}

/* Уменьшаем отступ между картинками */
.warehouse-strip {
    gap: 12px !important;
    padding-bottom: 0 !important;
}

/* Делаем кнопки-стрелки чуть компактнее */
.carousel-btn {
    width: 40px !important;
    height: 40px !important;
}

/* --- ГЛОБАЛЬНОЕ УМЕНЬШЕНИЕ ПУСТОТЫ В БЛОКАХ --- */

/* 1. Блок с живыми фото */
.warehouse-strip-section {
    padding: 24px 24px 16px 24px !important; /* Убираем большой отступ снизу */
    margin-bottom: 30px !important;
}

/* 2. Карточки преимуществ (Товары в наличии, Живые фото, Выкуп) */
.feature-card {
    padding: 24px !important; /* Было 30px, уменьшили */
    gap: 12px !important;
}

/* 3. Блоки подборок (с дизайнерами) */
.collection-wrapper {
    padding: 30px 24px 24px 24px !important; /* Уменьшили отступы внутри */
    margin-bottom: 40px !important; /* Уменьшили расстояние между подборками */
}

/* 4. Сами карточки товаров */
.card {
    padding: 8px !important; /* Чуть плотнее */
}

.card-info {
    padding-top: 8px !important; /* Уменьшили отступ сверху у инфо-блока */
}

/* 5. Сетка товаров внутри подборки */
.collection-grid {
    gap: 16px !important; /* Чуть уменьшили расстояние между карточками */
}

/* 6. Блок "Как мы работаем" */
.how-it-works {
    margin: 40px 0 !important;
}

/* 7. Блок "Не нашли нужную вещь" */
div[style*="text-align: center; margin: 50px 0 60px;"] {
    margin: 30px 0 40px !important;
    padding: 30px 20px !important;
}

/* --- ЦЕНТРИРОВАНИЕ СТРОКИ ПОИСКА В ШАПКЕ --- */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative; /* Для абсолютного позиционирования поиска */
}

.search-box {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    width: 450px; /* Базовая ширина */
}

/* При фокусе расширяется симметрично */
.search-box:focus-within {
    width: 550px;
}

/* Убеждаемся, что логотип и кнопки не перекрываются с поиском */
.header-left {
    z-index: 2;
}
.header-right {
    z-index: 2;
}

/* --- ФИКСИРУЕМ ШАПКУ ПРИ ПРОКРУТКЕ --- */
.header {
    position: fixed !important; /* Возвращаем фиксацию */
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000 !important; /* Шапка поверх контента */
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.95); /* Полупрозрачный белый фон */
    backdrop-filter: blur(10px); /* Эффект размытия (как в iOS) */
    border-bottom: 1px solid var(--border);
}

/* Отодвигаем контент вниз, чтобы он не залезал под шапку */
body {
    padding-top: 72px; /* Высота шапки */
}

/* --- ВОЗВРАЩАЕМ КНОПКУ "НАВЕРХ" --- */
.scroll-to-top {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    z-index: 99999 !important; /* Самый верхний слой */
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--text);
    color: #fff;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    cursor: pointer;
    border: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: #333;
    transform: translateY(-4px);
}

/* --- ЖЕСТКАЯ ФИКСАЦИЯ КНОПКИ НАВЕРХ --- */
#scrollToTopBtn {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    z-index: 9999999 !important; /* Поверх вообще всего */
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--text);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

#scrollToTopBtn.visible {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

#scrollToTopBtn:hover {
    background: #333;
    transform: translateY(-4px) !important;
}

#scrollToTopBtn svg {
    width: 24px;
    height: 24px;
}

/* --- УБИРАЕМ ЛИШНИЙ ОТСТУП СВЕРХУ --- */
body {
    padding-top: 72px !important; /* Оставляем место только под фиксированную шапку */
}

/* Убираем верхний отступ у главного контейнера */
.container {
    margin-top: 0 !important; 
    padding-top: 20px !important; /* Оставляем легкий воздух (20px) */
}

/* Если баннер (hero-section) был внутри контейнера, убираем у него верхний отступ, если есть */
.hero-section {
    margin-top: 0 !important;
}

/* --- СОКРАЩАЕМ ОТСТУПЫ МЕЖДУ БЛОКАМИ В 2 РАЗА --- */

/* 1. Отступы между подборками (и фоновыми, и обычными) */
.collection-wrapper {
    margin-bottom: 24px !important; /* Было 40px или 60px */
}

/* 2. Блок с преимуществами (3 карточки) */
.features-grid {
    margin-bottom: 30px !important;
}

/* 3. Блок с живыми фото */
.warehouse-strip-section {
    margin: 20px 0 30px 0 !important;
}

/* 4. Блок "Как мы работаем" (если он есть) */
.how-it-works {
    margin: 30px 0 !important;
}

/* 5. Кнопка "Показать весь каталог" и блок "Не нашли нужную вещь" */
div[style*="text-align: center; margin: 50px 0 60px;"] {
    margin: 20px 0 30px !important;
}

/* 6. Расстояние от шапки до первого баннера */
.container {
    padding-top: 10px !important;
}

/* 7. Баннер (Hero-section) */
.hero-section {
    margin-bottom: 30px !important; /* Было 40px */
}

/* --- УБИРАЕМ БЕЛОЕ ПРОСТРАНСТВО ВНУТРИ БЛОКА "ЖИВЫЕ ФОТО" --- */
.warehouse-strip-section {
    padding: 20px 24px 15px 24px !important; /* Сверху 20px, по бокам 24px, снизу 15px */
    margin-bottom: 30px !important;
}

/* Прижимаем заголовок и фото ближе друг к другу */
.warehouse-strip-section .collection-header {
    margin-bottom: 10px !important; 
}

/* Убираем лишний отступ под самими фотографиями */
.warehouse-strip {
    padding-bottom: 0 !important;
}

/* Делаем высоту контейнера по размеру фото */
.warehouse-carousel-wrapper {
    align-items: center !important;
    min-height: auto !important;
}

/* --- ПОЛНОЕ УСТРАНЕНИЕ ПУСТОТЫ ВНИЗУ БЛОКА "ЖИВЫЕ ФОТО" --- */
.warehouse-strip-section {
    padding-top: 20px !important;
    padding-bottom: 0px !important; /* Убираем нижний отступ вообще */
    padding-left: 24px !important;
    padding-right: 24px !important;
    margin-bottom: 30px !important;
}

/* Убираем отступ у самого контейнера с лентой */
.warehouse-strip {
    padding-bottom: 0px !important;
    margin-bottom: 0px !important;
    display: flex !important;
    align-items: center !important; /* Центрируем картинки и кнопки */
}

/* Убираем отступ у обертки */
.warehouse-carousel-wrapper {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Убеждаемся, что картинки не создают лишнюю высоту */
.warehouse-strip img {
    margin-bottom: 0 !important;
    display: block !important;
}

/* --- ФИНАЛЬНАЯ НАСТРОЙКА ОТСТУПОВ БЛОКА "ЖИВЫЕ ФОТО" --- */
.warehouse-strip-section {
    padding-top: 15px !important;    /* Сверху делаем еще меньше (было 20px) */
    padding-bottom: 20px !important; /* Снизу возвращаем немного воздуха */
    padding-left: 24px !important;
    padding-right: 24px !important;
    margin-bottom: 30px !important;
}

/* Чуть уменьшаем заголовок, чтобы он не занимал много места */
.warehouse-strip-section .collection-title {
    font-size: 22px !important;
}

/* И подзаголовок тоже чуть компактнее */
.warehouse-strip-section .collection-subtitle {
    margin-top: 2px !important;
    margin-bottom: 8px !important;
}

/* Контейнер с фото выравниваем по центру */
.warehouse-strip {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    display: flex !important;
    align-items: center !important;
}

/* --- УБИРАЕМ ЛИШНЕЕ ПРОСТРАНСТВО НАД ФОТОГРАФИЯМИ --- */
.warehouse-strip-section .collection-header {
    margin-bottom: 4px !important; /* Прижимаем заголовок к фото */
}

.warehouse-strip-section .collection-subtitle {
    margin-bottom: 0 !important; /* Убираем отступ у подзаголовка */
}

.warehouse-carousel-wrapper {
    margin-top: 10px !important; /* Оставляем только 10px сверху для красоты */
    padding-top: 0 !important;
}

.warehouse-strip {
    margin-top: 0 !important; /* Убираем отступ у самой ленты */
}

/* --- 1. ПРЕМИАЛЬНЫЕ КАРТОЧКИ ТОВАРОВ (3D И ТЕНИ) --- */
.card {
    background: #fff !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03) !important;
    border: 1px solid rgba(0,0,0,0.04) !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.card:hover {
    transform: translateY(-8px) scale(1.01) !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08) !important;
    border-color: rgba(0,0,0,0.1) !important;
    z-index: 10;
}

/* Делаем картинку в карточке чуть более контрастной при наведении */
.card:hover .card-img img {
    transform: scale(1.05) !important;
}

/* --- 2. ЭФФЕКТ СТЕКЛА ДЛЯ ШАПКИ (FROSTED GLASS) --- */
.header {
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}

/* --- 3. КРАСИВАЯ ПОДЛОЖКА ДЛЯ БАННЕРА (ГРАДИЕНТ) --- */
.hero-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%) !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2) !important;
}

/* Добавляем блик на баннер */
.hero-section::after {
    content: '';
    position: absolute;
    top: -50%; right: -10%;
    width: 50%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 60%);
    transform: rotate(30deg);
    pointer-events: none;
    z-index: 1;
}

/* --- 4. ГРАДИЕНТ И ТЕНЬ ДЛЯ КНОПОК --- */
.btn-catalog, .hero-btn {
    background: linear-gradient(135deg, #111 0%, #333 100%) !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15) !important;
    transition: all 0.3s ease !important;
}

.btn-catalog:hover, .hero-btn:hover {
    box-shadow: 0 12px 25px rgba(0,0,0,0.25) !important;
    transform: translateY(-2px) !important;
}

/* --- 5. КРАСИВЫЕ ФОТО В ЛЕНТЕ (ГЛУБИНА) --- */
.warehouse-strip img {
    box-shadow: 0 8px 20px rgba(0,0,0,0.06) !important;
    border: none !important;
}

.warehouse-strip img:hover {
    box-shadow: 0 15px 30px rgba(0,0,0,0.15) !important;
    transform: translateY(-5px) scale(1.03) !important;
    z-index: 2;
}

/* --- 6. ПОДСВЕТКА БЛОКОВ ПРЕИМУЩЕСТВ --- */
.feature-card {
    background: #fff !important;
    border: 1px solid rgba(0,0,0,0.03) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02) !important;
    transition: all 0.3s ease !important;
}

.feature-card:hover {
    box-shadow: 0 15px 30px rgba(0,0,0,0.06) !important;
    transform: translateY(-5px) !important;
}

/* Делаем иконки в преимуществах чуть более стильными */
.feature-icon {
    background: linear-gradient(135deg, #f4f5f7 0%, #e5e7eb 100%) !important;
    box-shadow: inset 0 2px 4px rgba(255,255,255,1), 0 2px 4px rgba(0,0,0,0.05) !important;
}

/* --- ВОЗВРАЩАЕМ БЕЛУЮ КНОПКУ В БАННЕРЕ --- */
.hero-btn {
    background: #ffffff !important;
    color: #111111 !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
}

.hero-btn:hover {
    background: #f4f5f7 !important;
    color: #111111 !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}

/* Убираем черный градиент, который перекрывал кнопку */
.btn-catalog {
    background: var(--text) !important;
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
}
.btn-catalog:hover {
    background: #333 !important;
}

/* --- УЛУЧШЕНИЕ КАРТОЧКИ ТОВАРА --- */

/* Плашка бренда */
.brand-card-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px 8px 8px;
    background: #f8f9fa;
    border-radius: 50px;
    text-decoration: none;
    color: var(--text);
    width: max-content;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    margin-bottom: 16px;
}

.brand-card-link:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border-color: #ccc;
}

.brand-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eee;
}

.brand-avatar-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-name-text {
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Кнопки действий (Поделиться и Сердечко) */
.product-actions-row {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    margin-bottom: 24px;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
}

.action-btn:hover {
    border-color: #ccc;
    background: #f8f9fa;
}

.action-btn.active {
    color: var(--red);
    border-color: #ffcdd2;
    background: #fff5f5;
}

.action-btn svg {
    width: 20px;
    height: 20px;
}

/* Красивая цена и заголовок */
.product-title {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -1px;
    margin: 12px 0 16px 0;
    line-height: 1.1;
}

.product-price {
    font-size: 32px;
    font-weight: 900;
}

/* --- УМЕНЬШАЕМ ПУСТОТУ ВОКРУГ БЛОКА ВЫКУПА И КАТАЛОГА --- */

/* Кнопка "Показать весь каталог" */
div[style*="text-align: center; margin: 40px 0 60px;"] {
    margin: 20px 0 30px 0 !important; /* Уменьшаем отступы вокруг кнопки */
}

/* Сам блок "Не нашли нужную вещь?" */
div[style*="background: linear-gradient(135deg, #f4f5f7 0%, #e5e7eb 100%)"] {
    padding: 30px 20px !important; /* Уменьшаем внутренние отступы */
    margin-bottom: 40px !important; /* Уменьшаем отступ снизу до футера */
}

/* Убираем лишний отступ у заголовка внутри блока */
div[style*="background: linear-gradient(135deg, #f4f5f7 0%, #e5e7eb 100%)"] h3 {
    margin-bottom: 8px !important;
}

/* Убираем лишний отступ у текста */
div[style*="background: linear-gradient(135deg, #f4f5f7 0%, #e5e7eb 100%)"] p {
    margin-bottom: 16px !important;
}

/* --- УБИРАЕМ БОЛЬШОЙ ЗАЗОР ПЕРЕД ФУТЕРОМ --- */

/* 1. Уменьшаем внешний отступ у самого блока выкупа */
div[style*="background: linear-gradient(135deg, #f4f5f7 0%, #e5e7eb 100%)"] {
    margin-bottom: 20px !important; 
}

/* 2. Уменьшаем внутренний отступ у контейнера с контентом */
.container {
    padding-bottom: 20px !important; 
    margin-bottom: 0 !important;
}

/* 3. Убираем огромный верхний отступ у футера */
.footer {
    margin-top: 20px !important; 
    padding-top: 40px !important; /* Чуть уменьшили и внутренний отступ */
}

/* 4. Убираем возможные отступы у main-content-wrapper (если он есть) */
.main-content-wrapper {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* --- ЖЕСТКАЯ ЗАЩИТА КЛИКОВ В ФУТЕРЕ --- */
.footer {
    position: relative !important;
    z-index: 100 !important; /* Поднимаем футер выше контента */
}

.footer-container {
    position: relative !important;
    z-index: 101 !important;
}

.footer-col {
    position: relative !important;
    z-index: 102 !important;
}

/* Делаем ссылки самыми верхними */
.footer-col a {
    position: relative !important;
    z-index: 103 !important;
    cursor: pointer !important;
    pointer-events: auto !important; /* Принудительно разрешаем клики */
}

/* Убеждаемся, что кнопка Наверх не перекрывает футер (она должна быть выше, но не перехватывать клики в пустых местах) */
.scroll-to-top {
    z-index: 9999 !important; 
}

/* --- РЕШАЕМ КОНФЛИКТ С КНОПКОЙ НАВЕРХ --- */
/* Даем кнопке Наверх самый большой z-index, но она не должна перекрывать футер */
#scrollToTopBtn {
    z-index: 999999 !important;
}

/* Поднимаем футер и все его ссылки выше остального контента, но ниже кнопки Наверх */
.footer {
    position: relative !important;
    z-index: 10000 !important; /* Футер выше контента */
}
.footer a {
    position: relative !important;
    z-index: 10001 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Модалка должна быть поверх всего (даже поверх кнопки Наверх) */
#footerModalOverlay {
    z-index: 9999999 !important;
}

/* --- ПРИНУДИТЕЛЬНОЕ РАЗБЛОКИРОВАНИЕ КЛИКОВ В ФУТЕРЕ --- */
.footer {
    position: relative !important;
    z-index: 99999 !important; /* Футер поверх всего */
}

.footer-col {
    position: relative !important;
    z-index: 100000 !important;
}

.footer a, .footer a * {
    position: relative !important;
    z-index: 100001 !important; /* Ссылки поверх самого футера */
    pointer-events: auto !important; /* Принудительно разрешаем клики */
    cursor: pointer !important; /* Меняем курсор на палец */
    display: inline-block !important; /* Чтобы ссылка занимала место */
}

/* Убираем возможные невидимые преграды */
.main-content-wrapper, .container, body {
    pointer-events: auto !important;
}

/* Делаем модалку еще выше */
#footerModalOverlay {
    z-index: 9999999 !important;
}

/* --- ИСПРАВЛЕНИЕ ОБРЕЗКИ ТЕКСТА В КАРТОЧКАХ --- */
.card-name {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important; /* Строго 2 строки */
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.35 !important;
    margin-bottom: 8px !important;
    
    /* Убираем жесткую минимальную высоту */
    min-height: auto !important; 
    
    /* Но задаем максимальную, чтобы не прыгало */
    max-height: 2.7em !important; 
    
    /* Прижимаем цену к низу, если текст короткий */
    flex-grow: 0 !important; 
}

/* Чтобы цены и сердечки всегда стояли на одном уровне, даже если текст разной длины */
.card-info {
    justify-content: space-between !important;
    height: 100% !important;
}

/* --- ИСПРАВЛЕНИЕ ИКОНОК В ФУТЕРЕ --- */
.social-links {
    display: flex !important;
    gap: 12px !important;
    margin-top: 16px !important;
}

.social-links a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 44px !important;
    background: #fff !important;
    border: 1px solid var(--border) !important;
    border-radius: 50% !important;
    color: var(--text) !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
}

.social-links a:hover {
    background: var(--text) !important;
    color: #fff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1) !important;
}

/* Задаем жесткий размер для SVG, чтобы они не прыгали */
.social-links svg {
    width: 20px !important;
    height: 20px !important;
    display: block !important;
}

/* --- КОРРЕКТИРОВКА ФОНОВОГО ФОТО В ПОДБОРКАХ --- */
.collection-wrapper.with-bg {
    /* Опускаем фокус фото чуть ниже (от 20% к 40%) */
    background-position: center 40% !important; 
}

/* --- КРАСИВОЕ ОФОРМЛЕНИЕ ТЕКСТА В МОДАЛКАХ ФУТЕРА --- */
#footerModalText {
    font-size: 15px !important;
    line-height: 1.6 !important;
    color: var(--text-2) !important;
    white-space: pre-wrap !important; /* Сохраняем переносы строк */
    max-height: 60vh !important; /* Увеличиваем высоту, чтобы влазило больше текста */
    overflow-y: auto !important;
    padding-right: 10px !important; /* Отступ для скроллбара */
}

/* Делаем скроллбар внутри модалки тонким и красивым */
#footerModalText::-webkit-scrollbar {
    width: 6px;
}
#footerModalText::-webkit-scrollbar-track {
    background: transparent;
}
#footerModalText::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}
#footerModalText::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* --- КОНТЕЙНЕР ДЛЯ ПЛАШЕК БРЕНДОВ --- */
.brands-container {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin-bottom: 16px !important;
}

/* Убираем отступ у самих плашек, так как он теперь в контейнере */
.brand-card-link {
    margin-bottom: 0 !important;
}

/* --- КОНТЕЙНЕР ДЛЯ КНОПОК В БАННЕРЕ --- */
.hero-buttons {
    display: flex !important;
    gap: 16px !important;
    margin-top: 24px !important;
    flex-wrap: wrap !important;
}

/* Базовая кнопка "Смотреть каталог" (белая) */
.hero-btn {
    margin-top: 0 !important; /* Убираем отступ, так как он теперь в контейнере */
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Новая кнопка "Мини-приложение" (прозрачная с рамкой) */
.hero-btn-outline {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    color: #fff !important;
    padding: 16px 32px !important;
    border-radius: 12px !important;
    font-weight: 800 !important;
    font-size: 16px !important;
    text-decoration: none !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    transition: all 0.3s ease !important;
}

.hero-btn-outline:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: #fff !important;
    transform: translateY(-2px) !important;
}

.hero-btn-outline svg {
    width: 20px !important;
    height: 20px !important;
}

/* --- ИСПРАВЛЕНИЕ РАЗМЕТКИ ШАПКИ --- */
.header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0 24px !important;
    position: fixed !important;
    top: 0; left: 0; right: 0;
    height: 72px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    border-bottom: 1px solid var(--border) !important;
    z-index: 1000 !important;
}

/* Левая часть (Бургер + Лого) */
.header-left {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    flex: 1 !important; /* Занимает всё свободное место слева */
    justify-content: flex-start !important;
}

/* Правая часть (Кнопки) */
.header-right {
    display: flex !important;
    align-items: center !important;
    gap: 24px !important;
    flex: 1 !important; /* Занимает всё свободное место справа */
    justify-content: flex-end !important;
}

/* Поиск по центру */
.search-box {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 400px !important; /* Фиксированная ширина */
    margin: 0 !important;
    z-index: 2 !important;
}

.search-box:focus-within {
    width: 500px !important;
}

/* На всякий случай прячем старый бургер, если он продублировался */


/* --- ЖЕСТКАЯ ФИКСАЦИЯ ЛЕВОЙ ЧАСТИ ШАПКИ --- */
.header-left {
    position: relative !important;
    z-index: 10 !important; /* Поднимаем левую часть выше поиска */
    min-width: 250px !important; /* Даем гарантированное место под бургер и лого */
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
}

/* Логотип должен быть поверх */
.logo {
    position: relative !important;
    z-index: 11 !important;
}

/* Бургер тоже */


/* Поиск оставляем по центру, но немного уменьшаем, чтобы он не лез на края */
.search-box {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 350px !important; /* Сделали чуть уже */
    z-index: 5 !important; /* Поиск ниже, чем лого */
}

.search-box:focus-within {
    width: 450px !important;
}

/* --- ЖЕЛЕЗОБЕТОННАЯ ФИКСАЦИЯ БУРГЕРА И ЛОГОТИПА --- */


.logo {
    margin: 0 !important;
    position: static !important;
    transform: none !important;
    float: none !important;
}

/* Принудительно ставим левую часть в начало строки */
.header {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.header-left {
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-start !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 20px !important;
    flex: 0 0 auto !important; /* Не позволяем растягиваться или сжиматься */
    position: relative !important;
    z-index: 100 !important;
}

/* Поиск строго по центру, но с ограничением */
.search-box {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 400px !important;
    z-index: 1 !important; /* Поиск под левой частью */
}

/* --- РАСТЯГИВАЕМ ПРОФИЛЬ НА ВЕСЬ ЭКРАН --- */
.profile-layout {
    display: grid !important;
    grid-template-columns: 1fr 2fr !important; /* Левая колонка 1 часть, правая 2 части */
    gap: 40px !important;
    max-width: 1400px !important; /* Увеличили максимальную ширину */
    margin: 0 auto !important;
    padding: 0 20px !important;
}

/* Убираем жесткую ширину у контейнера */
.container {
    max-width: 100% !important;
    padding: 0 !important;
}

/* --- ПРИНУДИТЕЛЬНОЕ РАСТЯГИВАНИЕ СТРАНИЦЫ ЗАКАЗОВ --- */
body {
    background-color: #f4f5f7 !important; /* Светлый фон, как в маркетплейсах */
}

/* Контейнер для страницы заказов (и профиля) */
.container {
    max-width: 100% !important; /* Убираем ограничение ширины */
    width: 100% !important;
    padding: 0 !important;
}

.profile-layout {
    display: grid !important;
    grid-template-columns: 260px 1fr !important; /* Меню фиксированное, контент — всё остальное */
    gap: 30px !important;
    max-width: 1600px !important;
    margin: 0 auto !important;
    padding: 0 40px !important;
    align-items: start !important;
}

/* Делаем так, чтобы правый блок занимал всё доступное место */
.profile-layout > div:last-child {
    width: 100% !important;
    max-width: none !important;
}

/* Убираем центрирование у пустого состояния (когда нет заказов) */
.empty-state {
    text-align: left !important;
    padding: 40px !important;
    background: #fff !important;
    border-radius: 16px !important;
    border: 1px solid #eaeaea !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Оформляем карточки товаров в заказах шире */
.order-card {
    width: 100% !important;
    box-sizing: border-box !important;
}

/* --- НАСТРОЙКА КАТАЛОГА (4 КОЛОНКИ И ОТСТУПЫ) --- */
.container {
    max-width: 1400px !important; /* Ограничиваем максимальную ширину */
    margin: 0 auto !important;    /* Центрируем контейнер */
    padding: 0 40px !important;   /* Добавляем отступы по бокам */
}

.grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important; /* СТРОГО 4 КОЛОНКИ */
    gap: 24px !important; /* Отступ между карточками */
    width: 100% !important;
}

/* Убеждаемся, что карточки сохраняют пропорции */
.card {
    width: 100% !important;
    height: auto !important;
}

.card-img {
    aspect-ratio: 3 / 4 !important; /* Пропорции 3:4 */
    width: 100% !important;
    height: auto !important;
}

/* --- КАТАЛОГ: 5 КОЛОНОК С ОТСТУПАМИ --- */
.container {
    max-width: 1600px !important; 
    margin: 0 auto !important;    
    padding: 0 60px !important;   
}

.grid {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important; /* СТРОГО 5 КОЛОНОК */
    gap: 20px !important;
    width: 100% !important;
}

.card {
    width: 100% !important;
    height: auto !important;
}

.card-img {
    aspect-ratio: 3 / 4 !important;
    width: 100% !important;
    height: auto !important;
}

/* --- СТИЛИ ДЛЯ ФИЛЬТРОВ --- */
.filter-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23999%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 10px;
    padding-right: 32px !important;
}

.filter-select:hover {
    border-color: #ccc !important;
    background-color: #fff !important;
}

.filter-select:focus {
    border-color: #111 !important;
    background-color: #fff !important;
}
