/* ==========================================================================
   ТАЙГА-ТЕХ — главная таблица стилей
   Тёмная тема в духе caiman.ru, акцент: зелёный.
   ========================================================================== */

:root {
    --bg: #0d0d10;
    --bg-2: #14141a;
    --bg-3: #1c1c25;
    --bg-card: #1a1a23;
    --bg-card-hover: #22222e;
    --border: #2a2a36;
    --border-soft: #1f1f2a;
    --text: #f1f1f4;
    --text-muted: #8b8b97;
    --text-dim: #5e5e6c;
    --accent: #00c853;
    --accent-hover: #00e065;
    --accent-dim: #00993f;
    --accent-yellow: #ffc107;
    --danger: #f44336;
    --warning: #ff9800;
    --info: #2196f3;
    --radius: 14px;
    --radius-sm: 8px;
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.45);
    --transition: 0.2s ease;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

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

h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; margin: 0 0 .8em; }
h1 { font-size: 2.2rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.muted { color: var(--text-muted); }
.small { font-size: 0.85rem; }
.float-right { float: right; }

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Header ===== */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--bg); border-bottom: 1px solid var(--border-soft); }

.topbar {
    background: var(--bg-2);
    color: var(--text-muted);
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border-soft);
}
.topbar-inner {
    display: flex; justify-content: space-between; align-items: center;
    height: 36px;
}
.topbar-right a { color: var(--text-muted); margin-left: 20px; }
.topbar-right a:hover { color: var(--text); }

.header-main { padding: 16px 0; }
.header-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 24px; padding-bottom: 16px;
}
.logo {
    display: inline-flex; align-items: center; gap: 10px;
    color: var(--text); font-weight: 800; font-size: 1.4rem;
}
.logo-mark {
    width: 40px; height: 40px; border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dim));
    color: #0a0a0a; display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.95rem;
    box-shadow: 0 2px 10px rgba(0, 200, 83, 0.25);
}
.logo-mark svg { width: 24px; height: 24px; }
.logo-text {
    position: relative; padding-bottom: 4px;
    letter-spacing: 0.5px;
}
.logo-bar {
    position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-yellow) 100%);
    border-radius: 2px;
}
.logo-light { color: #fff; }

.main-nav {
    display: flex; gap: 4px; flex: 1; justify-content: center;
}
.nav-item { position: relative; }
.nav-link {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 14px; border-radius: var(--radius-sm);
    color: var(--text); font-weight: 500; font-size: 0.95rem;
}
.nav-link:hover { background: var(--bg-3); color: var(--text); }
.caret { font-size: 0.7em; opacity: 0.7; }
.nav-dropdown {
    position: absolute; top: 100%; left: 0; min-width: 240px;
    background: var(--bg-2); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 8px;
    box-shadow: var(--shadow-lg);
    opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: var(--transition);
    z-index: 20;
}
.nav-item:hover .nav-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-dropdown-item {
    display: block; padding: 10px 14px; border-radius: var(--radius-sm);
    color: var(--text); font-size: 0.92rem;
}
.nav-dropdown-item:hover { background: var(--bg-3); color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 4px; }
.header-action {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 50%;
    color: var(--text);
}
.header-action svg { width: 22px; height: 22px; stroke-linecap: round; stroke-linejoin: round; }
.header-action:hover { background: var(--bg-3); color: var(--accent); }
.admin-link { color: var(--accent-yellow); }
.badge {
    position: absolute; top: 4px; right: 4px;
    min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 9px;
    font-size: 0.7rem; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
}
.badge-green { background: var(--accent); color: #000; }

/* ===== Search ===== */
.search-bar {
    display: flex; align-items: center;
    background: var(--bg-2); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 6px 6px 6px 16px;
    gap: 10px;
}
.search-bar:focus-within { border-color: var(--accent); }
.search-icon { width: 18px; height: 18px; stroke: var(--text-muted); flex-shrink: 0; }
.search-bar input {
    flex: 1; background: transparent; border: none; outline: none;
    color: var(--text); font: inherit; font-size: 1rem; padding: 12px 0;
}
.search-bar input::placeholder { color: var(--text-dim); }
.search-btn {
    background: var(--accent); color: #000; border: none;
    padding: 12px 28px; border-radius: 10px;
    font-weight: 600; cursor: pointer; transition: var(--transition);
}
.search-btn:hover { background: var(--accent-hover); }

/* ===== Buttons ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 11px 20px; border-radius: 10px;
    font-weight: 600; font-size: 0.95rem; cursor: pointer;
    border: 1px solid transparent; transition: var(--transition);
    text-align: center; line-height: 1.2;
    font-family: inherit;
}
.btn-primary { background: var(--accent); color: #000; }
.btn-primary:hover { background: var(--accent-hover); color: #000; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: rgba(0, 200, 83, 0.06); }
.btn-block { width: 100%; }
.btn-lg { padding: 15px 28px; font-size: 1rem; }
.btn-sm { padding: 7px 14px; font-size: 0.85rem; }
.btn-icon {
    width: 42px; height: 42px; border-radius: 10px;
    background: var(--bg-3); border: 1px solid var(--border);
    color: var(--text); cursor: pointer; transition: var(--transition);
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.btn-icon svg { width: 20px; height: 20px; }
.btn-icon:hover { color: var(--accent); border-color: var(--accent); }

.btn-link {
    background: none; border: none; color: var(--accent); cursor: pointer;
    font: inherit; padding: 4px 8px; text-decoration: none;
}
.btn-link:hover { text-decoration: underline; }
.btn-link.danger { color: var(--danger); }

.flex-1 { flex: 1; }
.inline { display: inline; }

/* ===== Hero ===== */
.hero {
    position: relative; overflow: hidden;
    background: linear-gradient(135deg, var(--bg-2) 0%, #0a1f10 100%);
    border-bottom: 1px solid var(--border-soft);
}
.hero::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(0, 200, 83, 0.15), transparent 60%);
    pointer-events: none;
}
.hero-inner {
    display: grid; grid-template-columns: 1fr 1fr; gap: 60px;
    align-items: center; padding: 80px 24px;
    position: relative;
}
.hero-eyebrow {
    color: var(--accent); font-weight: 700; letter-spacing: 2px;
    font-size: 0.85rem; margin-bottom: 16px;
}
.hero-title {
    font-size: 3.5rem; font-weight: 800; line-height: 1.05;
    margin-bottom: 20px; letter-spacing: -1px;
}
.hero-subtitle {
    font-size: 1.15rem; color: var(--text-muted);
    margin-bottom: 32px; max-width: 540px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 48px; }
.hero-stats {
    display: flex; gap: 40px;
}
.hero-stats > div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.8rem; color: var(--accent); }
.hero-stats span { color: var(--text-muted); font-size: 0.9rem; }
.hero-image {
    position: relative; min-height: 400px;
    background: linear-gradient(135deg, rgba(0, 200, 83, 0.08), transparent),
                radial-gradient(circle at 50% 50%, rgba(255, 193, 7, 0.05), transparent);
    border-radius: 24px; border: 1px solid var(--border-soft);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cg fill='%2300c853' opacity='0.35'%3E%3Cpath d='M100 20 L120 60 L160 60 L130 90 L140 130 L100 110 L60 130 L70 90 L40 60 L80 60 Z'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 280px;
    background-repeat: no-repeat;
    background-position: center;
}

/* ===== Sections ===== */
.section { padding: 64px 0; }
.section-dark { background: var(--bg-2); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.section-cta { background: linear-gradient(135deg, var(--bg-2) 0%, #0a1f10 100%); padding: 60px 0; }
.section-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 32px; gap: 16px; flex-wrap: wrap;
}
.section-head h2 { margin: 0; }
.link-arrow { color: var(--accent); font-weight: 600; font-size: 0.95rem; }
.link-arrow:hover { color: var(--accent-hover); }

/* ===== Categories grid ===== */
.categories-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}
.category-card {
    background: var(--bg-card); border: 1px solid var(--border-soft);
    border-radius: var(--radius); padding: 28px;
    color: var(--text); transition: var(--transition);
    display: flex; flex-direction: column; gap: 14px;
    text-decoration: none;
}
.category-card:hover {
    background: var(--bg-card-hover); border-color: var(--accent);
    transform: translateY(-4px); color: var(--text);
}
.category-card-icon {
    width: 56px; height: 56px; border-radius: 12px;
    background: linear-gradient(135deg, rgba(0, 200, 83, 0.18), rgba(0, 200, 83, 0.05));
    color: var(--accent);
    display: flex; align-items: center; justify-content: center;
}
.category-card-icon svg { width: 32px; height: 32px; }
.category-card-icon img { width: 56px; height: 56px; object-fit: contain; }
.category-card h3 { margin: 0; font-size: 1.15rem; }

/* ===== Products grid ===== */
.products-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}
.product-card {
    background: var(--bg-card); border: 1px solid var(--border-soft);
    border-radius: var(--radius); overflow: hidden;
    transition: var(--transition);
    display: flex; flex-direction: column;
}
.product-card:hover {
    border-color: var(--border);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}
.product-card-link { display: block; color: var(--text); }
.product-card-link:hover { color: var(--text); }
.product-card-image {
    aspect-ratio: 1; background: #ebebeb; position: relative;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.product-card-image img {
    width: 100%; height: 100%; object-fit: contain;
    transition: transform 0.4s ease;
    padding: 14px;
}
.product-card:hover .product-card-image img { transform: scale(1.05); }
.product-card-placeholder {
    color: var(--text-dim); padding: 30%;
    background: linear-gradient(135deg, var(--bg-3), var(--bg-2));
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
}
.product-card-placeholder.small svg { width: 40px; height: 40px; }
.product-card-placeholder.large { padding: 25%; }
.product-card-placeholder svg { width: 100%; height: 100%; }

.badge-discount, .badge-new {
    position: absolute; top: 10px; padding: 4px 10px;
    border-radius: 6px; font-weight: 700; font-size: 0.8rem;
    z-index: 2;
}
.badge-discount { left: 10px; background: var(--danger); color: #fff; }
.badge-new { right: 10px; background: var(--accent); color: #000; }
.badge-instock { background: rgba(0, 200, 83, 0.15); color: var(--accent); padding: 2px 10px; border-radius: 6px; font-size: 0.8rem; font-weight: 600; }
.badge-outstock { background: rgba(255, 152, 0, 0.15); color: var(--warning); padding: 2px 10px; border-radius: 6px; font-size: 0.8rem; font-weight: 600; }
.badge-loc { background: var(--bg-3); padding: 2px 8px; border-radius: 6px; font-size: 0.75rem; }

.product-card-body { padding: 18px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.product-card-brand { color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; }
.product-card-title { font-size: 0.98rem; font-weight: 600; margin: 0; line-height: 1.35; min-height: 2.7em; }
.product-card-price-row { display: flex; gap: 10px; align-items: baseline; margin-top: auto; }
.product-card-price { font-size: 1.25rem; font-weight: 800; }
.product-card-old-price { color: var(--text-dim); text-decoration: line-through; font-size: 0.95rem; }
.product-card-actions { padding: 0 18px 18px; display: flex; gap: 8px; }

/* ===== Breadcrumbs ===== */
.breadcrumbs {
    padding: 24px 0 12px;
    color: var(--text-muted); font-size: 0.9rem;
}
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs span { margin: 0 8px; opacity: 0.5; }

/* ===== Catalog ===== */
.catalog-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 0 24px; border-bottom: 1px solid var(--border-soft); margin-bottom: 24px; }
.catalog-meta { color: var(--text-muted); }

.catalog-layout { display: grid; grid-template-columns: 280px 1fr; gap: 32px; padding-bottom: 60px; }
.catalog-sidebar .filters { background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 24px; position: sticky; top: 200px; }
.filter-block { margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--border-soft); }
.filter-block:last-of-type { border-bottom: none; }
.filter-block h4 { font-size: 0.95rem; margin-bottom: 14px; }
.filter-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.filter-list a { color: var(--text-muted); display: block; padding: 4px 0; font-size: 0.92rem; }
.filter-list a.active { color: var(--accent); font-weight: 600; }
.filter-list a:hover { color: var(--text); }
.checkbox-list label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--text-muted); font-size: 0.92rem; }
.checkbox-list label:hover { color: var(--text); }
.price-inputs { display: flex; gap: 8px; }
.price-inputs input { flex: 1; }

.catalog-toolbar { display: flex; justify-content: flex-end; margin-bottom: 16px; }
.sort-select { padding: 10px 16px; }

/* ===== Forms / Inputs ===== */
.form-control, input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"], select, textarea {
    width: 100%; padding: 12px 14px;
    background: var(--bg-2); border: 1px solid var(--border);
    border-radius: 10px; color: var(--text); font: inherit;
    transition: var(--transition);
}
.form-control:focus, input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--accent);
    background: var(--bg-3);
}
textarea { resize: vertical; min-height: 100px; font-family: inherit; }
.form-control.monospace { font-family: ui-monospace, SFMono-Regular, monospace; }
.form-control.sm { padding: 6px 10px; font-size: 0.85rem; }
label { font-weight: 500; font-size: 0.9rem; color: var(--text-muted); display: block; margin-bottom: 6px; }
.checkbox { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--text); margin: 0; }
.checkbox input { width: auto; margin: 0; }
.form-row { margin-bottom: 16px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-full { grid-column: 1 / -1; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-stack > * { margin-bottom: 14px; }
.form-error { color: var(--danger); font-size: 0.85rem; margin-top: 4px; }
.form-preview { max-width: 200px; margin-top: 8px; border-radius: 8px; border: 1px solid var(--border); }
.toggles { display: flex; flex-direction: column; gap: 10px; padding: 14px; background: var(--bg-2); border-radius: 10px; }

/* ===== Product page ===== */
.product-page {
    display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
    padding: 24px 0 40px;
}
.gallery-main {
    background: #ebebeb; border-radius: var(--radius);
    aspect-ratio: 1; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.gallery-main img { width: 100%; height: 100%; object-fit: contain; padding: 20px; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.gallery-thumb {
    width: 80px; height: 80px; border: 2px solid var(--border);
    border-radius: 10px; padding: 0; background: #ebebeb; cursor: pointer;
    overflow: hidden; transition: var(--transition);
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.gallery-thumb.active { border-color: var(--accent); }

.product-info > * { margin-bottom: 16px; }
.product-brand { color: var(--text-muted); text-transform: uppercase; letter-spacing: 1.5px; font-size: 0.85rem; font-weight: 600; }
.product-title { font-size: 2rem; line-height: 1.15; }
.product-meta-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; color: var(--text-muted); font-size: 0.9rem; }
.product-sku strong { color: var(--text); }
.stars { color: var(--accent-yellow); letter-spacing: 2px; }
.product-short { color: var(--text-muted); font-size: 1rem; }
.product-price-row { display: flex; align-items: baseline; gap: 14px; }
.product-price { font-size: 2.2rem; font-weight: 800; }
.product-old-price { color: var(--text-dim); text-decoration: line-through; font-size: 1.2rem; }
.product-discount { background: var(--danger); color: #fff; padding: 4px 10px; border-radius: 6px; font-weight: 700; }
.product-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.product-quick-specs table { width: 100%; border-collapse: collapse; }
.product-quick-specs td { padding: 10px 0; border-bottom: 1px solid var(--border-soft); font-size: 0.92rem; }
.product-quick-specs td:first-child { color: var(--text-muted); width: 50%; }

.product-tabs { padding: 24px 0; border-top: 1px solid var(--border-soft); }
.tabs-nav { display: flex; gap: 4px; border-bottom: 1px solid var(--border-soft); margin-bottom: 24px; flex-wrap: wrap; }
.tab-btn {
    background: none; border: none; color: var(--text-muted);
    padding: 14px 20px; cursor: pointer; font: inherit; font-weight: 600;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }
.specs-table { width: 100%; border-collapse: collapse; max-width: 800px; }
.specs-table tr:nth-child(odd) { background: var(--bg-2); }
.specs-table td { padding: 14px 18px; border-bottom: 1px solid var(--border-soft); }
.specs-table td:first-child { color: var(--text-muted); width: 40%; }
.rich-content { max-width: 800px; line-height: 1.7; }
.rich-content img { border-radius: var(--radius); margin: 16px 0; }

.review { padding: 18px 0; border-bottom: 1px solid var(--border-soft); }
.review-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.review-form { padding-top: 24px; max-width: 700px; }

/* ===== Cart ===== */
.cart-layout { display: grid; grid-template-columns: 1fr 320px; gap: 32px; padding-bottom: 40px; }
.cart-items { display: flex; flex-direction: column; gap: 12px; }
.cart-item {
    display: grid; grid-template-columns: 90px 1fr auto auto auto;
    align-items: center; gap: 20px;
    background: var(--bg-card); border: 1px solid var(--border-soft);
    border-radius: var(--radius); padding: 16px;
}
.cart-item-image { width: 90px; height: 90px; background: #ebebeb; border-radius: 10px; overflow: hidden; }
.cart-item-image img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.cart-item-name { color: var(--text); font-weight: 600; }
.cart-item-name:hover { color: var(--accent); }
.cart-item-price { color: var(--text-muted); margin-top: 4px; }
.cart-item-qty { display: inline-flex; align-items: center; gap: 4px; }
.qty-btn { width: 32px; height: 32px; border-radius: 8px; background: var(--bg-3); border: 1px solid var(--border); color: var(--text); cursor: pointer; font-size: 1.1rem; }
.qty-btn:hover { border-color: var(--accent); color: var(--accent); }
.cart-item-qty input { width: 50px; text-align: center; padding: 7px; }
.cart-item-total { font-weight: 700; font-size: 1.1rem; }
.cart-item-remove button { width: 32px; height: 32px; background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.4rem; border-radius: 8px; }
.cart-item-remove button:hover { color: var(--danger); background: rgba(244, 67, 54, 0.1); }

.cart-summary {
    background: var(--bg-card); border: 1px solid var(--border-soft);
    border-radius: var(--radius); padding: 24px;
    height: fit-content; position: sticky; top: 200px;
}
.summary-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed var(--border-soft); }
.summary-row.summary-total { border-top: 1px solid var(--border); border-bottom: none; padding-top: 14px; margin-top: 6px; font-size: 1.2rem; }
.link-back { display: inline-block; margin-top: 16px; color: var(--text-muted); }

.checkout-layout { display: grid; grid-template-columns: 1fr 360px; gap: 32px; padding-bottom: 40px; }

/* ===== Auth ===== */
.auth-card {
    max-width: 460px; margin: 60px auto; padding: 40px;
    background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: var(--radius);
}
.auth-card h1 { margin-bottom: 8px; }
.auth-alt { text-align: center; margin-top: 20px; color: var(--text-muted); }

/* ===== Account ===== */
.account-layout { display: grid; grid-template-columns: 280px 1fr; gap: 32px; padding-bottom: 40px; }
.account-sidebar { background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 24px; height: fit-content; }
.account-user { display: flex; align-items: center; gap: 14px; padding-bottom: 20px; border-bottom: 1px solid var(--border-soft); margin-bottom: 16px; }
.account-avatar {
    width: 48px; height: 48px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-yellow));
    display: flex; align-items: center; justify-content: center;
    color: #000; font-weight: 800; font-size: 1.1rem;
}
.account-menu { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.account-menu a { padding: 10px 14px; border-radius: 8px; color: var(--text); display: block; font-weight: 500; }
.account-menu a:hover { background: var(--bg-3); color: var(--accent); }
.account-menu a.active { background: rgba(0, 200, 83, 0.1); color: var(--accent); }

.cards-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 24px 0 32px; }
.info-card { background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 24px; }
.info-list { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 10px; }

.order-card { background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 20px; margin-bottom: 14px; }
.order-card-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.order-total { margin-left: auto; font-weight: 700; font-size: 1.1rem; }
.order-items { list-style: none; padding: 0; margin: 0; color: var(--text-muted); }
.order-items li { padding: 4px 0; }

.status { padding: 4px 10px; border-radius: 6px; font-size: 0.8rem; font-weight: 600; background: var(--bg-3); }
.status-payment_pending { background: rgba(255, 152, 0, 0.15); color: #ffb74d; }
.status-new { background: rgba(33, 150, 243, 0.15); color: #64b5f6; }
.status-confirmed, .status-pending { background: rgba(255, 193, 7, 0.15); color: var(--accent-yellow); }
.status-shipped { background: rgba(0, 200, 83, 0.15); color: var(--accent); }
.status-delivered, .status-closed { background: rgba(0, 200, 83, 0.15); color: var(--accent); }
.status-cancelled { background: rgba(244, 67, 54, 0.15); color: var(--danger); }
.status-open { background: rgba(33, 150, 243, 0.15); color: #64b5f6; }

/* ===== Tickets / Chat ===== */
.tickets-list { display: flex; flex-direction: column; gap: 8px; }
.ticket-row {
    display: flex; justify-content: space-between; align-items: center;
    background: var(--bg-card); border: 1px solid var(--border-soft);
    border-radius: var(--radius); padding: 16px 20px; gap: 16px;
    color: var(--text);
}
.ticket-row:hover { border-color: var(--accent); }
.chat-thread { padding: 20px 0; display: flex; flex-direction: column; gap: 12px; max-width: 800px; }
.chat-message { display: flex; }
.chat-message.staff { justify-content: flex-start; }
.chat-message.user { justify-content: flex-end; }
.chat-bubble {
    max-width: 70%; padding: 14px 18px;
    background: var(--bg-card); border: 1px solid var(--border-soft);
    border-radius: 14px;
}
.chat-message.user .chat-bubble { background: rgba(0, 200, 83, 0.08); border-color: rgba(0, 200, 83, 0.25); border-radius: 14px 14px 4px 14px; }
.chat-message.staff .chat-bubble { border-radius: 14px 14px 14px 4px; }
.chat-meta { display: flex; gap: 12px; align-items: baseline; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 6px; }
.chat-text { white-space: pre-wrap; word-break: break-word; }
.chat-reply { max-width: 800px; margin-top: 24px; }

.ticket-info { background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 20px; margin-bottom: 24px; }
.ticket-info > div { padding: 6px 0; }
.ticket-status-actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }

/* ===== Footer ===== */
.site-footer { background: var(--bg-2); border-top: 1px solid var(--border-soft); padding: 60px 0 0; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 40px; }
.footer-col h4 { margin-bottom: 16px; font-size: 1rem; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-col ul a { color: var(--text-muted); font-size: 0.92rem; }
.footer-col ul a:hover { color: var(--accent); }
.footer-contacts { margin-top: 16px; display: flex; flex-direction: column; gap: 6px; }
.footer-phone { font-size: 1.3rem; font-weight: 700; color: var(--text); }
.footer-email { color: var(--text-muted); }
.footer-bottom { border-top: 1px solid var(--border-soft); padding: 20px 0; }
.footer-bottom-row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; color: var(--text-muted); font-size: 0.85rem; }
.footer-legal { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-legal a { color: var(--text-muted); }
.footer-legal a:hover { color: var(--accent); }

/* ===== Flash messages ===== */
.flash-stack { display: flex; flex-direction: column; gap: 8px; padding-top: 20px; }
.flash {
    padding: 14px 20px; border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    font-weight: 500;
}
.flash-success { background: rgba(0, 200, 83, 0.1); border-color: rgba(0, 200, 83, 0.4); color: var(--accent); }
.flash-danger, .flash-error { background: rgba(244, 67, 54, 0.1); border-color: rgba(244, 67, 54, 0.4); color: #ff6b6b; }
.flash-warning { background: rgba(255, 152, 0, 0.1); border-color: rgba(255, 152, 0, 0.4); color: var(--warning); }
.flash-info { background: rgba(33, 150, 243, 0.1); border-color: rgba(33, 150, 243, 0.4); color: #64b5f6; }

.alert { padding: 16px 20px; border-radius: 10px; margin-bottom: 20px; line-height: 1.5; }
.alert-info { background: rgba(33, 150, 243, 0.08); border: 1px solid rgba(33, 150, 243, 0.3); color: #90caf9; }
.alert code { background: var(--bg-3); padding: 2px 6px; border-radius: 4px; font-size: 0.9em; }

/* ===== Pagination ===== */
.pagination { display: flex; justify-content: center; gap: 6px; margin: 32px 0; flex-wrap: wrap; }
.page-btn {
    min-width: 40px; height: 40px; padding: 0 12px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 8px; background: var(--bg-card); border: 1px solid var(--border-soft);
    color: var(--text); font-weight: 600;
}
.page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); color: #000; border-color: var(--accent); }
.page-btn.disabled { color: var(--text-dim); cursor: default; }

/* ===== Empty state ===== */
.empty-state { text-align: center; padding: 80px 20px; }
.empty-state h3 { margin-bottom: 10px; }
.empty-state p { color: var(--text-muted); margin-bottom: 24px; }

.error-page { text-align: center; padding: 100px 20px; }
.error-code { font-size: 8rem; font-weight: 800; color: var(--accent); line-height: 1; margin-bottom: 20px; opacity: 0.5; }

/* ===== Static page ===== */
.static-page { max-width: 800px; padding: 24px 0 60px; }
.static-page h1 { margin-bottom: 24px; }
.static-page ul { padding-left: 20px; }
.static-page li { margin-bottom: 8px; }
.contacts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; margin-top: 24px; }
.big-link { font-size: 1.4rem; font-weight: 700; color: var(--accent); }
.page-cover img { border-radius: var(--radius); margin-bottom: 24px; max-height: 360px; width: 100%; object-fit: cover; }

/* ===== Benefits ===== */
.benefits-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.benefit { text-align: center; padding: 28px 20px; border: 1px solid var(--border-soft); border-radius: var(--radius); }
.benefit-icon { font-size: 2.4rem; margin-bottom: 12px; }
.benefit h3 { margin-bottom: 6px; font-size: 1.05rem; }
.benefit p { color: var(--text-muted); font-size: 0.92rem; margin: 0; }

.cta-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-inner h2 { margin: 0 0 8px; }
.cta-inner p { color: var(--text-muted); margin: 0; }

/* ===== Chat fab ===== */
.chat-fab {
    position: fixed; right: 24px; bottom: 24px; z-index: 50;
    width: 56px; height: 56px; border-radius: 50%;
    background: var(--bg-2); border: 1px solid var(--border);
    color: var(--text); display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}
.chat-fab:hover { background: var(--accent); color: #000; transform: scale(1.05); }
.chat-fab svg { width: 24px; height: 24px; }

/* ===== Page head shared ===== */
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin: 16px 0 24px; }

/* ==========================================================================
   ADMIN PANEL
   ========================================================================== */
.admin-layout { display: grid; grid-template-columns: 260px 1fr; min-height: calc(100vh - 200px); }
.admin-sidebar { background: var(--bg-2); border-right: 1px solid var(--border-soft); padding: 24px 16px; }
.admin-brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 24px; border-bottom: 1px solid var(--border-soft); margin-bottom: 16px; }
.admin-nav { display: flex; flex-direction: column; gap: 2px; }
.admin-nav a {
    padding: 11px 14px; border-radius: 8px; color: var(--text-muted);
    font-size: 0.92rem; font-weight: 500;
}
.admin-nav a:hover { background: var(--bg-3); color: var(--text); }
.admin-nav a.active { background: rgba(0, 200, 83, 0.12); color: var(--accent); }
.admin-back { margin-top: 14px; padding-top: 14px !important; border-top: 1px solid var(--border-soft); border-radius: 0 !important; }

.admin-main { padding: 32px 32px 60px; min-width: 0; }
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.admin-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-search { display: flex; gap: 10px; margin-bottom: 20px; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-bottom: 32px; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 20px; }
.stat-num { font-size: 2.2rem; font-weight: 800; color: var(--accent); line-height: 1; margin-bottom: 6px; }
.stat-label { color: var(--text); font-weight: 600; }

.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 32px; }
.dashboard-block { background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 20px; }

.data-table { width: 100%; border-collapse: collapse; background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: var(--radius); overflow: hidden; }
.data-table thead { background: var(--bg-2); }
.data-table th { padding: 14px 16px; text-align: left; font-weight: 600; color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; }
.data-table td { padding: 14px 16px; border-top: 1px solid var(--border-soft); vertical-align: middle; font-size: 0.92rem; }
.data-table tbody tr:hover { background: var(--bg-3); }
.thumb { width: 50px; height: 50px; object-fit: contain; background: #ebebeb; border-radius: 6px; padding: 4px; }
.thumb-placeholder { width: 50px; height: 50px; background: var(--bg-2); border-radius: 6px; display: flex; align-items: center; justify-content: center; color: var(--text-dim); }
.review-text { max-width: 360px; color: var(--text-muted); font-size: 0.88rem; }

.status-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.status-tabs a {
    padding: 8px 14px; border-radius: 8px; color: var(--text-muted);
    background: var(--bg-card); border: 1px solid var(--border-soft);
    font-size: 0.85rem; font-weight: 600;
}
.status-tabs a.active { color: var(--accent); border-color: var(--accent); background: rgba(0, 200, 83, 0.08); }

.admin-form-grid { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
.admin-form-main, .admin-form-side { background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 24px; }
.admin-form-side { position: sticky; top: 20px; }

.extra-images { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.extra-image { position: relative; aspect-ratio: 1; background: #ebebeb; border-radius: 8px; overflow: hidden; }
.extra-image img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.btn-delete-img { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: var(--danger); color: #fff; border: none; cursor: pointer; line-height: 1; font-size: 0.9rem; }

.big-price { font-size: 2rem; font-weight: 800; color: var(--accent); }

/* ===== Adaptive ===== */
@media (max-width: 1024px) {
    .header-row { flex-wrap: wrap; }
    .main-nav { order: 3; width: 100%; overflow-x: auto; }
    .hero-inner { grid-template-columns: 1fr; padding: 50px 24px; }
    .hero-image { display: none; }
    .hero-title { font-size: 2.4rem; }
    .product-page { grid-template-columns: 1fr; }
    .catalog-layout { grid-template-columns: 1fr; }
    .catalog-sidebar .filters { position: static; }
    .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
    .cart-summary { position: static; }
    .account-layout { grid-template-columns: 1fr; }
    .cards-grid, .dashboard-grid, .form-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar { border-right: none; border-bottom: 1px solid var(--border-soft); }
    .admin-form-grid { grid-template-columns: 1fr; }
    .admin-form-side { position: static; }
}
@media (max-width: 640px) {
    .hero-title { font-size: 1.9rem; }
    .topbar-left { display: none; }
    .container { padding: 0 16px; }
    .footer-grid { grid-template-columns: 1fr; }
    .cart-item { grid-template-columns: 70px 1fr; gap: 12px; }
    .cart-item-qty, .cart-item-total, .cart-item-remove { grid-column: 2; }
    .form-row-2 { grid-template-columns: 1fr; }
    .extra-images { grid-template-columns: repeat(2, 1fr); }
    .data-table { font-size: 0.85rem; }
    .data-table th, .data-table td { padding: 10px 8px; }
    h1 { font-size: 1.6rem; }
    .product-title { font-size: 1.4rem; }
    .product-price { font-size: 1.6rem; }
    .nav-link { padding: 8px 10px; font-size: 0.88rem; }
    .header-action { width: 38px; height: 38px; }
}

/* ── Промокод ── */
.promo-block { margin-top: 1rem; border-top: 1px solid var(--border); padding-top: .75rem; }
.promo-toggle { cursor: pointer; font-size: .9rem; color: var(--text-muted); user-select: none; }
.promo-toggle:hover { color: var(--accent); }
.promo-form-wrap { margin-top: .5rem; }
.promo-form-wrap.hidden { display: none; }
.promo-input-row { display: flex; gap: .5rem; }
.promo-input-row .form-control { flex: 1; }
.promo-applied { font-size: .9rem; color: var(--accent); margin-top: .5rem; }
