/* =====================================================================
   Тема „Техника · Електроника" — 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.
   Layout only: every colour/font comes from the theme tokens.
   ===================================================================== */
html[data-theme="tech"] {
  /* colours, fonts, radii, weights and caps come from the theme tokens (admin → Визия → Редактирай) */
  --shadow: 0 12px 32px -14px rgba(15, 23, 42, 0.22);
  --h-tracking: -0.02em;
  --h-line: 1.1;
  --btn-weight: 700;
  --btn-size: 0.9rem;
  --btn-pad: 0.85em 1.5em;
  --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: var(--h-weight); font-size: 1.45rem; color: var(--logo-color); 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: var(--header-text); font-weight: 600; }
html[data-theme="tech"] .hdr-link:hover, html[data-theme="tech"] .cart-btn:hover { color: var(--accent-light); }
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: var(--search-bg); color: var(--text); }
  html[data-theme="tech"] .header-search button { right: 4px; background: var(--accent); color: var(--on-accent); border-radius: 7px; padding: 0.3rem 0.55rem; }
  html[data-theme="tech"] .main-nav { background: var(--nav-bg); box-shadow: 0 0 0 100vmax var(--nav-bg); 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(--nav-text); text-transform: var(--caps-transform); letter-spacing: var(--caps-tracking); }
  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: var(--on-accent); 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: var(--on-accent); }
  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: color-mix(in srgb, var(--accent) 30%, var(--surface)); }
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: var(--h-weight); }
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: var(--surface-2); border-color: var(--line); color: color-mix(in srgb, var(--text) 80%, var(--surface)); }

/* ---------- 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: var(--hero-text); 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: var(--hero-bg); }
.tx-hero-main::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(color-mix(in srgb, var(--hero-title) 4%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--hero-title) 4%, transparent) 1px, transparent 1px); background-size: 34px 34px; pointer-events: none; }
.tx-hero-text { position: relative; z-index: 1; }
.tx-hero-text h1 { color: var(--hero-title); font-size: clamp(2rem, 4vw, 3.4rem); margin-bottom: 0.9rem; }
.tx-hero-text p { color: var(--hero-muted); 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: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent-light); font-size: 0.78rem; font-weight: 700; border: 1px solid color-mix(in srgb, var(--accent-light) 35%, transparent); margin-bottom: 1.1rem; }
.tx-cta { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.btn-glass { background: color-mix(in srgb, var(--hero-title) 8%, transparent); color: var(--hero-title); border-color: color-mix(in srgb, var(--hero-title) 25%, transparent); }
.btn-glass:hover { background: color-mix(in srgb, var(--hero-title) 16%, transparent); }
.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: var(--on-accent-2); 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: var(--h-weight); }
.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: var(--h-weight); }
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: var(--on-accent); display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.tx-banner-inner h2 { color: var(--on-accent); margin: 0.2rem 0; font-size: clamp(1.5rem, 3vw, 2.2rem); }
.tx-banner-inner p { margin: 0; color: color-mix(in srgb, var(--on-accent) 88%, transparent); }
.tx-banner-inner .eyebrow { color: color-mix(in srgb, var(--on-accent) 85%, transparent); margin: 0; }
.tx-banner-inner .btn { background: var(--surface); color: var(--accent-strong); }
.tx-banner-inner .btn:hover { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }

.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: var(--footer-bg); border: 0; color: var(--footer-text); }
html[data-theme="tech"] .newsletter h2 { color: var(--hero-title); }
html[data-theme="tech"] .newsletter .muted { color: var(--footer-muted); }
html[data-theme="tech"] .newsletter .eyebrow { color: var(--accent-light); }
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: var(--surface); }
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: var(--h-weight); font-size: 2.1rem; }
html[data-theme="tech"] .specs tr:nth-child(odd) td { background: color-mix(in srgb, var(--surface) 50%, var(--bg)); }
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: var(--footer-text); }

/* ---------- admin ---------- */
html[data-theme="tech"] .admin-side { border-right-color: var(--admin-side-bg); }
html[data-theme="tech"] .admin-brand .logo { color: var(--admin-side-strong); }
html[data-theme="tech"] .admin-nav a:hover { background: var(--admin-side-hover); color: var(--admin-side-strong); }
html[data-theme="tech"] .admin-nav .count { background: var(--admin-side-hover); border-color: var(--admin-side-line); color: var(--footer-text); }
html[data-theme="tech"] .admin-nav .nav-group { color: var(--muted); }
html[data-theme="tech"] .admin-side .side-link { color: var(--admin-side-text); }
html[data-theme="tech"] .admin-side .btn-ghost { color: var(--footer-text); border-color: var(--admin-side-line); }
