/* =====================================================================
 * Royera marketplace — современная тёмная тема (новый редизайн).
 *
 * Файл подключается ПОСЛЕ /assets/css/style.css в layouts/main.php
 * и переопределяет визуал публичной витрины (главная, категории,
 * карточка товара, шапка/подвал). Кабинет/админка сохраняют свои
 * локальные стили — большинство классов здесь не пересекаются.
 *
 * Цветовая схема: глубокий серый фон, голубой акцент #4d7cff.
 * Сетка: max-width контейнера 1200px, скруглённые карточки 14px.
 * ===================================================================== */

:root {
    --bg:           #181818;
    --bg-2:         #1f1f1f;
    --bg-3:         #262626;
    --surface:      #2a2a2a;
    --surface-2:    #323232;
    --border:       #3a3a3a;
    --text:         #f1f1f1;
    --muted:        #9a9a9a;
    --primary:      #4d7cff;
    --primary-hov:  #5e8aff;
    --accent-red:   #ff4d4d;
    --accent-green: #36c46c;
    --radius:       14px;
    --radius-sm:    10px;
    --shadow-card:  0 6px 22px rgba(0, 0, 0, .35);
    --container:    1200px;
}

/* ---------- Базовые сбросы ---------- */
html, body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.55;
}
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--primary-hov); }
hr { border: none; border-top: 1px solid var(--border); }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

.muted { color: var(--muted); }

/* ---------- Кнопки ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: var(--surface-2);
    color: var(--text);
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { background: var(--surface); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hov); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 13px 26px; font-size: 15px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Шапка ---------- */
.site-header {
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 50;
}
.site-header .header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 24px;
}
.site-header .logo {
    display: flex;
    align-items: center;
    gap: 0;
    font-weight: 800;
    letter-spacing: .12em;
    font-size: 18px;
    color: #fff;
}
.site-header .logo .logo-mark { display: none; }
.site-header .logo .logo-text { color: #fff; }

/* Свиперные пилюли категорий в шапке */
.top-cats {
    position: relative;
    overflow: hidden;
}
.top-cats-track {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 0 4px;
}
.top-cats-track::-webkit-scrollbar { display: none; }
.top-cats a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 13px;
    color: var(--muted);
    white-space: nowrap;
    transition: background .15s ease, color .15s ease;
}
.top-cats a:hover,
.top-cats a.is-active {
    background: var(--surface-2);
    color: var(--text);
}
.top-cats-icon { font-size: 14px; opacity: .85; }

/* Правый блок (поиск + профиль) */
.header-tools {
    display: flex;
    align-items: center;
    gap: 10px;
}
.header-search {
    position: relative;
    width: 280px;
    max-width: 30vw;
}
.header-search input {
    width: 100%;
    padding: 9px 36px 9px 38px;
    background: var(--surface-2);
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--text);
    font-size: 13px;
    outline: none;
    transition: border-color .15s ease, background .15s ease;
}
.header-search input::placeholder { color: var(--muted); }
.header-search input:focus { border-color: var(--primary); background: var(--surface); }
.header-search-icon,
.header-search-mic {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
    font-size: 14px;
}
.header-search-icon { left: 14px; }
.header-search-mic  { right: 14px; pointer-events: auto; cursor: pointer; }

/* Селекты языка/валюты — превращаем в незаметные пилюли */
.site-header .select-lang,
.site-header .select-cur {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    font-size: 12px;
    padding: 6px 10px;
    cursor: pointer;
}
.site-header .select-lang:hover,
.site-header .select-cur:hover { color: var(--text); }

/* Профиль / гость */
.user-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px 6px 6px;
    background: var(--surface-2);
    border-radius: 999px;
    cursor: pointer;
    border: none;
    color: var(--text);
}
.user-pill:hover { background: var(--surface); }
.user-pill .user-avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--primary); color: #fff; font-weight: 600; font-size: 13px;
}
.user-pill .user-caret { color: var(--muted); font-size: 10px; }
.user-menu-drop {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-card);
    padding: 6px;
    margin-top: 8px;
    min-width: 200px;
}
.user-menu-drop a,
.user-menu-drop button {
    display: block; width: 100%;
    padding: 8px 12px; border-radius: 8px;
    font-size: 13px; color: var(--text);
    background: transparent; border: none; text-align: left; cursor: pointer;
}
.user-menu-drop a:hover,
.user-menu-drop button:hover { background: var(--surface-2); }
.user-menu-logout { padding: 0; margin: 0; }

/* ---------- Hero ---------- */
.hero {
    margin: 30px 0 50px;
    background:
        radial-gradient(1200px 300px at 70% -20%, rgba(77,124,255,.18), transparent 60%),
        var(--bg-2);
    border-radius: var(--radius);
    padding: 56px 48px;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.hero h1 {
    font-size: 36px;
    line-height: 1.15;
    margin: 0 0 16px;
    font-weight: 700;
    letter-spacing: -.01em;
}
.hero p { color: var(--muted); font-size: 14px; max-width: 540px; }
.hero-art {
    display: flex;
    justify-content: flex-end;
}
.hero-art img { max-width: 100%; height: auto; }

/* ---------- Секция-строка (карусель карточек) ---------- */
.row-section { margin: 0 0 56px; }
.row-section-head {
    display: flex; align-items: baseline; justify-content: space-between;
    margin-bottom: 22px;
}
.row-section-head h2 {
    font-size: 22px;
    margin: 0;
    font-weight: 600;
    letter-spacing: -.01em;
}
.row-section-head a {
    color: var(--primary);
    font-size: 13px;
}
.row-section-head a:hover { color: var(--primary-hov); }

.row-section-track {
    position: relative;
}
.row-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 32px) / 3);
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding: 4px 0 12px;
}
.row-track::-webkit-scrollbar { display: none; }
.row-track > * { scroll-snap-align: start; }

.row-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: background .15s ease;
}
.row-arrow:hover { background: var(--surface); }
.row-arrow.is-prev { left: -10px; }
.row-arrow.is-next { right: -10px; }
.row-arrow[disabled] { opacity: 0; pointer-events: none; }

/* ---------- Карточка товара ---------- */
.card {
    background: var(--bg-2);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .2s ease, box-shadow .2s ease;
    border: 1px solid transparent;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card);
    border-color: var(--border);
}
.card-img {
    display: block;
    aspect-ratio: 16 / 11;
    background: var(--surface-2);
    position: relative;
    overflow: hidden;
}
.card-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.card-badge {
    position: absolute;
    top: 12px; left: 12px;
    background: var(--accent-red);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.card-body {
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.card-cat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 11px;
    text-transform: lowercase;
}
.card-cat::after {
    content: '';
    margin-left: auto;
    color: var(--muted);
}
.card-title {
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
}
.card-title:hover { color: var(--primary-hov); }
.card-prices {
    display: flex; align-items: baseline; gap: 10px;
    margin-top: 4px;
}
.card-price {
    font-size: 18px; font-weight: 600; color: var(--text);
}
.card-price-old {
    font-size: 13px;
    color: var(--muted);
    text-decoration: line-through;
}
/* Скрываем старые элементы карточки, которых нет в новом дизайне */
.card-seller, .card-meta, .card-bottom .btn { display: none; }

/* ---------- Сетки ---------- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}
.main-grid { display: block; padding: 0 24px; max-width: var(--container); margin: 0 auto; }

/* Восстанавливаем 2-колоночную сетку для кабинета и админки. */
.main-grid:has(> .cabinet-sidebar),
.main-grid:has(> .admin-sidebar) {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    padding-top: 24px;
    padding-bottom: 40px;
}
@media (max-width: 900px) {
    .main-grid:has(> .cabinet-sidebar),
    .main-grid:has(> .admin-sidebar) { grid-template-columns: 1fr; }
}

/* ---------- Сайдбар категорий (старый — скрываем на главной/категории) ---------- */
.main-grid > .sidebar:not(.cabinet-sidebar):not(.admin-sidebar) { display: none; }

/* ---------- Статьи ---------- */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}
.article-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 16 / 8;
    display: block;
    background: var(--surface-2);
}
.article-card img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}
.article-card:hover img { transform: scale(1.04); }
.article-card-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,.85) 100%);
}
.article-card-meta {
    position: absolute;
    top: 16px; left: 16px;
    color: #fff;
    background: rgba(0,0,0,.5);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
}
.article-card-title {
    position: absolute;
    left: 20px; right: 20px; bottom: 18px;
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
}

/* ---------- FAQ ---------- */
.faq { margin: 60px 0; }
.faq h2 {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 22px;
}
.faq-item {
    background: var(--bg-2);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    overflow: hidden;
}
.faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 14px 22px;
    font-size: 14px;
    color: var(--text);
    display: flex; align-items: center; justify-content: space-between;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '+';
    color: var(--muted);
    font-size: 18px;
    line-height: 1;
    margin-left: 16px;
    transition: transform .15s ease;
}
.faq-item[open] summary::after { content: '−'; }
.faq-item-body {
    padding: 0 22px 18px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

/* ---------- Хлебные крошки ---------- */
.breadcrumbs {
    display: flex; align-items: center; gap: 8px;
    color: var(--muted);
    font-size: 12px;
    margin: 18px 0 22px;
}
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs .sep { color: var(--border); }

/* ---------- Карточка товара (страница) ---------- */
.product-page { padding-bottom: 60px; }
.product-page h1 {
    font-size: 28px;
    margin: 0 0 22px;
    font-weight: 700;
}
.product-grid-single {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 32px;
    align-items: start;
}
.product-media {
    background: var(--bg-2);
    border-radius: var(--radius);
    overflow: hidden;
    padding: 0;
}
.product-media img {
    width: 100%; height: auto; display: block;
    border-radius: var(--radius);
}
.product-gallery-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}
.product-gallery-thumbs img {
    width: 88px; height: 88px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    opacity: .7;
    transition: opacity .15s ease;
}
.product-gallery-thumbs img:hover,
.product-gallery-thumbs img.is-active { opacity: 1; outline: 2px solid var(--primary); }

.product-tabs {
    display: flex;
    gap: 8px;
    margin: 24px 0 16px;
}
.product-tabs button {
    padding: 8px 18px;
    border-radius: 999px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 13px;
    cursor: pointer;
}
.product-tabs button.is-active {
    background: var(--primary); color: #fff; border-color: transparent;
}

.product-info { /* старая сетка теперь только описание */
    padding-top: 4px;
}
.product-description-text {
    color: var(--text);
    font-size: 14px;
    line-height: 1.65;
}
.product-description-text p { margin: 0 0 14px; }

/* Правый сайдбар */
.product-aside {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: sticky;
    top: 90px;
}
.product-aside-card {
    background: var(--bg-2);
    border-radius: var(--radius);
    padding: 18px 20px;
}
.product-aside-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 20px;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 14px;
}
.product-aside-meta strong {
    display: block;
    color: var(--text);
    font-weight: 500;
    font-size: 13px;
    margin-top: 2px;
}
.product-aside-price {
    display: flex; align-items: baseline; gap: 12px;
    margin: 0 0 14px;
}
.product-aside-price .product-price {
    font-size: 28px; font-weight: 700; color: var(--text);
}
.product-aside-price-old {
    font-size: 14px;
    color: var(--muted);
    text-decoration: line-through;
}
.product-aside-buttons {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    margin-bottom: 12px;
}
.product-aside-buttons .btn-primary { width: 100%; }
.product-aside-note {
    font-size: 11px;
    color: var(--muted);
    line-height: 1.45;
}

.product-aside-share-head {
    display: flex; align-items: center; justify-content: space-between;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 10px;
}
.product-aside-share-row {
    display: flex; gap: 8px; flex-wrap: wrap;
}
.share-btn {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--surface-2);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px;
    color: var(--text);
}
.share-btn:hover { background: var(--surface); color: var(--primary); }

.product-aside-stat {
    display: flex; gap: 18px;
    color: var(--muted);
    font-size: 12px;
}
.product-aside-stat strong { color: var(--text); font-weight: 500; }

.product-aside-related h3 {
    font-size: 16px;
    margin: 0 0 12px;
    font-weight: 600;
}
.product-aside-related-item {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-top: 1px solid var(--border);
}
.product-aside-related-item:first-of-type { border-top: none; }
.product-aside-related-item img {
    width: 96px; height: 64px; object-fit: cover; border-radius: 8px;
}
.product-aside-related-item .meta {
    font-size: 11px; color: var(--muted);
}
.product-aside-related-item .ttl {
    font-size: 12px; color: var(--text);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* старые элементы карточки, которые мы заменили */
.product-page .product-meta,
.product-page .product-buy,
.product-page .product-description h3 { display: none; }
.product-page .product-description { padding-top: 0; }

/* ---------- Подвал ---------- */
.site-footer {
    background: var(--bg-2);
    margin-top: 60px;
    padding: 30px 0 24px;
    border-top: 1px solid var(--border);
}
.site-footer .footer-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 32px;
}
.site-footer .footer-col { display: contents; } /* отменяем 4-колоночную раскладку */
.site-footer h4 { display: none; }
.site-footer .footer-col a { display: inline-block; margin-right: 18px; color: var(--muted); font-size: 13px; }
.site-footer .footer-col a:hover { color: var(--text); }
.site-footer .footer-col p { display: none; }

.footer-brand {
    display: flex; flex-direction: column; gap: 4px;
}
.footer-brand .ttl { font-weight: 700; letter-spacing: .1em; font-size: 16px; color: #fff; }
.footer-brand .copy { color: var(--muted); font-size: 11px; }

.footer-nav {
    display: flex; gap: 28px;
    justify-content: center;
}
.footer-nav a { color: var(--muted); font-size: 13px; }
.footer-nav a:hover { color: var(--text); }

/* =====================================================================
 * Сетка категорий на главной (под hero).
 * ===================================================================== */
.cats-section { margin: 28px 0 12px; }
.cats-section-block {
    margin-top: 18px;
}
.cats-section-block:first-of-type { margin-top: 8px; }
.cats-section-title {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 6px 14px 6px 6px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    margin-bottom: 12px;
}
.cats-section-title:hover { border-color: var(--primary); color: var(--primary); }
.cats-section-title .cat-tile-icon {
    width: 30px; height: 30px;
    font-size: 14px;
    background: var(--surface);
}
.cats-section-block .cats-grid { margin-bottom: 4px; }
.cats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}
.cat-tile {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    text-decoration: none;
    transition: border-color .15s, transform .15s, background .15s;
}
.cat-tile:hover {
    border-color: var(--primary);
    background: var(--surface-2);
    transform: translateY(-2px);
}
.cat-tile-icon {
    width: 38px; height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--bg-3);
    border-radius: 10px;
    font-size: 18px;
    flex: 0 0 auto;
}
.cat-tile-name { flex: 1; font-weight: 500; font-size: 14px; }
.cat-tile-count {
    color: var(--muted);
    font-size: 12px;
    background: var(--bg-3);
    padding: 2px 8px;
    border-radius: 999px;
}

/* =====================================================================
 * Тёмная тема для админских страниц (:is(.admin-main, .cabinet-main)).
 * Переопределяет светлые .cabinet-card / .seller-table только в админке.
 * ===================================================================== */
:is(.admin-main, .cabinet-main) { color: var(--text); }
:is(.admin-main, .cabinet-main) .cabinet-title { color: var(--text); }

:is(.admin-main, .cabinet-main) .cabinet-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    box-shadow: none;
}

:is(.admin-main, .cabinet-main) .admin-finance-stat-label { color: var(--muted); }
:is(.admin-main, .cabinet-main) .admin-finance-stat-value { color: var(--text); }

:is(.admin-main, .cabinet-main) .admin-filters,
:is(.admin-main, .cabinet-main) .admin-filters input,
:is(.admin-main, .cabinet-main) .admin-filters select {
    color: var(--text);
}
:is(.admin-main, .cabinet-main) .admin-filters input,
:is(.admin-main, .cabinet-main) .admin-filters select {
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 8px 14px;
    height: 36px;
}
:is(.admin-main, .cabinet-main) .admin-filters input::placeholder { color: var(--muted); }
:is(.admin-main, .cabinet-main) .admin-filters .btn {
    background: var(--bg-3);
    color: var(--text);
    border: 1px solid var(--border);
}
:is(.admin-main, .cabinet-main) .admin-filters .btn:hover { background: var(--surface-2); }

:is(.admin-main, .cabinet-main) .seller-table {
    width: 100%;
    background: transparent;
    color: var(--text);
    border-collapse: collapse;
}
:is(.admin-main, .cabinet-main) .seller-table th,
:is(.admin-main, .cabinet-main) .seller-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    text-align: left;
}
:is(.admin-main, .cabinet-main) .seller-table th {
    background: var(--bg-3);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}
:is(.admin-main, .cabinet-main) .seller-table tbody tr:hover td { background: var(--bg-3); }
:is(.admin-main, .cabinet-main) .seller-table .t-right { text-align: right; }

:is(.admin-main, .cabinet-main) .form-hint { color: var(--muted); }

:is(.admin-main, .cabinet-main) .admin-reviews-tabs,
:is(.admin-main, .cabinet-main) .admin-finance-tabs {
    display: flex; gap: 10px; flex-wrap: wrap;
    margin-bottom: 16px;
}
:is(.admin-main, .cabinet-main) .admin-reviews-tabs a,
:is(.admin-main, .cabinet-main) .admin-finance-tabs a {
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--bg-3);
    color: var(--text);
    border: 1px solid var(--border);
    text-decoration: none;
    font-size: 14px;
    transition: background .15s, color .15s;
}
:is(.admin-main, .cabinet-main) .admin-reviews-tabs a.is-active,
:is(.admin-main, .cabinet-main) .admin-finance-tabs a.is-active,
:is(.admin-main, .cabinet-main) .admin-reviews-tabs a:hover,
:is(.admin-main, .cabinet-main) .admin-finance-tabs a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

:is(.admin-main, .cabinet-main) .pagination .page {
    background: var(--bg-3);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 13px;
}
:is(.admin-main, .cabinet-main) .pagination .page.is-active,
:is(.admin-main, .cabinet-main) .pagination .page:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Бейджи типов транзакций / статусов платежей */
:is(.admin-main, .cabinet-main) .tx-badge,
:is(.admin-main, .cabinet-main) .pay-badge {
    background: var(--bg-3);
    color: var(--text);
    border: 1px solid var(--border);
}

/* Цветные значения сумм поверх тёмного фона */
:is(.admin-main, .cabinet-main) .tx-amount.is-positive { color: #6dd58c; }
:is(.admin-main, .cabinet-main) .tx-amount.is-negative { color: #ff7b7b; }

/* Inputs внутри cabinet-card в админке */
:is(.admin-main, .cabinet-main) .cabinet-card input[type="text"],
:is(.admin-main, .cabinet-main) .cabinet-card input[type="search"],
:is(.admin-main, .cabinet-main) .cabinet-card input[type="email"],
:is(.admin-main, .cabinet-main) .cabinet-card input[type="number"],
:is(.admin-main, .cabinet-main) .cabinet-card select,
:is(.admin-main, .cabinet-main) .cabinet-card textarea {
    background: var(--bg-3);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
}
:is(.admin-main, .cabinet-main) .cabinet-card a { color: var(--primary); }

/* ---------- Сайдбар кабинета и админки (тёмный) ---------- */
.cabinet-sidebar,
.admin-sidebar {
    color: var(--text);
}
.cabinet-sidebar .panel,
.admin-sidebar .panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: none;
    color: var(--text);
}
.cabinet-sidebar .panel-title,
.admin-sidebar .panel-title {
    color: var(--text);
}
.cabinet-sidebar a,
.admin-sidebar a {
    color: var(--text);
    text-decoration: none;
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    transition: background .15s, color .15s;
}
.cabinet-sidebar a:hover,
.admin-sidebar a:hover,
.cabinet-sidebar a.is-active,
.admin-sidebar a.is-active {
    background: var(--bg-3);
    color: var(--primary);
}
.cabinet-sidebar .badge,
.admin-sidebar .badge {
    background: var(--bg-3);
    color: var(--muted);
    border: 1px solid var(--border);
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 11px;
    margin-left: auto;
}

.footer-socials {
    display: flex; gap: 10px; justify-content: flex-end;
}
.footer-socials a {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--surface-2);
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--text);
    font-size: 13px;
}
.footer-socials a:hover { background: var(--surface); color: var(--primary); }

.footer-bottom { display: none; } /* старый блок copyright уже выведен в footer-inner */

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
    .hero { grid-template-columns: 1fr; padding: 32px 24px; }
    .hero h1 { font-size: 26px; }
    .hero-art { display: none; }
    .product-grid-single { grid-template-columns: 1fr; }
    .product-aside { position: static; }
    .articles-grid { grid-template-columns: 1fr; }
    .row-track { grid-auto-columns: calc((100% - 16px) / 2); }
    .header-search { display: none; }
}
@media (max-width: 600px) {
    .site-header .header-inner { grid-template-columns: auto auto; }
    .top-cats { display: none; }
    .row-track { grid-auto-columns: 80%; }
    .site-footer .footer-inner { grid-template-columns: 1fr; text-align: center; }
    .footer-nav, .footer-socials { justify-content: center; }
    .product-page h1 { font-size: 22px; }
}


