/* ============================================================================
   SAKURA SUSHI — единый файл стилей
   ----------------------------------------------------------------------------
   Структура (по порядку):
     01. Переменные и палитра
     02. Сброс и базовая типографика
     03. Утилиты (container, кнопки, иконки)
     04. Верхняя контактная полоса (topbar)
     05. Основная шапка (header) + логотип + навигация + корзина
     06. Hero (главная)
     07. Якорное меню категорий (catnav)
     08. Секция категории на главной (cat-section)
     09. Карточка товара (product)
     10. Заголовок страницы категории (cat-header)
     11. Блок «другие разделы»
     12. Страница товара
     13. Страница корзины
     14. Информационные страницы (доставка, статьи, политика)
     15. Подвал (footer)
     16. Адаптивность (мобилка / планшет)
     17. Админ-панель (изолированные классы admin-*)
   ============================================================================ */




/* ============================================================================
   01. ПЕРЕМЕННЫЕ И ПАЛИТРА
   ============================================================================ */

:root {
    /* Цвета фона — светлая (белая) тема */
    --bg:          #FFFFFF;   /* белый — основной фон */
    --surface:     #FFFFFF;   /* карточки */
    --surface-2:   #F4F5F7;   /* мягкая выделенная плашка (нейтральный серый) */

    /* Текст */
    --text:        #1A1A1A;   /* почти чёрный */
    --text-muted:  #5C5C5C;
    --text-soft:   #909090;

    /* Границы и тени */
    --border:      #E2E4E8;
    --border-soft: #EDEEF1;
    --shadow-sm:   0 1px 2px rgba(20, 20, 20, .04);
    --shadow-md:   0 8px 24px -8px rgba(20, 20, 20, .12);
    --shadow-lg:   0 20px 60px -20px rgba(20, 20, 20, .22);

    /* Акценты */
    --accent:      #D11E1E;   /* красный — под цвет логотипа ТеСТо */
    --accent-dark: #1C1816;
    --warn:        #C24914;

    /* Радиусы */
    --r-sm: 8px;
    --r-md: 14px;
    --r-lg: 22px;
    --r-xl: 32px;

    /* Контейнер */
    --container: 1240px;
    --pad:       24px;

    /* Шрифты */
    --font-display: 'Unbounded', 'Manrope', system-ui, sans-serif;
    --font-body:    'Manrope', system-ui, -apple-system, sans-serif;
    /* Шрифт слогана на главной. Artifakt Element — платный, файлы кладутся
       в static/fonts/ (см. @font-face ниже). Пока их нет — используется Inter Thin. */
    --font-slogan:  'Artifakt Element', 'Inter', 'Manrope', system-ui, sans-serif;

    /* Тайминги */
    --t-fast: 120ms;
    --t-med:  220ms;
    --t-slow: 400ms;
    --ease:   cubic-bezier(.4, 0, .2, 1);
}




/* ============================================================================
   02. СБРОС И БАЗОВАЯ ТИПОГРАФИКА
   ============================================================================ */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 140px; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.05;
    margin: 0;
    color: var(--text);
}

p { margin: 0; }

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--t-fast) var(--ease);
}

a:hover { color: var(--accent); }

img { max-width: 100%; display: block; }

button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

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

::selection { background: var(--accent); color: #fff; }




/* ============================================================================
   03. УТИЛИТЫ — контейнер, кнопки, иконки
   ============================================================================ */

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--pad);
}

.icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* --- Кнопки --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 26px;
    border-radius: 999px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.01em;
    transition: all var(--t-med) var(--ease);
    white-space: nowrap;
}

.btn--primary {
    background: var(--text);
    color: var(--bg);
}
.btn--primary:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn--ghost {
    background: transparent;
    color: var(--text);
    border: 1.5px solid var(--border);
}
.btn--ghost:hover {
    border-color: var(--text);
    color: var(--text);
}

.btn--full { width: 100%; justify-content: center; }

/* --- Хлебные крошки --- */
.breadcrumbs {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs span { color: var(--text-soft); }

/* --- Общий заголовок страницы --- */
.page-title {
    font-size: clamp(34px, 5vw, 56px);
    margin-bottom: 16px;
}
.page-lead {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 640px;
    margin-bottom: 48px;
}




/* ============================================================================
   04. ВЕРХНЯЯ КОНТАКТНАЯ ПОЛОСА (topbar)
   ============================================================================ */

.topbar {
    background: var(--text);
    color: #D6CFC4;
    font-size: 13px;
    padding: 10px 0;
    letter-spacing: 0.01em;
}

.topbar__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.topbar__group {
    display: flex;
    align-items: center;
    gap: 24px;
}

.topbar__item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.topbar__item .icon { width: 14px; height: 14px; opacity: .7; }

.topbar__link:hover { color: #fff; }

.topbar__phone {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    transition: color var(--t-fast) var(--ease);
}
.topbar__phone:hover { color: var(--accent); }




/* ============================================================================
   05. ОСНОВНАЯ ШАПКА — логотип, навигация, корзина
   ============================================================================ */

.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: saturate(160%) blur(12px);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 12px -6px rgba(20, 20, 20, .12);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    height: 78px;
}

/* --- Логотип --- */
.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Логотип-картинка в шапке. Логотип почти квадратный, вписываем по высоте. */
.logo__img {
    height: 52px;
    width: auto;
    display: block;
    transition: transform var(--t-med) var(--ease);
}

.logo:hover .logo__img { transform: scale(1.04); }

/* Логотип в подвале — на тёмном фоне. Кладём на белую подложку,
   потому что у картинки белый фон (на тёмном смотрелся бы как белый прямоугольник). */
.logo--footer .logo__img {
    height: 96px;
    background: #fff;
    border-radius: var(--r-md);
    padding: 10px 14px;
}

.logo__mark {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    font-size: 22px;
    font-family: var(--font-display);
    line-height: 1;
}

.logo__text {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 20px;
    letter-spacing: 0.04em;
    color: var(--text);
}

.logo:hover { color: var(--text); }
.logo:hover .logo__mark { transform: rotate(-8deg); transition: transform var(--t-med) var(--ease); }

/* --- Категориальная навигация в шапке --- */
.nav {
    display: flex;
    gap: 4px;
    align-items: center;
}

.nav__link {
    padding: 9px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    transition: all var(--t-fast) var(--ease);
}

.nav__link:hover {
    color: var(--text);
    background: var(--surface-2);
}

/* --- Кнопка-корзина --- */
.cart-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 18px 11px 16px;
    background: var(--text);
    color: var(--bg);
    border-radius: 999px;
    font-weight: 600;
    font-size: 14px;
    transition: all var(--t-med) var(--ease);
}

.cart-btn:hover {
    background: var(--accent);
    color: #fff;
}

.cart-btn .icon { width: 18px; height: 18px; }

.cart-btn__count {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    background: var(--accent);
    color: #fff;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.cart-btn:hover .cart-btn__count {
    background: #fff;
    color: var(--accent);
}

.cart-btn__count[data-empty] { display: none; }




/* ============================================================================
   06. HERO — главный (и единственный) экран главной страницы
   ============================================================================ */

.hero {
    padding: 40px 0 90px;
    overflow: hidden;
}

.hero__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;      /* слоган и логотип строго на одном уровне */
    gap: 56px;
    min-height: 60vh;
}

/* --- Слоган --- */
.hero__title {
    font-family: var(--font-slogan);
    font-weight: 100;               /* начертание Hair */
    font-size: clamp(44px, 6.4vw, 104px);
    line-height: 1.02;
    letter-spacing: -0.02em;
    margin: 0 0 40px;
    display: flex;
    flex-direction: column;
}

.hero__title-red  { color: var(--accent); }
.hero__title-dark { color: var(--text); }

/* --- Кнопки под слоганом --- */
.hero__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* --- Логотип справа --- */
.hero__art {
    position: relative;
    width: 100%;
    max-width: 620px;
    margin-left: auto;
    justify-self: end;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero__logo {
    width: 100%;
    height: auto;
    display: block;
}




/* ============================================================================
   07. ЯКОРНОЕ МЕНЮ КАТЕГОРИЙ (catnav)
   ============================================================================ */

.catnav {
    position: sticky;
    top: 78px;
    z-index: 40;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
    padding: 14px 0;
}

.catnav__inner {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
}

.catnav__inner::-webkit-scrollbar { display: none; }

.catnav__pill {
    --accent: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px 9px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    transition: all var(--t-fast) var(--ease);
}

.catnav__pill:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.catnav__dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    flex-shrink: 0;
}




/* ============================================================================
   08. СЕКЦИЯ КАТЕГОРИИ НА ГЛАВНОЙ
   ============================================================================ */

.cat-section {
    padding: 72px 0;
}

.cat-section:not(:last-child) {
    border-bottom: 1px solid var(--border-soft);
}

.cat-section__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.cat-section__tag {
    --accent: var(--accent);
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 10px;
}

.cat-section__title {
    font-size: clamp(32px, 4vw, 48px);
}

.cat-section__more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    transition: all var(--t-fast) var(--ease);
}

.cat-section__more:hover {
    color: var(--text);
    border-color: var(--text);
    transform: translateX(2px);
}

/* --- Сетка карточек --- */
.grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}




/* ============================================================================
   09. КАРТОЧКА ТОВАРА (product)
   ============================================================================ */

.product {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--r-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all var(--t-med) var(--ease);
}

.product:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--border);
}

/* Изображение / заглушка с инициалом */
.product__media {
    --accent: var(--accent);
    position: relative;
    aspect-ratio: 4 / 3;
    background:
        radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--accent) 18%, var(--surface-2)) 0%, var(--surface-2) 70%);
    overflow: hidden;
}

.product__initial {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-size: 120px;
    font-weight: 400;
    color: var(--accent);
    opacity: 0.32;
    line-height: 1;
    user-select: none;
    transform: translateY(-2%);
    transition: transform var(--t-slow) var(--ease);
}

/* Реальная картинка товара (если загружена через админку) */
.product__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--t-slow) var(--ease);
}

.product:hover .product__img { transform: scale(1.04); }

.product:hover .product__initial {
    transform: translateY(-2%) scale(1.08);
}

.product__weight {
    position: absolute;
    bottom: 12px;
    left: 12px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
}

.product__body {
    padding: 18px 18px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
}

.product__name {
    font-size: 19px;
    font-weight: 600;
    line-height: 1.15;
}

.product__desc {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.5;
    flex: 1;
    /* Обрезаем длинные описания до двух строк */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Карточка — контейнер для container-запросов: цена масштабируется
   по ширине КАРТОЧКИ, а не экрана (важно на мобильной сетке в 2 колонки). */
.product { container-type: inline-size; }

.product__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
    /* если цена длинная и вдвоём с кнопкой не помещаются —
       кнопка уезжает на свою строку, а не сплющивается */
    flex-wrap: wrap;
}

.product__price {
    font-family: var(--font-display);
    font-size: 20px;                     /* запасное значение для старых браузеров */
    font-size: clamp(12px, 6.4cqw, 20px);
    font-weight: 700;
    color: var(--text);
    line-height: 1.15;
    letter-spacing: -0.01em;
    white-space: nowrap;                 /* не разрывать число посередине */
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;                    /* абсурдно длинная цена не вылезет за карточку */
}

.btn-add {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;              /* кнопка не сжимается */
    white-space: nowrap;         /* «В корзину» не рвётся на две строки */
    padding: 9px 14px 9px 16px;
    background: var(--text);
    color: var(--bg);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    transition: all var(--t-fast) var(--ease);
}

.btn-add .icon { width: 14px; height: 14px; }

.btn-add:hover {
    background: var(--accent);
    transform: scale(1.04);
}

.btn-add.is-added {
    background: #2F5D50;
    pointer-events: none;
}




/* ============================================================================
   10. ЗАГОЛОВОК СТРАНИЦЫ КАТЕГОРИИ
   ============================================================================ */

.cat-header {
    --accent: var(--accent);
    padding: 56px 0 40px;
    position: relative;
    overflow: hidden;
}

.cat-header::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, color-mix(in srgb, var(--accent) 18%, transparent) 0%, transparent 60%);
    pointer-events: none;
}

.cat-header__inner {
    position: relative;
}

.cat-header__tag {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 12px;
}

.cat-header__title {
    font-size: clamp(40px, 6vw, 72px);
    margin-bottom: 16px;
}

.cat-header__count {
    color: var(--text-muted);
    font-size: 15px;
}

/* --- Категория с обложкой: фото-баннер с затемнением и белым текстом --- */
.cat-header--has-cover {
    padding: 72px 0 56px;
    min-height: 320px;
    display: flex;
    align-items: flex-end;
}

.cat-header--has-cover::before { display: none; }   /* убираем радиальное пятно */

.cat-header__cover {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

/* Затемняющий градиент поверх фото, чтобы читался текст */
.cat-header__cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(20, 20, 20, 0.25) 0%,
        rgba(20, 20, 20, 0.55) 65%,
        rgba(20, 20, 20, 0.78) 100%
    );
}

/* На обложке весь текст белый */
.cat-header--has-cover .cat-header__inner { color: #fff; }
.cat-header--has-cover .cat-header__title { color: #fff; }
.cat-header--has-cover .cat-header__tag { color: #fff; }
.cat-header--has-cover .cat-header__count { color: rgba(255, 255, 255, 0.85); }
.cat-header--has-cover .breadcrumbs,
.cat-header--has-cover .breadcrumbs a { color: rgba(255, 255, 255, 0.8); }
.cat-header--has-cover .breadcrumbs a:hover { color: #fff; }
.cat-header--has-cover .breadcrumbs span { color: rgba(255, 255, 255, 0.5); }




/* ============================================================================
   11. БЛОК «ДРУГИЕ РАЗДЕЛЫ»
   ============================================================================ */

.other-cats {
    padding: 48px 0 96px;
    border-top: 1px solid var(--border-soft);
    margin-top: 48px;
}

.other-cats__title {
    font-size: 22px;
    margin-bottom: 20px;
    color: var(--text-muted);
    font-weight: 500;
}

.other-cats__list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.other-cats__item {
    --accent: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-weight: 500;
    font-size: 15px;
    transition: all var(--t-fast) var(--ease);
}

.other-cats__item:hover {
    border-color: var(--accent);
    color: var(--text);
    transform: translateY(-2px);
}

.other-cats__dot {
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
}




/* ============================================================================
   12. СТРАНИЦА ТОВАРА
   ============================================================================ */

.product-page { padding: 32px 0 96px; }

.product-page__grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 56px;
    align-items: start;
    margin-top: 24px;
}

.product-page__media {
    --accent: var(--accent);
    position: relative;
    aspect-ratio: 1 / 1;
    background:
        radial-gradient(circle at 35% 35%, color-mix(in srgb, var(--accent) 22%, var(--surface-2)) 0%, var(--surface-2) 75%);
    border-radius: var(--r-xl);
    overflow: hidden;
}

.product-page__initial {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-size: clamp(180px, 28vw, 280px);
    font-weight: 400;
    color: var(--accent);
    opacity: 0.4;
    line-height: 1;
    transform: translateY(-2%);
}

.product-page__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-page__title {
    font-size: clamp(36px, 5vw, 56px);
    margin-bottom: 16px;
}

.product-page__desc {
    font-size: 18px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 32px;
}

.product-page__params {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 36px;
    padding: 20px 0;
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
}

.product-page__params li {
    display: flex;
    justify-content: space-between;
    font-size: 15px;
}

.product-page__params span { color: var(--text-muted); }

.product-page__buy {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.product-page__price {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 700;
}




/* ============================================================================
   13. СТРАНИЦА КОРЗИНЫ
   ============================================================================ */

.cart-page { padding: 32px 0 96px; }

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    margin-top: 40px;
    align-items: start;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Карточка-строка товара в корзине (рендерится из JS) */
.cart-item {
    display: grid;
    grid-template-columns: 96px 1fr auto auto;
    gap: 20px;
    align-items: center;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--r-md);
}

.cart-item__media {
    --accent: var(--accent);
    width: 96px;
    height: 96px;
    border-radius: var(--r-sm);
    background: radial-gradient(circle at 35% 35%, color-mix(in srgb, var(--accent) 22%, var(--surface-2)), var(--surface-2));
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-size: 44px;
    color: var(--accent);
    opacity: 0.95;
    font-weight: 400;
}

.cart-item__title { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.cart-item__price { font-size: 14px; color: var(--text-muted); }

.qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 999px;
    overflow: hidden;
}

.qty button {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    font-size: 16px;
    color: var(--text-muted);
    transition: color var(--t-fast) var(--ease);
}

.qty button:hover { color: var(--accent); }

.qty span {
    min-width: 28px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
}

.cart-item__remove {
    color: var(--text-soft);
    padding: 6px;
    border-radius: 50%;
    transition: all var(--t-fast) var(--ease);
}

.cart-item__remove:hover { color: var(--accent); background: var(--surface-2); }

/* Заглушка пустой корзины */
.cart-empty {
    padding: 80px 24px;
    text-align: center;
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--r-lg);
}

.cart-empty__icon { font-size: 56px; margin-bottom: 16px; }
.cart-empty h2 { font-size: 28px; margin-bottom: 8px; }
.cart-empty p { color: var(--text-muted); margin-bottom: 24px; }

/* Сводка справа */
.cart-summary {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--r-lg);
    padding: 24px;
    position: sticky;
    top: 100px;
}

.cart-summary__title { font-size: 22px; margin-bottom: 20px; }

.cart-summary__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 10px 0;
    font-size: 15px;
    color: var(--text-muted);
}

.cart-summary__row--total {
    border-top: 1px solid var(--border-soft);
    margin-top: 8px;
    padding-top: 18px;
    color: var(--text);
    font-size: 17px;
    font-weight: 600;
}

.cart-summary__row--total span:last-child {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
}

.cart-summary__hint {
    background: var(--surface-2);
    color: var(--text-muted);
    border-radius: var(--r-sm);
    padding: 12px 14px;
    font-size: 13px;
    margin: 12px 0 20px;
    display: none;
}

.cart-summary__hint.is-visible { display: block; }

.cart-summary__note {
    font-size: 12px;
    color: var(--text-soft);
    text-align: center;
    margin-top: 12px;
    line-height: 1.5;
}




/* ============================================================================
   14. ИНФОРМАЦИОННЫЕ СТРАНИЦЫ (доставка, статьи, политика)
   ============================================================================ */

.info-page { padding: 32px 0 96px; }
.info-page__inner--narrow { max-width: 760px; }

/* --- Сетка карточек (доставка) --- */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 8px 0 64px;
}

.info-card {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--r-lg);
    padding: 32px;
    position: relative;
    transition: all var(--t-med) var(--ease);
}

.info-card:hover {
    border-color: var(--border);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.info-card__num {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 12px;
}

.info-card__title { font-size: 24px; margin-bottom: 12px; }

.info-card p { color: var(--text-muted); line-height: 1.6; }

/* --- Зоны доставки --- */
.info-zones {
    background: var(--surface);
    border-radius: var(--r-lg);
    padding: 40px;
    border: 1px solid var(--border-soft);
}

.info-zones__title { font-size: 28px; margin-bottom: 16px; }
.info-zones p { color: var(--text-muted); margin-bottom: 24px; }
.info-zones__list { display: flex; flex-direction: column; gap: 12px; }
.info-zones__list li {
    padding: 16px 20px;
    background: var(--surface-2);
    border-radius: var(--r-md);
    font-size: 15px;
}
.info-zones__list strong { display: block; margin-bottom: 4px; color: var(--text); }

/* --- Сетка статей --- */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.article-card {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--r-lg);
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all var(--t-med) var(--ease);
}

.article-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--border);
}

.article-card__date { font-size: 12px; color: var(--text-soft); letter-spacing: 0.04em; text-transform: uppercase; }
.article-card__title { font-size: 22px; line-height: 1.2; }
.article-card p { color: var(--text-muted); font-size: 14.5px; line-height: 1.6; flex: 1; }
.article-card__link {
    font-weight: 600;
    color: var(--accent);
    font-size: 14px;
    margin-top: 8px;
}

/* --- Длинный текст (политика и т. п.) --- */
.prose { color: var(--text-muted); line-height: 1.7; }
.prose h2 { font-size: 24px; margin: 32px 0 12px; color: var(--text); }
.prose p { margin-bottom: 14px; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose__note {
    background: var(--surface-2);
    border-left: 3px solid var(--accent);
    padding: 16px 20px;
    border-radius: var(--r-sm);
    font-size: 14px;
    margin-top: 32px;
}




/* ============================================================================
   15. ПОДВАЛ (footer)
   ============================================================================ */

.footer {
    background: var(--text);
    color: #C9C0B5;
    margin-top: 64px;
    padding-top: 64px;
}

.footer__inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 48px;
    padding-bottom: 48px;
}

.logo--footer .logo__text { color: #fff; }
.logo--footer { margin-bottom: 16px; }

.footer__tagline {
    color: #9C9388;
    font-size: 14px;
    margin-bottom: 20px;
    max-width: 280px;
}

.footer__phone {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
}

.footer__hours { font-size: 13px; color: #9C9388; }

.footer__title {
    color: #fff;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 18px;
}

.footer__list { display: flex; flex-direction: column; gap: 10px; font-size: 14.5px; }
.footer__list a { color: #C9C0B5; }
.footer__list a:hover { color: var(--accent); }
.footer__list--addresses li { color: #C9C0B5; }

.footer__social { display: flex; gap: 10px; margin-top: 20px; }
.footer__social a {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    transition: all var(--t-fast) var(--ease);
}
.footer__social a:hover { background: var(--accent); }

.footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 22px 0;
}

.footer__bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12.5px;
    color: #8A8278;
    gap: 16px;
    flex-wrap: wrap;
}

.footer__bottom a:hover { color: #fff; }




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

/* --- Большие планшеты / мелкие десктопы --- */
@media (max-width: 1100px) {
    .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .footer__inner { grid-template-columns: 1fr 1fr; gap: 36px; }
    .nav__link { padding: 9px 11px; font-size: 13.5px; }
}

/* --- Планшеты --- */
@media (max-width: 900px) {
    .hero__inner {
        grid-template-columns: 1fr;
        min-height: 0;
    }
    .hero__art {
        max-width: 360px;
        margin: 0 auto;
        order: -1;
    }
    .hero { padding: 40px 0 56px; }

    .product-page__grid { grid-template-columns: 1fr; gap: 32px; }

    .cart-layout { grid-template-columns: 1fr; }
    .cart-summary { position: static; }

    .info-grid { grid-template-columns: 1fr; }
    .articles-grid { grid-template-columns: 1fr 1fr; }

    .nav { display: none; }   /* категории в шапке прячем — есть catnav ниже */
    .topbar__group:first-child { display: none; }
}

/* --- Мобильники --- */
@media (max-width: 640px) {
    :root { --pad: 16px; }

    .topbar { font-size: 12px; }
    .topbar__group { gap: 14px; }
    .topbar__link { display: none; }

    .header__inner { height: 64px; gap: 12px; }
    .logo__text { font-size: 17px; }
    .logo__mark { width: 38px; height: 38px; font-size: 18px; }

    .cart-btn__label { display: none; }
    .cart-btn { padding: 10px 12px; }

    html { scroll-padding-top: 130px; }

    .hero { padding: 28px 0 40px; }
    .hero__title { font-size: clamp(38px, 11vw, 56px); }
    .hero__lead { font-size: 16px; }
    .hero__meta { gap: 24px; }
    .hero__meta strong { font-size: 20px; }
    .hero__actions .btn { padding: 12px 20px; font-size: 14px; }

    .catnav { top: 64px; padding: 10px 0; }
    .catnav__pill { padding: 8px 14px 8px 12px; font-size: 13px; }

    .cat-section { padding: 48px 0; }
    .cat-section__head { flex-direction: column; align-items: flex-start; }
    .cat-section__more { align-self: flex-start; }

    .grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .product__body { padding: 14px 14px 16px; }
    .product__name { font-size: 16px; }
    .product__desc { font-size: 12.5px; }
    .product__price { font-size: 17px; }
    .product__initial { font-size: 80px; }
    .btn-add span { display: none; }
    .btn-add { padding: 8px; width: 36px; height: 36px; justify-content: center; }
    .btn-add .icon { width: 16px; height: 16px; }

    .articles-grid { grid-template-columns: 1fr; }
    .info-zones { padding: 24px; }

    .footer__inner { grid-template-columns: 1fr; gap: 32px; padding-bottom: 36px; }
    .footer { padding-top: 48px; }

    .cart-item {
        grid-template-columns: 72px 1fr;
        grid-template-rows: auto auto;
        gap: 12px 16px;
    }
    .cart-item__media { width: 72px; height: 72px; font-size: 32px; }
    .cart-item .qty,
    .cart-item__remove { grid-column: 2; justify-self: start; }
}




/* ============================================================================
   17. АДМИН-ПАНЕЛЬ
   ----------------------------------------------------------------------------
   Все классы здесь начинаются с admin- или auth- — изолированы от публичных.
   Можно безопасно править: на витрину сайта не повлияет.
   ============================================================================ */

/* --- Общий фон админки --- */
.admin-body {
    background: var(--surface-2);
    min-height: 100vh;
}

/* ========== Логин ========== */

.admin-body--auth {
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--r-lg);
    padding: 40px 36px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-card__logo {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    font-family: var(--font-display);
    font-size: 28px;
    line-height: 1;
    margin-bottom: 4px;
}

/* Логотип-картинка на странице логина */
.auth-card__logo-img {
    width: auto;
    height: 130px;
    display: block;
    margin: 0 auto 8px;
}

.auth-card__title { text-align: center; }
.auth-card__sub { text-align: center; }

.auth-card__title { font-size: 28px; }

.auth-card__sub {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 8px;
}

.auth-card__error {
    background: #FDECEE;
    border: 1px solid #F5C4CB;
    color: #8B1A2A;
    padding: 12px 14px;
    border-radius: var(--r-sm);
    font-size: 14px;
}

.auth-card__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-card__field span {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.auth-card__field input {
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--r-sm);
    font-family: var(--font-body);
    font-size: 15px;
    background: var(--surface);
    transition: border-color var(--t-fast) var(--ease);
}

.auth-card__field input:focus {
    outline: none;
    border-color: var(--accent);
}

.auth-card__back {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 8px;
}

/* ========== Шапка админки ========== */

.admin-header {
    background: var(--text);
    color: #C9C0B5;
    position: sticky;
    top: 0;
    z-index: 50;
}

.admin-header__inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 14px var(--pad);
    display: flex;
    align-items: center;
    gap: 32px;
}

.admin-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}

.admin-logo:hover { color: #fff; }

/* Логотип-картинка в шапке админки. Шапка тёмная, у логотипа белый фон —
   кладём на белую подложку со скруглением. */
.admin-logo__img {
    height: 40px;
    width: auto;
    display: block;
    background: #fff;
    border-radius: var(--r-sm);
    padding: 4px 8px;
}

.admin-logo__mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    background: var(--accent);
    border-radius: 50%;
    font-family: var(--font-display);
    font-size: 16px;
    line-height: 1;
}

.admin-logo__text {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.02em;
}

.admin-logo__text em {
    font-style: normal;
    font-weight: 400;
    color: #8A8278;
    margin-left: 4px;
}

.admin-header__nav {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

.admin-header__link {
    color: #C9C0B5;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 999px;
    transition: all var(--t-fast) var(--ease);
}

.admin-header__link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.admin-header__link--ext { color: #8A8278; }

.admin-header__user {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
}

.admin-header__username {
    color: #fff;
    font-weight: 600;
}

.admin-header__logout {
    color: #8A8278;
    font-size: 13px;
}

.admin-header__logout:hover { color: #fff; }

/* ========== Контент админки ========== */

.admin-main { padding: 40px 0 80px; }

.admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.admin-h1 {
    font-size: 36px;
    line-height: 1;
    margin: 0;
}

.admin-h1__sub {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 8px;
}

.admin-back {
    display: inline-block;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 12px;
}

.admin-back:hover { color: var(--accent); }

/* ========== Секция с одной категорией товаров ========== */

.admin-section {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--r-lg);
    padding: 24px;
    margin-bottom: 20px;
}

.admin-section__title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 18px;
}

.admin-section__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.admin-section__count {
    background: var(--surface-2);
    color: var(--text-muted);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 13px;
    padding: 3px 10px;
    border-radius: 999px;
    margin-left: 4px;
}

.admin-empty {
    color: var(--text-muted);
    padding: 16px 0 4px;
    font-size: 14px;
}

.admin-empty a {
    color: var(--accent);
    margin-left: 6px;
    font-weight: 600;
}

/* ========== Таблица товаров ========== */

.admin-table-wrap { overflow-x: auto; }

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.admin-table th {
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-soft);
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-soft);
}

.admin-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-soft);
    vertical-align: middle;
}

.admin-table tr:last-child td { border-bottom: none; }

.admin-table tr:hover td { background: var(--surface-2); }

.admin-table__col-thumb { width: 64px; }
.admin-table__col-num   { width: 90px; text-align: right; white-space: nowrap; }
.admin-table__col-actions { width: 100px; text-align: right; }

.admin-table__desc {
    color: var(--text-muted);
    max-width: 420px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Превью товара в таблице */
.admin-thumb {
    width: 48px;
    height: 48px;
    border-radius: var(--r-sm);
    object-fit: cover;
}

.admin-thumb--empty {
    --accent: var(--accent);
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--accent) 18%, var(--surface-2));
    color: var(--accent);
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 400;
}

/* Маленькие кнопки действий */
.btn-sm {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    background: var(--surface-2);
    color: var(--text);
    border-radius: var(--r-sm);
    font-size: 14px;
    margin-left: 4px;
    transition: all var(--t-fast) var(--ease);
}

.btn-sm:hover { background: var(--text); color: var(--bg); }

.btn-sm--danger:hover { background: var(--accent); color: #fff; }

.inline-form { display: inline; }

/* ========== Форма редактирования ========== */

.admin-form {
    max-width: 720px;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--r-lg);
    padding: 36px;
}

.admin-form__row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.admin-form__row label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.02em;
}

.admin-form__row small {
    font-size: 12.5px;
    color: var(--text-soft);
    line-height: 1.5;
}

.admin-form__row input[type="text"],
.admin-form__row input[type="number"],
.admin-form__row textarea,
.admin-form__row select {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--r-sm);
    font-family: var(--font-body);
    font-size: 15px;
    background: var(--surface);
    color: var(--text);
    transition: border-color var(--t-fast) var(--ease);
}

.admin-form__row input:focus,
.admin-form__row textarea:focus,
.admin-form__row select:focus {
    outline: none;
    border-color: var(--accent);
}

.admin-form__row textarea {
    resize: vertical;
    min-height: 80px;
    font-family: var(--font-body);
}

.admin-form__row input[type="file"] {
    font-size: 14px;
    padding: 10px;
    border: 1.5px dashed var(--border);
    border-radius: var(--r-sm);
    background: var(--surface-2);
}

.admin-form__split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.admin-form__split .admin-form__row { margin-bottom: 24px; }

.admin-form__current-img {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    background: var(--surface-2);
    border-radius: var(--r-sm);
    margin-bottom: 8px;
}

.admin-form__current-img img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--r-sm);
}

.admin-form__checkbox {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--text-muted) !important;
}

.admin-form__checkbox input { accent-color: var(--accent); }

.admin-form__actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-soft);
}

/* ========== Панель категорий на дашборде ========== */

.admin-cats-panel {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--r-lg);
    padding: 24px;
    margin-bottom: 28px;
}

.admin-cats-panel__title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.admin-cats-panel__hint {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 18px;
}

.admin-cats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.admin-cat-card {
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
    transition: all var(--t-fast) var(--ease);
    background: var(--surface);
}

.admin-cat-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    color: var(--text);
}

.admin-cat-card__cover {
    --accent: var(--accent);
    aspect-ratio: 16 / 7;
    background: color-mix(in srgb, var(--accent) 14%, var(--surface-2));
    position: relative;
    overflow: hidden;
}

.admin-cat-card__cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-cat-card__noimg {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 12px;
    color: var(--text-soft);
    letter-spacing: 0.02em;
}

.admin-cat-card__body {
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.admin-cat-card__name {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
}

.admin-cat-card__edit {
    font-size: 12.5px;
    color: var(--text-soft);
    white-space: nowrap;
}

.admin-cat-card:hover .admin-cat-card__edit { color: var(--accent); }

/* Ссылка «изменить категорию» в заголовке секции товаров */
.admin-section__edit {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 12.5px;
    color: var(--text-soft);
    margin-left: auto;
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    transition: all var(--t-fast) var(--ease);
}

.admin-section__edit:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* Делаем заголовок секции flex, чтобы ссылка ушла вправо */
.admin-section__title { width: 100%; }

/* ========== Выбор цвета (color picker) в форме категории ========== */

.admin-form__color {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-form__color input[type="color"] {
    width: 56px;
    height: 40px;
    padding: 2px;
    border: 1.5px solid var(--border);
    border-radius: var(--r-sm);
    background: var(--surface);
    cursor: pointer;
}

.admin-form__color-val {
    font-family: var(--font-display);
    font-size: 14px;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

/* --- Адаптив для админки --- */
@media (max-width: 700px) {
    .admin-header__inner { gap: 12px; flex-wrap: wrap; }
    .admin-header__nav { order: 3; width: 100%; }
    .admin-header__link { padding: 6px 10px; }
    .admin-form { padding: 24px 20px; }
    .admin-form__split { grid-template-columns: 1fr; gap: 0; }
    .admin-table__col-desc, .admin-table__desc { display: none; }
    .admin-h1 { font-size: 26px; }
    .admin-cats-grid { grid-template-columns: 1fr 1fr; }
    .admin-section__edit { margin-left: 0; }
}




/* ============================================================================
   18. ШРИФТ СЛОГАНА — Artifakt Element (Hair)
   ----------------------------------------------------------------------------
   Artifakt Element — платный шрифт, файлы в комплект не входят.
   Чтобы слоган на главной отображался именно им:
     1) положи файлы в /var/www/sakura-sushi/static/fonts/
        ArtifaktElement-Hair.ttf
     2) больше ничего делать не нужно — правило ниже подхватит их само.
   Пока файлов нет, слоган рендерится запасным Inter Thin (тоже тонкий).
   ============================================================================ */

@font-face {
    font-family: 'Artifakt Element';
    src: url('/static/fonts/ArtifaktElement-Hair.ttf') format('truetype');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}




/* ============================================================================
   19. НАВИГАЦИЯ С ГРУППАМИ (выпадающее меню «Роллы»)
   ============================================================================ */

.nav__group {
    position: relative;
}

.nav__link--group {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-family: var(--font-body);
}

.nav__chev {
    width: 14px;
    height: 14px;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform var(--t-fast) var(--ease);
}

.nav__group:hover .nav__chev,
.nav__group:focus-within .nav__chev { transform: rotate(180deg); }

.nav__dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    min-width: 210px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-md);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    opacity: 0;
    visibility: hidden;
    transition: all var(--t-med) var(--ease);
    z-index: 60;
}

/* Невидимый мостик, чтобы курсор не «проваливался» между кнопкой и списком */
.nav__dropdown::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
}

.nav__group:hover .nav__dropdown,
.nav__group:focus-within .nav__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav__dropdown-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--r-sm);
    font-size: 14.5px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    transition: background var(--t-fast) var(--ease);
}

.nav__dropdown-link:hover {
    background: var(--surface-2);
    color: var(--text);
}

.nav__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Ссылка «Меню» — только на мобильных, вместо полной навигации */
.nav-mobile-link {
    display: none;
    padding: 9px 16px;
    border: 1.5px solid var(--border);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-left: auto;
    margin-right: 12px;
}

.nav-mobile-link:hover { border-color: var(--text); color: var(--text); }




/* ============================================================================
   20. СТРАНИЦА «МЕНЮ» — плитки разделов
   ============================================================================ */

.menu-page { padding: 32px 0 96px; }

.menu-group { margin-bottom: 56px; }

.menu-group__title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: clamp(26px, 3.4vw, 38px);
    margin-bottom: 24px;
}

.menu-group__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
}

.menu-tile {
    --accent: var(--accent);
    display: block;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--r-lg);
    overflow: hidden;
    transition: all var(--t-med) var(--ease);
}

.menu-tile:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--border);
    color: var(--text);
}

.menu-tile__media {
    aspect-ratio: 16 / 9;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 35% 30%,
            color-mix(in srgb, var(--accent) 22%, var(--surface-2)) 0%,
            var(--surface-2) 75%);
}

.menu-tile__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--t-slow) var(--ease);
}

.menu-tile:hover .menu-tile__media img { transform: scale(1.05); }

.menu-tile__body {
    padding: 16px 18px 18px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.menu-tile__name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 18px;
    line-height: 1.15;
}

.menu-tile__count {
    font-size: 12.5px;
    color: var(--text-soft);
    white-space: nowrap;
}




/* ============================================================================
   21. АДАПТИВНОСТЬ ДЛЯ НОВЫХ БЛОКОВ
   ============================================================================ */

@media (max-width: 900px) {
    /* Полную навигацию прячем (правило есть в секции 16),
       вместо неё показываем ссылку «Меню» */
    .nav-mobile-link { display: inline-block; }

    .hero__inner {
        grid-template-columns: 1fr;
        gap: 28px;
        min-height: 0;
        text-align: center;
    }
    .hero__art { order: -1; max-width: 420px; margin: 0 auto; }
    .hero__title { align-items: center; }
    .hero__actions { justify-content: center; }
}

@media (max-width: 640px) {
    .hero { padding: 24px 0 56px; }
    .hero__art { max-width: 300px; }
    .hero__title { font-size: clamp(34px, 11vw, 52px); margin-bottom: 28px; }
    .menu-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .menu-tile__body { padding: 12px 14px 14px; flex-direction: column; align-items: flex-start; gap: 4px; }
    .menu-tile__name { font-size: 15px; }
    .menu-group { margin-bottom: 40px; }
}




/* ============================================================================
   22. ПОЛОСА ПРОКРУТКИ
   ----------------------------------------------------------------------------
   Тонкая, скруглённая, без фона дорожки. Прозрачная рамка вокруг ползунка
   даёт отступ от края и работает на любом фоне (белом и сером в админке).
   ============================================================================ */

/* Firefox */
html {
    scrollbar-width: thin;
    scrollbar-color: #CBD0D8 transparent;
}

/* Chrome, Edge, Safari */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: #CBD0D8;
    border-radius: 999px;
    border: 3px solid transparent;   /* отступ от краёв — полоска выглядит тонкой */
    background-clip: padding-box;
    transition: background-color var(--t-fast) var(--ease);
}

::-webkit-scrollbar-thumb:hover {
    background-color: #A7AEB9;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:active {
    background-color: #8B929D;
    background-clip: padding-box;
}

::-webkit-scrollbar-corner {
    background: transparent;
}
