/* =====================================================================
   Тема „Техника · Електроника" — modern, dense, spec-forward.
   Dark navy header with a big search, white category bar, bordered cards
   with specs + stock, blue/cyan accents, Manrope + JetBrains Mono.
   ===================================================================== */
html[data-theme="tech"] {
  --bg: #f4f6fb;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --surface-2: #eef2f8;
  --line: #dfe5ef;
  --input-bg: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --faint: #64748b;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-soft: #e8f0fe;
  --on-accent: #ffffff;
  --accent-2: #ef4444;
  --on-accent-2: #ffffff;
  --price: #0f172a;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  --grad-accent: linear-gradient(120deg, #2563eb, #06b6d4);
  --header-bg: #0b1220;
  --header-text: #e2e8f0;
  --header-line: #0b1220;
  --nav-text: #0f172a;
  --nav-hover: #2563eb;
  --topbar-bg: #060b16;
  --topbar-text: #94a3b8;
  --footer-bg: #0b1220;
  --footer-text: #e2e8f0;
  --footer-muted: #94a3b8;
  --footer-line: #1e293b;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-btn: 10px;
  --shadow: 0 12px 32px -14px rgba(15, 23, 42, 0.22);
  --shadow-accent: 0 8px 20px -8px rgba(37, 99, 235, 0.55);
  --font-display: 'Manrope', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --body-weight: 500;
  --h-weight: 800;
  --h-tracking: -0.02em;
  --h-line: 1.1;
  --btn-weight: 700;
  --btn-tracking: 0;
  --btn-size: 0.9rem;
  --btn-pad: 0.85em 1.5em;
  --eyebrow-color: #2563eb;
  --eyebrow-tracking: 0.12em;
  --label-transform: none;
  --card-ratio: 1 / 1;
  --container: 1280px;
  --header-h: 70px;
}
html[data-theme="tech"] .topbar-inner { justify-content: space-between; min-height: 32px; }
html[data-theme="tech"] .topbar-contact { display: flex; }
html[data-theme="tech"] .site-header::before { display: none; }
html[data-theme="tech"] .brand .logo { font-weight: 800; font-size: 1.45rem; color: #ffffff; letter-spacing: -0.03em; }
html[data-theme="tech"] .brand .logo::before { content: ''; display: inline-block; width: 0.85em; height: 0.85em; border-radius: 5px; background: var(--grad-accent); margin-right: 0.5rem; vertical-align: -0.06em; }
html[data-theme="tech"] .brand .tag { display: none; }
html[data-theme="tech"] .hdr-link, html[data-theme="tech"] .cart-btn { color: #e2e8f0; font-weight: 600; }
html[data-theme="tech"] .hdr-link:hover, html[data-theme="tech"] .cart-btn:hover { color: #93c5fd; }
html[data-theme="tech"] .cart-count { background: var(--accent-2); }

@media (min-width: 961px) {
  html[data-theme="tech"] .header-grid { grid-template-columns: auto 1fr auto; grid-template-areas: "brand search actions" "nav nav nav"; gap: 0.7rem 2rem; padding-top: 0.7rem; }
  html[data-theme="tech"] .header-search { justify-self: stretch; width: 100%; max-width: 680px; margin: 0 auto; }
  html[data-theme="tech"] .header-search input { width: 100%; padding: 0.5rem 3rem 0.5rem 1rem; border: 0; border-radius: 9px; font-size: 0.9rem; background: #ffffff; color: var(--text); }
  html[data-theme="tech"] .header-search button { right: 4px; background: var(--accent); color: #fff; border-radius: 7px; padding: 0.3rem 0.55rem; }
  html[data-theme="tech"] .main-nav { background: #ffffff; box-shadow: 0 0 0 100vmax #ffffff; clip-path: inset(0 -100vmax); border-bottom: 1px solid var(--line); }
  html[data-theme="tech"] .nav-links { gap: 0.3rem; min-height: 52px; }
  html[data-theme="tech"] .nav-links > li > a { padding: 0.5rem 0.85rem; border-radius: 8px; font-weight: 700; font-size: 0.88rem; color: var(--text); }
  html[data-theme="tech"] .nav-links > li > a:hover, html[data-theme="tech"] .nav-links > li > a.active { background: var(--accent-soft); color: var(--accent-strong); }
  html[data-theme="tech"] .nav-links > li:first-child > a { background: var(--accent); color: #ffffff; margin-right: 0.6rem; }
  html[data-theme="tech"] .nav-links > li:first-child > a::before { content: '☰'; margin-right: 0.45rem; }
  html[data-theme="tech"] .nav-links > li:first-child > a:hover { background: var(--accent-strong); color: #fff; }
  html[data-theme="tech"] .nav-links .sub { top: calc(100% + 4px); border-radius: 12px; }
}

/* ---------- cards: bordered, specs + stock, full-width button ---------- */
html[data-theme="tech"] .grid-products, html[data-theme="tech"] .grid-4 { gap: 1rem; }
html[data-theme="tech"] .pcard:hover { transform: translateY(-2px); border-color: #bcd0f7; }
html[data-theme="tech"] .pcard-media { margin: 0.6rem 0.6rem 0; border-radius: 10px; }
html[data-theme="tech"] .pcard-body { padding: 0.8rem 0.95rem 1rem; }
html[data-theme="tech"] .pcard-cat { color: var(--accent); font-weight: 700; letter-spacing: 0.06em; font-size: 0.68rem; }
html[data-theme="tech"] .pcard-title { font-family: var(--font-body); font-weight: 700; font-size: 0.97rem; min-height: 2.6em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
html[data-theme="tech"] .pcard-short { display: none; }
html[data-theme="tech"] .pcard-specs { display: flex; }
html[data-theme="tech"] .pcard-meta .stock { display: inline-flex; align-items: center; font-weight: 600; }
html[data-theme="tech"] .pcard-price .now { font-size: 1.3rem; font-weight: 800; }
html[data-theme="tech"] .pcard-actions .btn { width: 100%; }
html[data-theme="tech"] .badge { border-radius: 6px; letter-spacing: 0.02em; font-size: 0.7rem; }
html[data-theme="tech"] .chip { background: #f1f5f9; border-color: #e2e8f0; color: #334155; }

/* ---------- home ---------- */
.tx-hero { padding: 1.4rem 0 0.6rem; position: relative; z-index: 1; }
.tx-hero-grid { display: grid; grid-template-columns: 1fr 320px; gap: 1.1rem; }
.tx-hero-main { position: relative; overflow: hidden; border-radius: 22px; color: #e2e8f0; min-height: 440px; display: grid; grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 1rem; padding: clamp(1.6rem, 4vw, 3.2rem);
  background: radial-gradient(circle at 78% 40%, rgba(37, 99, 235, 0.55), transparent 55%), radial-gradient(circle at 100% 100%, rgba(6, 182, 212, 0.35), transparent 50%), linear-gradient(135deg, #0b1220 0%, #101b35 55%, #13306d 100%); }
.tx-hero-main::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px); background-size: 34px 34px; pointer-events: none; }
.tx-hero-text { position: relative; z-index: 1; }
.tx-hero-text h1 { color: #ffffff; font-size: clamp(2rem, 4vw, 3.4rem); margin-bottom: 0.9rem; }
.tx-hero-text p { color: #a5b4cc; max-width: 30rem; font-size: 1.05rem; margin-bottom: 1.6rem; }
.tx-pill { display: inline-block; padding: 0.35em 0.85em; border-radius: 99px; background: rgba(37, 99, 235, 0.22); color: #93c5fd; font-size: 0.78rem; font-weight: 700; border: 1px solid rgba(147, 197, 253, 0.35); margin-bottom: 1.1rem; }
.tx-cta { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.btn-glass { background: rgba(255, 255, 255, 0.08); color: #ffffff; border-color: rgba(255, 255, 255, 0.25); }
.btn-glass:hover { background: rgba(255, 255, 255, 0.16); }
.tx-hero-img { position: relative; z-index: 1; width: 100%; max-height: 380px; object-fit: contain; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.45)); }
.tx-spot { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 1rem; display: flex; flex-direction: column; gap: 0.7rem; }
.tx-spot .spot-img { display: block; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.tx-spot .spot-img img { width: 100%; height: 100%; object-fit: cover; }
.tx-spot .spot-tag { display: inline-block; padding: 0.25em 0.7em; border-radius: 6px; background: var(--accent-2); color: #fff; font-size: 0.7rem; font-weight: 800; }
.tx-spot h3 { font-size: 1.1rem; margin: 0.5rem 0 0.3rem; font-family: var(--font-body); }
.tx-spot ul { list-style: none; padding: 0; margin: 0 0 0.6rem; font-size: 0.82rem; color: var(--muted); display: grid; gap: 0.2rem; }
.tx-spot ul b { color: var(--text); font-family: var(--font-mono); font-weight: 500; font-size: 0.8rem; }
.tx-spot .spot-price { font-size: 1.5rem; font-weight: 800; }
.tx-spot .spot-price s { font-size: 0.9rem; color: var(--faint); font-weight: 500; }
@media (max-width: 1060px) { .tx-hero-grid { grid-template-columns: 1fr; } .tx-spot { flex-direction: row; align-items: center; } .tx-spot .spot-img { width: 180px; flex: 0 0 auto; } }
@media (max-width: 720px) { .tx-hero-main { grid-template-columns: 1fr; min-height: 0; } .tx-hero-img { max-height: 230px; } .tx-spot { flex-direction: column; align-items: stretch; } .tx-spot .spot-img { width: auto; } }

.tx-features { padding: 1rem 0 0.4rem; position: relative; z-index: 1; }
.tx-features .features { gap: 0.9rem; }
.tx-features .feature { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; text-align: left; padding: 1rem 1.1rem; display: grid; grid-template-columns: auto 1fr; grid-template-areas: "fi fv" "fi fl"; column-gap: 0.85rem; align-items: center; }
.tx-features .fi { grid-area: fi; width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-strong); display: grid; place-items: center; font-family: var(--font-mono); font-weight: 600; font-size: 0.8rem; }
.tx-features .fv { grid-area: fv; font-family: var(--font-body); font-size: 1.05rem; color: var(--text); }
.tx-features .fl { grid-area: fl; font-size: 0.8rem; }

.tx-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.9rem; }
@media (max-width: 560px) { .tx-cats { grid-template-columns: repeat(2, 1fr); } }
html[data-theme="tech"] .tx-cats .cat-tile { aspect-ratio: auto; background: var(--surface); padding: 1rem 0.8rem 0.9rem; text-align: center; transition: border-color 0.2s, transform 0.2s; }
html[data-theme="tech"] .tx-cats .cat-tile:hover { border-color: var(--accent); transform: translateY(-2px); }
html[data-theme="tech"] .tx-cats .cat-tile img { width: 86px; height: 86px; margin: 0 auto 0.6rem; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
html[data-theme="tech"] .tx-cats .cat-tile:hover img { transform: none; }
html[data-theme="tech"] .tx-cats .cat-label { position: static; background: none; color: var(--text); padding: 0; }
html[data-theme="tech"] .tx-cats .cat-name { font-family: var(--font-body); font-size: 0.95rem; font-weight: 800; }
html[data-theme="tech"] .tx-cats .cat-count { color: var(--faint); font-size: 0.76rem; }

.tx-banner { padding: 1.5rem 0; position: relative; z-index: 1; }
.tx-banner-inner { border-radius: 22px; padding: clamp(1.6rem, 4vw, 2.6rem) clamp(1.6rem, 4vw, 3rem); background: var(--grad-accent); color: #ffffff; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.tx-banner-inner h2 { color: #fff; margin: 0.2rem 0; font-size: clamp(1.5rem, 3vw, 2.2rem); }
.tx-banner-inner p { margin: 0; color: rgba(255, 255, 255, 0.88); }
.tx-banner-inner .eyebrow { color: rgba(255, 255, 255, 0.85); margin: 0; }
.tx-banner-inner .btn { background: #ffffff; color: var(--accent-strong); }
.tx-banner-inner .btn:hover { background: #eef4ff; }

.tx-why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.tx-why-media { border-radius: 22px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); aspect-ratio: 4 / 3; }
.tx-why-media img { width: 100%; height: 100%; object-fit: cover; }
.tx-list { list-style: none; padding: 0; margin: 1.4rem 0; display: grid; gap: 0.75rem; }
.tx-list li { display: flex; gap: 0.75rem; align-items: center; font-weight: 600; }
.tx-list .mark { width: 26px; height: 26px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-strong); display: grid; place-items: center; font-size: 0.8rem; flex: 0 0 auto; }
@media (max-width: 860px) { .tx-why-grid { grid-template-columns: 1fr; } }

html[data-theme="tech"] .newsletter { background: #0b1220; border: 0; color: #e2e8f0; }
html[data-theme="tech"] .newsletter h2 { color: #fff; }
html[data-theme="tech"] .newsletter .muted { color: #94a3b8; }
html[data-theme="tech"] .newsletter .eyebrow { color: #93c5fd; }
html[data-theme="tech"] .section { padding: clamp(2.2rem, 5vw, 3.6rem) 0; }
html[data-theme="tech"] .section-head { margin-bottom: 1.4rem; }
html[data-theme="tech"] .section-head h2 { font-size: clamp(1.45rem, 2.6vw, 1.95rem); }
html[data-theme="tech"] .link-arrow { border-bottom: 0; }
html[data-theme="tech"] .link-arrow::after { content: '→'; }

/* ---------- product + catalogue ---------- */
html[data-theme="tech"] .viewer { background: #ffffff; }
html[data-theme="tech"] .product-info h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
html[data-theme="tech"] .product-info .price .now { font-family: var(--font-body); font-weight: 800; font-size: 2.1rem; }
html[data-theme="tech"] .specs tr:nth-child(odd) td { background: #f8fafc; }
html[data-theme="tech"] .specs td { padding: 0.75em 0.9em; }
html[data-theme="tech"] .specs td:last-child { font-family: var(--font-mono); font-size: 0.88rem; }
html[data-theme="tech"] .catalog-side { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem; }
html[data-theme="tech"] .footer-brand .logo { color: #fff; }

/* ---------- admin ---------- */
html[data-theme="tech"] body.page-admin { --admin-side-bg: #0b1220; --admin-side-text: #94a3b8; --admin-side-active: #ffffff; --admin-side-active-bg: #2563eb; }
html[data-theme="tech"] .admin-side { border-right-color: #0b1220; }
html[data-theme="tech"] .admin-brand .logo { color: #ffffff; }
html[data-theme="tech"] .admin-nav a:hover { background: #111c36; color: #ffffff; }
html[data-theme="tech"] .admin-nav .count { background: #111c36; border-color: #1e293b; color: #cbd5e1; }
html[data-theme="tech"] .admin-nav .nav-group { color: #475569; }
html[data-theme="tech"] .admin-side .side-link { color: #94a3b8; }
html[data-theme="tech"] .admin-side .btn-ghost { color: #e2e8f0; border-color: #1e293b; }
