/* ============================================
   OSKAR TIME — Главные стили
   Премиальный минимализм, desktop + mobile
   ============================================ */

/* --- CSS переменные (тема) --- */
:root {
    --primary: #1a1a2e;
    --secondary: #16213e;
    --accent: #c9a96e;
    --accent-hover: #b8923f;
    --bg: #ffffff;
    --bg-light: #f5f5f5;
    --bg-dark: #1a1a2e;
    --text: #333333;
    --text-light: #777777;
    --text-white: #ffffff;
    --border: #e0e0e0;
    --success: #28a745;
    --danger: #dc3545;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 24px rgba(0,0,0,0.12);
    --radius: 4px;
    --transition: 0.3s ease;
    --container: 1280px;
    --header-h: 120px;
}

/* --- Сброс --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; transition: color var(--transition); }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul, ol { list-style: none; }

/* --- Контейнер --- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }

/* --- Типографика --- */
h1, h2, h3, h4, h5 { font-family: 'Montserrat', sans-serif; font-weight: 500; line-height: 1.3; color: var(--primary); }
h1 { font-size: 2.5rem; font-weight: 300; letter-spacing: 1px; }
h2 { font-size: 1.75rem; font-weight: 500; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; font-size: 0.75rem; }

/* ============================================
   ШАПКА (HEADER)
   ============================================ */
.header { position: sticky; top: 0; z-index: 1000; background: var(--bg); }

/* Верхняя полоса */
.header__top { background: var(--primary); color: var(--text-white); font-size: 0.8rem; padding: 0.4rem 0; }
.header__top-inner { display: flex; justify-content: space-between; align-items: center; }
.header__phone { color: var(--text-white); font-weight: 500; }
.header__phone:hover { color: var(--accent); }
.header__top-links { display: flex; gap: 1.5rem; }
.header__top-links a { color: rgba(255,255,255,0.8); font-size: 0.8rem; }
.header__top-links a:hover { color: var(--accent); }

/* Основная шапка */
.header__main { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.header__main-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }

/* Логотип */
.header__logo {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1.5rem;
    letter-spacing: 3px;
    color: var(--primary);
    white-space: nowrap;
}
.header__logo:hover { color: var(--accent); }

/* Навигация */
.header__nav { display: flex; align-items: center; gap: 0.5rem; }
.nav__link {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.5rem 1rem;
    color: var(--text);
    position: relative;
    white-space: nowrap;
}
.nav__link:hover { color: var(--accent); }
.nav__link--mobile { display: none; }
.nav__arrow { font-size: 0.65rem; margin-left: 2px; }

/* Мега-меню */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg);
    border-top: 2px solid var(--accent);
    box-shadow: var(--shadow-hover);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition);
    z-index: 100;
}
.nav__item--mega { position: static; }
.nav__item--mega:hover .mega-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.mega-menu__inner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; padding: 2rem 1.5rem; }
.mega-menu__col h4 { color: var(--primary); margin-bottom: 0.75rem; font-size: 0.7rem; }
.mega-menu__col a { display: block; padding: 0.3rem 0; color: var(--text); font-size: 0.9rem; }
.mega-menu__col a:hover { color: var(--accent); padding-left: 4px; }
.mega-menu__col--banner { display: flex; align-items: flex-end; }
.mega-menu__banner {
    display: block;
    padding: 1rem 1.5rem;
    background: var(--accent);
    color: var(--text-white);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: var(--radius);
    text-align: center;
    width: 100%;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}
.mega-menu__banner::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2.5s infinite;
}
@keyframes shimmer { 0%{left:-100%} 100%{left:200%} }
.mega-menu__banner:hover { background: var(--accent-hover); color: var(--text-white); transform: scale(1.02); }

/* Иконки шапки */
.header__actions { display: flex; align-items: center; gap: 1rem; }
.header__action { color: var(--text); padding: 0.5rem; position: relative; display: flex; align-items: center; }
.header__action:hover { color: var(--accent); }
.header__cart-count {
    position: absolute;
    top: 0; right: -4px;
    background: var(--accent);
    color: var(--text-white);
    font-size: 0.6rem;
    font-weight: 600;
    width: 16px; height: 16px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}

/* Бургер */
.header__burger { display: none; width: 28px; height: 20px; position: relative; flex-direction: column; justify-content: space-between; }
.header__burger span { display: block; width: 100%; height: 2px; background: var(--primary); transition: var(--transition); }
.mobile-nav-close { display: none; }

/* Поиск */
.search-overlay {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg);
    border-top: 1px solid var(--border);
    box-shadow: var(--shadow);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    z-index: 99;
}
.search-overlay.active { transform: translateY(0); opacity: 1; visibility: visible; }
.search-overlay__inner { display: flex; align-items: center; padding: 1rem 1.5rem; gap: 1rem; }
.search-overlay__inner input {
    flex: 1;
    border: none;
    font-size: 1.1rem;
    padding: 0.5rem 0;
    outline: none;
    font-family: 'Inter', sans-serif;
}
#searchClose { font-size: 1.2rem; color: var(--text-light); padding: 0.5rem; }
.search-results { padding: 0 1.5rem 1rem; max-height: 300px; overflow-y: auto; }
.search-results a {
    display: flex; align-items: center; gap: 1rem; padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}
.search-results img { width: 50px; height: 65px; object-fit: cover; }
.search-results .sr-name { font-weight: 500; }
.search-results .sr-price { color: var(--accent); font-weight: 600; }

/* ============================================
   КНОПКИ
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: var(--radius);
    transition: all var(--transition);
    cursor: pointer;
    border: none;
    min-height: 48px;
    white-space: nowrap;
}
.btn--primary { background: var(--accent); color: var(--text-white); }
.btn--primary:hover { background: var(--accent-hover); color: var(--text-white); transform: translateY(-1px); }
.btn--outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn--outline:hover { background: var(--primary); color: var(--text-white); }
.btn--dark { background: var(--primary); color: var(--text-white); }
.btn--dark:hover { background: var(--secondary); color: var(--text-white); }
.btn--sm { padding: 0.5rem 1.25rem; font-size: 0.75rem; min-height: 36px; }
.btn--full { width: 100%; }

/* ============================================
   HERO БАННЕР (фоновое фото + оверлей)
   ============================================ */
.hero {
    position: relative;
    height: 85vh;
    min-height: 550px;
    max-height: 800px;
    overflow: hidden;
    background: var(--primary);
}
.hero__slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 1s ease;
    z-index: 1;
}
.hero__slide.active { opacity: 1; z-index: 2; }
.hero__bg {
    position: absolute;
    inset: 0;
    background: center/cover no-repeat;
    transform: scale(1.05);
    transition: transform 6s ease;
    filter: blur(3px);
}
.hero__slide.active .hero__bg { transform: scale(1); }
.hero__overlay {
    position: absolute;
    inset: 0;
    background: transparent;
}
.hero__content { position: relative; z-index: 2; text-align: center; width: 100%; }
.hero__label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 5px;
    color: var(--accent);
    margin-bottom: 1.5rem;
}
.hero__brand {
    font-family: 'Montserrat', sans-serif;
    font-size: 3.5rem;
    font-weight: 500;
    letter-spacing: 6px;
    color: #ffffff;
    text-shadow: 0 2px 20px rgba(0,0,0,0.6);
    margin-bottom: 1.25rem;
    line-height: 1.2;
}
.hero__sub {
    font-family: 'Inter', sans-serif;
    font-size: 1.15rem;
    color: rgba(255,255,255,0.7);
    letter-spacing: 2px;
    margin-bottom: 2.5rem;
}
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero__actions--center { justify-content: center; }
.hero__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    color: rgba(255,255,255,0.5);
    font-size: 2.5rem;
    padding: 0.75rem;
    transition: all var(--transition);
    background: rgba(0,0,0,0.2);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero__arrow:hover { color: #fff; background: rgba(0,0,0,0.4); }
.hero__arrow--left { left: 1.5rem; }
.hero__arrow--right { right: 1.5rem; }
.hero__dots {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}
.hero__dots span {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: var(--transition);
}
.hero__dots span.active { background: var(--accent); transform: scale(1.3); }

/* Большие баннеры (полноширинные) */
.full-banner {
    position: relative;
    height: 450px;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.full-banner__bg {
    position: absolute;
    inset: 0;
    background: center/cover no-repeat;
    transition: transform 0.5s ease;
}
.full-banner:hover .full-banner__bg { transform: scale(1.03); }
.full-banner__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(26,26,46,0.7) 0%, rgba(26,26,46,0.2) 100%);
}
.full-banner__content {
    position: relative;
    z-index: 2;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}
.full-banner__label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 4px;
    color: var(--accent);
    margin-bottom: 1rem;
}
.full-banner__title {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--text-white);
    margin-bottom: 0.75rem;
    letter-spacing: 2px;
}
.full-banner__text {
    font-size: 1rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 2rem;
    max-width: 500px;
}
.full-banner__content[style*="text-align:right"] .full-banner__text { margin-left: auto; }

/* ============================================
   СЕКЦИИ ГЛАВНОЙ
   ============================================ */
.section { padding: 5rem 0; }
.section--grey { background: var(--bg-light); }
.section--dark { background: var(--primary); color: var(--text-white); }
.section__header { text-align: center; margin-bottom: 3rem; }
.section__header h2 { margin-bottom: 0.5rem; }
.section__header p { color: var(--text-light); font-size: 0.95rem; }
.section--dark .section__header h2 { color: var(--text-white); }
.section--dark .section__header p { color: rgba(255,255,255,0.6); }

/* Категории (2 колонки) */
.categories-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.category-card {
    position: relative;
    aspect-ratio: 4/3;
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    background: var(--primary);
}
.category-card__img {
    position: absolute;
    inset: 0;
    background: center/cover no-repeat;
    opacity: 0.5;
    transition: all 0.5s ease;
}
.category-card:hover .category-card__img { opacity: 0.3; transform: scale(1.05); }
.category-card__content { position: relative; z-index: 2; padding: 2rem; width: 100%; }
.category-card__content h3 {
    color: var(--text-white);
    font-family: 'Montserrat', sans-serif;
    font-size: 1.75rem;
    font-weight: 300;
    letter-spacing: 3px;
    text-transform: uppercase;
}
.category-card__content span { color: var(--accent); font-size: 0.9rem; }

/* Компактные категории (без дубля подписей) */
.categories-grid-compact { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.category-compact {
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}
.category-compact:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.category-compact__img {
    aspect-ratio: 16/9;
    background: center/cover no-repeat;
    background-color: var(--bg-light);
}
.category-compact__label {
    padding: 1rem 1.25rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary);
    background: var(--bg);
}

/* Промо-баннеры */
.promo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.promo-banner {
    position: relative;
    aspect-ratio: 16/9;
    border-radius: var(--radius);
    overflow: hidden;
    background: center/cover no-repeat;
    background-color: var(--bg-light);
    display: flex;
    align-items: flex-end;
    transition: transform var(--transition);
}
.promo-banner:hover { transform: translateY(-3px); }
.promo-banner__text {
    padding: 1.5rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    width: 100%;
}
.promo-banner__text h3 { color: var(--text-white); font-size: 1.1rem; margin-bottom: 0.25rem; }
.promo-banner__text p { color: rgba(255,255,255,0.8); font-size: 0.85rem; }

/* Теги "Также ищут" */
.tags-section { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.tags-section h3 { margin-bottom: 1rem; font-size: 1.1rem; }
.tags-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text);
    transition: all var(--transition);
    white-space: nowrap;
}
.tag-link:hover { border-color: var(--accent); color: var(--accent); }

/* Кнопка "Показать ещё" */
.load-more { text-align: center; margin-top: 2rem; }
.btn--load-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 3rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: 1.5px solid var(--primary);
    border-radius: var(--radius);
    color: var(--primary);
    background: transparent;
    cursor: pointer;
    transition: all var(--transition);
}
.btn--load-more:hover { background: var(--primary); color: var(--text-white); }

/* Сетка товаров */
.products-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* Карточка товара */
.product-card { position: relative; transition: transform var(--transition); }
.product-card:hover { transform: translateY(-4px); }
.product-card__img {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--bg-light);
}
.product-card__img img { width: 100%; height: 100%; object-fit: cover; transition: opacity var(--transition); }
.product-card__badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 2px;
    z-index: 2;
}
.product-card__badge--new { background: var(--accent); color: var(--text-white); }
.product-card__badge--sale { background: var(--danger); color: var(--text-white); }
.product-card__badge--hit { background: var(--primary); color: var(--text-white); }
.product-card__quick {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.75rem;
    background: rgba(26,26,46,0.9);
    color: var(--text-white);
    text-align: center;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0;
    transform: translateY(100%);
    transition: all var(--transition);
}
.product-card:hover .product-card__quick { opacity: 1; transform: translateY(0); }
.product-card__info { padding: 0.75rem 0.25rem; }
.product-card__brand { font-size: 0.65rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 1px; }
.product-card__name { font-size: 0.9rem; font-weight: 500; margin: 0.25rem 0; color: var(--text); line-height: 1.3; }
.product-card__colors { display: flex; gap: 4px; margin: 0.5rem 0; }
.product-card__color {
    width: 14px; height: 14px; border-radius: 50%;
    border: 1.5px solid var(--border);
}
.product-card__price { font-weight: 600; color: var(--primary); }
.product-card__price-old { text-decoration: line-through; color: var(--text-light); font-weight: 400; font-size: 0.85rem; margin-left: 0.5rem; }
.product-card__wholesale { font-size: 0.75rem; color: var(--text-light); margin-top: 0.2rem; }

/* Преимущества */
.advantages-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; text-align: center; }
.advantage__icon { font-size: 2.5rem; margin-bottom: 1rem; }
.advantage__title { font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.5rem; }
.advantage__text { font-size: 0.85rem; color: var(--text-light); }

/* Оптовый баннер */
.wholesale-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--primary);
    border-radius: var(--radius);
    padding: 3rem 4rem;
    gap: 2rem;
}
.wholesale-banner h2 { color: var(--text-white); margin-bottom: 0.5rem; }
.wholesale-banner p { color: rgba(255,255,255,0.7); max-width: 500px; }

/* ============================================
   КАТАЛОГ (catalog.html)
   ============================================ */
.catalog-layout { display: grid; grid-template-columns: 260px 1fr; gap: 2rem; padding: 2rem 0; }

/* Фильтры */
.filters { position: sticky; top: 20px; align-self: start; max-height: calc(100vh - 40px); overflow-y: auto; }
.filters__group { margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.filters__group h4 { margin-bottom: 0.75rem; color: var(--primary); }
.filters__group label { display: flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0; cursor: pointer; font-size: 0.9rem; }
.filters__group input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; }
.filters__colors { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-color {
    width: 28px; height: 28px; border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}
.filter-color:hover, .filter-color.active { border-color: var(--accent); transform: scale(1.15); }

/* Панель каталога */
.catalog__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.catalog__count { color: var(--text-light); font-size: 0.9rem; }
.catalog__sort select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    background: var(--bg);
    cursor: pointer;
}

/* Пагинация */
.pagination { display: flex; justify-content: center; gap: 0.5rem; margin-top: 3rem; }
.pagination a, .pagination span {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 500;
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .active { background: var(--primary); color: var(--text-white); border-color: var(--primary); }

/* Кнопка фильтров (мобилка) */
.filters-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 500;
    background: var(--bg);
}

/* ============================================
   КАРТОЧКА ТОВАРА (product.html)
   ============================================ */
.product-page { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; padding: 2rem 0; }

/* Галерея */
.gallery { position: sticky; top: 20px; align-self: start; max-height: calc(100vh - 40px); overflow-y: auto; }
.gallery__main { aspect-ratio: 3/4; border-radius: var(--radius); overflow: hidden; background: var(--bg-light); margin-bottom: 0.75rem; }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumbs { display: flex; gap: 0.5rem; }
.gallery__thumb {
    width: 70px; height: 90px; border-radius: var(--radius);
    overflow: hidden; cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}
.gallery__thumb.active, .gallery__thumb:hover { border-color: var(--accent); }
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Детали */
.product-info__brand { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 2px; color: var(--text-light); margin-bottom: 0.25rem; }
.product-info__name { font-size: 1.75rem; font-weight: 300; margin-bottom: 0.5rem; }
.product-info__sku { font-size: 0.8rem; color: var(--text-light); margin-bottom: 1.5rem; }
.product-info__price { font-size: 1.75rem; font-weight: 600; color: var(--primary); margin-bottom: 0.25rem; }
.product-info__wholesale { font-size: 0.9rem; color: var(--accent); margin-bottom: 2rem; }

/* Выбор цвета/размера */
.product-option { margin-bottom: 1.5rem; }
.product-option__label { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.5rem; }
.color-options { display: flex; gap: 8px; }
.color-option {
    width: 32px; height: 32px; border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}
.color-option:hover, .color-option.active { border-color: var(--accent); }
.color-option.active::after {
    content: '✓'; position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 0.8rem; text-shadow: 0 0 2px rgba(0,0,0,0.5);
}
.size-options { display: flex; flex-wrap: wrap; gap: 8px; }
.size-option {
    min-width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    padding: 0 0.5rem;
}
.size-option:hover { border-color: var(--accent); }
.size-option.active { background: var(--primary); color: var(--text-white); border-color: var(--primary); }
.size-option.disabled { opacity: 0.3; cursor: not-allowed; }

/* Количество */
.qty-control { display: flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius); width: fit-content; }
.qty-control button { width: 44px; height: 44px; font-size: 1.2rem; display: flex; align-items: center; justify-content: center; }
.qty-control button:hover { color: var(--accent); }
.qty-control input { width: 50px; height: 44px; text-align: center; border: none; border-left: 1px solid var(--border); border-right: 1px solid var(--border); font-size: 1rem; font-weight: 500; }
.qty-control input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Табы характеристик */
.product-tabs { margin-top: 3rem; }
.tabs__nav { display: flex; border-bottom: 1px solid var(--border); gap: 0; }
.tab-btn {
    padding: 0.75rem 1.5rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    cursor: pointer;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--accent); }
.tab-content { display: none; padding: 1.5rem 0; font-size: 0.95rem; line-height: 1.8; }
.tab-content.active { display: block; }

/* Блок "Подберите галстук" */
.matching-section { margin-top: 4rem; padding-top: 3rem; border-top: 1px solid var(--border); }

/* ============================================
   КОРЗИНА
   ============================================ */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { text-align: left; padding: 1rem; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; border-bottom: 2px solid var(--border); color: var(--text-light); }
.cart-table td { padding: 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.cart-item__img { width: 80px; height: 100px; object-fit: cover; border-radius: var(--radius); }
.cart-item__name { font-weight: 500; }
.cart-item__variant { font-size: 0.8rem; color: var(--text-light); }
.cart-item__remove { color: var(--text-light); font-size: 0.8rem; cursor: pointer; }
.cart-item__remove:hover { color: var(--danger); }
.cart-summary { max-width: 400px; margin-left: auto; padding: 2rem; background: var(--bg-light); border-radius: var(--radius); margin-top: 2rem; }
.cart-summary__row { display: flex; justify-content: space-between; padding: 0.5rem 0; font-size: 0.95rem; }
.cart-summary__total { font-size: 1.25rem; font-weight: 600; border-top: 2px solid var(--border); padding-top: 1rem; margin-top: 0.5rem; }

/* Прогресс-бар доставки */
.delivery-progress { margin-bottom: 2rem; }
.delivery-progress__bar { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.delivery-progress__fill { height: 100%; background: var(--accent); transition: width var(--transition); }
.delivery-progress__text { font-size: 0.85rem; color: var(--text-light); margin-top: 0.5rem; }

/* Пустая корзина */
.cart-empty { text-align: center; padding: 5rem 0; }
.cart-empty__icon { font-size: 4rem; margin-bottom: 1rem; opacity: 0.3; }
.cart-empty h2 { margin-bottom: 0.5rem; }
.cart-empty p { color: var(--text-light); margin-bottom: 2rem; }

/* ============================================
   ОФОРМЛЕНИЕ ЗАКАЗА
   ============================================ */
.checkout-layout { display: grid; grid-template-columns: 1fr 400px; gap: 3rem; padding: 2rem 0; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.5rem; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: border-color var(--transition);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; border-color: var(--accent); }
.form-group textarea { resize: vertical; min-height: 80px; }

/* Радио-кнопки доставки */
.delivery-options { display: flex; flex-direction: column; gap: 0.75rem; }
.delivery-option {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}
.delivery-option:hover { border-color: var(--accent); }
.delivery-option input[type="radio"] { accent-color: var(--accent); width: 18px; height: 18px; }

/* ============================================
   ФУТЕР
   ============================================ */
.footer { background: var(--primary); color: var(--text-white); padding: 4rem 0 2rem; }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.footer__logo { font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 1.25rem; letter-spacing: 3px; margin-bottom: 0.5rem; }
.footer__slogan { color: var(--accent); font-size: 0.85rem; margin-bottom: 1rem; }
.footer__copy { font-size: 0.75rem; color: rgba(255,255,255,0.4); }
.footer__col h4 { color: var(--accent); margin-bottom: 1rem; font-size: 0.7rem; }
.footer__col a { display: block; padding: 0.25rem 0; color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.footer__col a:hover { color: var(--accent); }
.footer__col p { font-size: 0.9rem; color: rgba(255,255,255,0.7); }

/* ============================================
   BREADCRUMBS
   ============================================ */
.breadcrumbs { padding: 1rem 0; font-size: 0.8rem; color: var(--text-light); }
.breadcrumbs a { color: var(--text-light); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs span { margin: 0 0.5rem; }

/* ============================================
   СТРАНИЦЫ КОНТЕНТА (about, delivery, contacts, wholesale)
   ============================================ */
.page-header { padding: 3rem 0; text-align: center; border-bottom: 1px solid var(--border); }
.page-header h1 { margin-bottom: 0.5rem; }
.page-header p { color: var(--text-light); }
.page-content { padding: 3rem 0; max-width: 900px; margin: 0 auto; }
.page-content p { margin-bottom: 1.5rem; line-height: 1.8; }
.page-content h2 { margin-bottom: 1rem; margin-top: 2rem; }

/* Таблица оптовых скидок */
.table-styled { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.table-styled th { background: var(--primary); color: var(--text-white); padding: 0.75rem 1rem; text-align: left; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; }
.table-styled td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); }
.table-styled tr:hover { background: var(--bg-light); }

/* Форма обратной связи */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.contact-info__item { display: flex; gap: 1rem; margin-bottom: 1.5rem; }
.contact-info__icon { font-size: 1.5rem; color: var(--accent); }

/* ============================================
   АДМИН-ПАНЕЛЬ
   ============================================ */
.admin-login { max-width: 400px; margin: 5rem auto; padding: 2rem; background: var(--bg-light); border-radius: var(--radius); }
.admin-layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-sidebar { background: var(--primary); padding: 2rem 0; }
.admin-sidebar__logo { padding: 0 1.5rem 2rem; font-family: 'Montserrat', sans-serif; font-weight: 600; color: var(--text-white); letter-spacing: 2px; font-size: 0.9rem; }
.admin-sidebar a { display: block; padding: 0.75rem 1.5rem; color: rgba(255,255,255,0.7); font-size: 0.9rem; transition: var(--transition); }
.admin-sidebar a:hover, .admin-sidebar a.active { color: var(--text-white); background: rgba(255,255,255,0.1); }
.admin-content { padding: 2rem; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-bottom: 2rem; }
.admin-stat { padding: 1.5rem; background: var(--bg-light); border-radius: var(--radius); }
.admin-stat__value { font-size: 2rem; font-weight: 600; color: var(--primary); }
.admin-stat__label { font-size: 0.8rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 1px; }
.status-badge { display: inline-block; padding: 0.25rem 0.75rem; border-radius: 12px; font-size: 0.75rem; font-weight: 600; }
.status-badge--new { background: #e3f2fd; color: #1565c0; }
.status-badge--processing { background: #fff3e0; color: #e65100; }
.status-badge--shipped { background: #e8f5e9; color: #2e7d32; }
.status-badge--delivered { background: #e8f5e9; color: #1b5e20; }
.status-badge--cancelled { background: #fce4ec; color: #c62828; }

/* Flash-сообщения */
.flash { padding: 0.75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: 0.9rem; }
.flash--error { background: #fce4ec; color: #c62828; }
.flash--success { background: #e8f5e9; color: #2e7d32; }

/* Прогресс отслеживания заказа */
.order-progress { margin: 1.5rem 0 0.5rem; }
.order-progress__bar { height: 4px; background: var(--border); border-radius: 2px; margin-bottom: 1rem; }
.order-progress__fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width 0.5s ease; }
.order-progress__steps { display: flex; justify-content: space-between; }
.order-progress__step { text-align: center; font-size: 0.75rem; color: var(--text-light); }
.order-progress__step.active { color: var(--primary); font-weight: 600; }
.order-progress__dot {
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--border); margin: 0 auto 0.5rem;
}
.order-progress__step.active .order-progress__dot { background: var(--accent); }

/* ============================================
   АНИМАЦИИ
   ============================================ */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Cookie баннер */
.cookie-banner {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--primary);
    color: var(--text-white);
    padding: 1rem 0;
    z-index: 9999;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
}
.cookie-banner a { color: var(--accent); }

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */

/* Планшет: 481px — 1024px */
@media (max-width: 1024px) {
    .header__top-links { display: none; }
    .header__nav { gap: 0; }
    .nav__link { padding: 0.5rem 0.6rem; font-size: 0.75rem; }
    .mega-menu__inner { grid-template-columns: repeat(3, 1fr); }
    .mega-menu__col--banner { display: none; }

    .hero__brand { font-size: 3rem; letter-spacing: 8px; }
    .products-grid { grid-template-columns: repeat(3, 1fr); }
    .advantages-grid { grid-template-columns: repeat(2, 1fr); }
    .wholesale-banner { padding: 2rem; flex-direction: column; text-align: center; }

    .catalog-layout { grid-template-columns: 220px 1fr; }
    .product-page { gap: 2rem; }
    .checkout-layout { grid-template-columns: 1fr; }
    .footer__grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
    .admin-stats { grid-template-columns: repeat(2, 1fr); }
    .contact-grid { grid-template-columns: 1fr; }
}

/* Мобилка: до 480px */
@media (max-width: 480px) {
    :root { --header-h: 60px; }
    .container { padding: 0 1rem; }

    /* Шапка мобилка */
    .header__top { display: none; }
    .header__main { padding: 0.75rem 0; }
    .header__logo { font-size: 1.1rem; letter-spacing: 2px; }
    .header__burger { display: flex; }
    .header__nav {
        position: fixed;
        top: 0; left: -100%;
        width: 85%; max-width: 320px;
        height: 100vh;
        background: #ffffff;
        flex-direction: column;
        align-items: flex-start;
        padding: 4rem 1.5rem 2rem;
        box-shadow: 4px 0 20px rgba(0,0,0,0.15);
        transition: left var(--transition);
        z-index: 1001;
        overflow-y: auto;
    }
    .header__nav.active { left: 0; }
    .nav__link { padding: 1rem 0; font-size: 1rem; width: 100%; display: block; border-bottom: 1px solid #f0f0f0; color: var(--text); }
    .nav__link:active { color: var(--accent); }
    .nav__link--mobile { display: block; }
    .nav__item--mega { width: 100%; }
    .nav__item--mega > .nav__link { display: flex; justify-content: space-between; align-items: center; }
    .mega-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; display: none; border-top: none; }
    .mega-menu.mobile-open { display: block; background: #f9f9f9; margin: 0 -1.5rem; padding: 0.5rem 1.5rem; }
    .mega-menu__inner { grid-template-columns: 1fr; gap: 0.75rem; padding: 0.5rem 0; }
    .mega-menu__col { margin-bottom: 0.5rem; }
    .mega-menu__col a { padding: 0.4rem 0; font-size: 0.9rem; }
    .mega-menu__col--banner { display: none; }

    /* Кнопка закрытия мобильного меню */
    .mobile-nav-close {
        display: block;
        position: absolute;
        top: 0.75rem; right: 0.75rem;
        font-size: 1.5rem;
        padding: 0.5rem;
        color: var(--text);
        cursor: pointer;
        background: none;
        border: none;
        z-index: 1002;
    }

    /* Оверлей мобильного меню */
    .nav-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 999; }
    .nav-overlay.active { display: block; }

    /* Hero мобилка */
    .hero { height: 70vh; min-height: 400px; max-height: 550px; }
    .hero__brand { font-size: 1.5rem !important; letter-spacing: 2px !important; line-height: 1.4; }
    .hero__sub { font-size: 0.85rem; letter-spacing: 1px; }
    .hero__label { font-size: 0.7rem; letter-spacing: 3px; }
    .hero__arrow { width: 36px; height: 36px; font-size: 1.5rem; }
    .hero__arrow--left { left: 0.5rem; }
    .hero__arrow--right { right: 0.5rem; }
    .full-banner { height: 300px; }
    .full-banner__title { font-size: 1.5rem; }
    .full-banner__text { font-size: 0.85rem; }
    .full-banner__content[style*="text-align:right"] { text-align: left !important; }
    .btn { padding: 0.75rem 1.5rem; font-size: 0.75rem; }

    /* Сетки */
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.35rem; }
    .categories-grid { grid-template-columns: 1fr; }
    .categories-grid-compact { grid-template-columns: 1fr; }
    .hero__brand { font-size: 2rem; letter-spacing: 5px; }
    .hero__arrow { font-size: 2rem; padding: 0.5rem; width: 40px; height: 40px; }
    .hero__arrow--left { left: 0.5rem; }
    .hero__arrow--right { right: 0.5rem; }
    .hero__slide-inner { grid-template-columns: 1fr; }
    .hero__photo { display: none; }
    .hero__text { text-align: center; }
    .hero__brand { text-align: center !important; }
    .hero__desc { margin: 0 auto 2rem; text-align: center; }
    .hero__actions { justify-content: center; }
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .advantages-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
    .section { padding: 3rem 0; }

    /* Каталог */
    .catalog-layout { grid-template-columns: 1fr; }
    .filters { display: none; }
    .filters.active { display: block; position: fixed; inset: 0; z-index: 1001; background: var(--bg); padding: 5rem 1.5rem 2rem; overflow-y: auto; }
    .filters-toggle { display: flex; }
    .filters-close { display: none; position: fixed; top: 1rem; right: 1rem; z-index: 1002; font-size: 1.5rem; padding: 0.5rem; }
    .filters.active + .filters-close { display: block; }
    .catalog__top { flex-direction: column; gap: 0.75rem; align-items: flex-start; }

    /* Товар */
    .product-page { grid-template-columns: 1fr; gap: 1.5rem; }
    .gallery { position: static; }
    .product-info__name { font-size: 1.35rem; }
    .product-info__price { font-size: 1.35rem; }

    /* Корзина */
    .cart-table thead { display: none; }
    .cart-table, .cart-table tbody, .cart-table tr, .cart-table td { display: block; width: 100%; }
    .cart-table tr { padding: 1rem 0; border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
    .cart-table td { padding: 0.25rem 0; border: none; }
    .cart-summary { margin-left: 0; max-width: 100%; }

    /* Админ */
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar { display: none; }
    .admin-stats { grid-template-columns: 1fr 1fr; }

    /* Футер */
    .footer__grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* Средний планшет 481-768px */
@media (min-width: 481px) and (max-width: 768px) {
    .header__burger { display: flex; }
    .header__nav {
        position: fixed;
        top: 0; left: -100%;
        width: 70%;
        height: 100vh;
        background: var(--bg);
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        box-shadow: var(--shadow-hover);
        transition: left var(--transition);
        z-index: 1001;
    }
    .header__nav.active { left: 0; }
    .nav__link { padding: 0.75rem 0; width: 100%; }
    .nav__link--mobile { display: block; }
    .mega-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; display: none; }
    .mega-menu.mobile-open { display: block; }
    .mega-menu__inner { grid-template-columns: 1fr 1fr; padding: 0.5rem 0; }
    .nav-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 999; }
    .nav-overlay.active { display: block; }
    .filters-toggle { display: flex; }
    .filters { display: none; }
}

/* iOS mobile menu fix */
body.menu-open { position: fixed; width: 100%; }
.header__nav a { -webkit-tap-highlight-color: rgba(201,169,110,0.3); touch-action: manipulation; }

/* Стрелка мега-меню мобилка */
@media (max-width: 768px) {
    .nav__arrow {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1.5px solid var(--border);
        color: var(--text);
        width: 32px;
        height: 32px;
        border-radius: 6px;
        font-size: 0.75rem;
        margin-left: auto;
        flex-shrink: 0;
    }
    /* Баннеры мобилка — простой оверлей без градиента */
    .full-banner { height: 280px; }
    .full-banner__overlay { background: rgba(26,26,46,0.75) !important; }
    .full-banner__title { font-size: 1.4rem; letter-spacing: 1px; }
    .full-banner__text { font-size: 0.85rem; max-width: 100%; }
    .full-banner__label { font-size: 0.65rem; }
    .full-banner__content[style*="text-align:right"] { text-align: left !important; }
    .full-banner__content[style*="text-align:right"] .full-banner__text { margin-left: 0; }
}
