/* Вели Електроник — основен стил. Светла тема, mobile-first, без външни библиотеки. */
:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #f0f4f8;
  --text: #0f1b2d;
  --muted: #5a6a7e;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --brand: #0a74b0;
  --brand-600: #075d8e;
  --brand-50: #e9f4fb;
  --accent: #2b9348;
  --accent-600: #207338;
  --accent-50: #eaf7ee;
  --sale: #d6336c;
  --danger: #c92a2a;
  --danger-50: #fff0f0;
  --warn: #b45309;
  --warn-50: #fff7e6;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 27, 45, .06), 0 2px 8px rgba(15, 27, 45, .05);
  --shadow-lg: 0 10px 30px rgba(15, 27, 45, .12);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 15px/1.55 var(--font); color: var(--text); background: var(--bg); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-600); text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .6em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem); }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid rgba(10, 116, 176, .45); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: #fff; padding: 8px 12px; z-index: 100; border-radius: 6px; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
[hidden] { display: none !important; }

/* ---------- Бутони и форми ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border: 1px solid transparent;
  border-radius: 10px; background: var(--brand); color: #fff; font-weight: 600; cursor: pointer; text-decoration: none; transition: background .15s, transform .05s; white-space: nowrap; }
.btn:hover { background: var(--brand-600); color: #fff; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-accent { background: var(--accent); }
.btn-accent:hover { background: var(--accent-600); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-lg { min-height: 50px; font-size: 1.05rem; padding: 0 26px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand); cursor: pointer; }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; font-size: .92rem; }
.field .req { color: var(--danger); }
.input, select.input, textarea.input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; }
textarea.input { min-height: 110px; resize: vertical; }
.input:focus { border-color: var(--brand); outline: 3px solid rgba(10, 116, 176, .18); }
.field.has-error .input { border-color: var(--danger); background: var(--danger-50); }
.field-error { color: var(--danger); font-size: .85rem; }
.hint { color: var(--muted); font-size: .85rem; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.form-grid { display: grid; gap: 0 16px; }
@media (min-width: 640px) { .form-grid.cols-2 { grid-template-columns: 1fr 1fr; } .span-2 { grid-column: 1 / -1; } }

.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin: 12px 0; border: 1px solid; }
.alert-ok { background: var(--accent-50); border-color: #b7e4c4; color: #1b5e30; }
.alert-error { background: var(--danger-50); border-color: #f5c2c2; color: #8a1c1c; }
.alert-info { background: var(--brand-50); border-color: #bcdcf0; color: #0b4a70; }
.alert-warn { background: var(--warn-50); border-color: #fcd9a5; color: #7a3d06; }

/* ---------- Топ лента и хедър ---------- */
.topbar { background: #0f2a43; color: #d7e3ef; font-size: .85rem; }
.topbar-in { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 34px; }
.topbar a, .topbar span { color: inherit; display: inline-flex; align-items: center; gap: 6px; }
.topbar svg { width: 16px; height: 16px; }
.topbar-links { display: flex; gap: 18px; }
.topbar-msg { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.header-in { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "menu logo actions" "search search search"; align-items: center; gap: 8px 10px; padding-top: 10px; padding-bottom: 10px; }
.menu-btn { grid-area: menu; }
.logo { grid-area: logo; display: block; }
.logo img { width: 128px; height: auto; }
.search { grid-area: search; position: relative; display: flex; }
.header-actions { grid-area: actions; display: flex; align-items: center; gap: 2px; }
.search input { flex: 1; min-width: 0; height: 46px; padding: 0 14px; border: 2px solid var(--brand); border-right: 0; border-radius: 12px 0 0 12px; background: #fff; }
.search input:focus { outline: none; box-shadow: 0 0 0 4px rgba(10, 116, 176, .15); }
.search button { width: 54px; border: 0; border-radius: 0 12px 12px 0; background: var(--brand); color: #fff; cursor: pointer; display: grid; place-items: center; }
.search button:hover { background: var(--brand-600); }
.icon-btn { position: relative; display: inline-flex; align-items: center; gap: 6px; min-width: 42px; height: 42px; padding: 0 9px; border: 0; border-radius: 10px; background: none; color: var(--text); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.icon-btn svg { width: 24px; height: 24px; }
.icon-btn .label { font-size: .9rem; font-weight: 600; }
.icon-btn .count { position: absolute; top: 2px; left: 24px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 700; display: grid; place-items: center; }
.cart-btn .label { color: var(--brand); }

.suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 60; overflow: hidden; max-height: 70vh; overflow-y: auto; }
.suggest a { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; padding: 8px 12px; color: var(--text); border-bottom: 1px solid var(--line); }
.suggest a:last-child { border-bottom: 0; }
.suggest a:hover, .suggest a[aria-selected="true"] { background: var(--brand-50); text-decoration: none; }
.suggest img { width: 44px; height: 44px; object-fit: contain; background: #fff; border-radius: 6px; }
.suggest .s-name { font-size: .92rem; line-height: 1.3; }
.suggest .s-code { display: block; font-size: .78rem; color: var(--muted); }
.suggest .s-price { font-weight: 700; white-space: nowrap; }
.suggest .s-all { display: block; text-align: center; font-weight: 600; color: var(--brand); padding: 10px; }

.navbar { border-top: 1px solid var(--line); display: none; position: relative; }
.navbar-in { display: flex; align-items: center; gap: 8px; min-height: 48px; }
.cat-toggle { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--brand); color: #fff; font-weight: 600; cursor: pointer; }
.cat-toggle[aria-expanded="true"] { background: var(--brand-600); }
.nav-links { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-links a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--text); font-weight: 600; font-size: .95rem; }
.nav-links a:hover, .nav-links a[aria-current] { background: var(--brand-50); color: var(--brand-600); text-decoration: none; }
.mega { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-top: 1px solid var(--line); box-shadow: var(--shadow-lg); padding: 18px 0 22px; max-height: 70vh; overflow-y: auto; }
.mega-list { columns: 3 240px; column-gap: 28px; list-style: none; margin: 0; padding: 0; }
.mega-list li { break-inside: avoid; }
.mega-list a { display: block; padding: 7px 8px; border-radius: 6px; color: var(--text); }
.mega-list a:hover { background: var(--brand-50); text-decoration: none; }

.drawer { position: fixed; inset: 0; z-index: 80; background: rgba(15, 27, 45, .45); }
.drawer-panel { position: absolute; top: 0; bottom: 0; left: 0; width: min(88vw, 360px); background: #fff; overflow-y: auto; padding: 8px 16px 24px; box-shadow: var(--shadow-lg); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 0 10px; border-bottom: 1px solid var(--line); }
.drawer-links, .drawer-cats { list-style: none; margin: 0; padding: 0; }
.drawer-links a, .drawer-cats a { display: block; padding: 11px 4px; border-bottom: 1px solid var(--line); color: var(--text); font-weight: 600; }
.drawer-cats a { font-weight: 400; }
.drawer-title { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 0 4px; }

@media (min-width: 900px) {
  .header-in { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "logo search actions"; gap: 24px; padding-top: 14px; padding-bottom: 14px; }
  .menu-btn { display: none; }
  .logo img { width: 160px; }
  .navbar { display: block; }
}
@media (max-width: 899px) { .hide-md { display: none !important; } }
@media (max-width: 599px) {
  .hide-sm { display: none !important; }
  .topbar .topbar-msg { display: none; }
  .topbar-in { justify-content: center; }
}

/* ---------- Основно съдържание ---------- */
.main { min-height: 50vh; padding-bottom: 32px; }
.section { margin: 28px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { margin: 0; }
.section-head a { font-weight: 600; white-space: nowrap; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.page-head { margin: 18px 0 16px; }
.page-head p { color: var(--muted); max-width: 70ch; }

.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; list-style: none; margin: 14px 0 0; padding: 0; font-size: .87rem; color: var(--muted); }
.crumbs li:not(:last-child)::after { content: "›"; margin: 0 8px; color: var(--line-strong); }
.crumbs a { color: var(--muted); }
.crumbs [aria-current] { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }

/* ---------- Начална страница ---------- */
.hero { display: grid; gap: 14px; margin-top: 18px; }
.hero-main { position: relative; border-radius: 16px; overflow: hidden; background: linear-gradient(120deg, #0a74b0 0%, #0f9bd7 55%, #2b9348 130%); color: #fff; padding: 28px 22px; min-height: 230px; display: flex; flex-direction: column; justify-content: center; }
.hero-main h1 { color: #fff; font-size: clamp(1.5rem, 1.1rem + 2vw, 2.4rem); max-width: 18ch; }
.hero-main p { color: #e6f3fb; max-width: 46ch; font-size: 1.02rem; }
.hero-search { display: flex; max-width: 560px; background: #fff; border-radius: 12px; padding: 4px; }
.hero-search input { flex: 1; min-width: 0; border: 0; padding: 0 12px; height: 46px; border-radius: 10px; color: var(--text); background: #fff; }
.hero-search input::placeholder { color: var(--muted); opacity: 1; }
.hero-search input:focus { outline: none; }
.hero-tips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; font-size: .86rem; }
.hero-tips a { color: #fff; background: rgba(255, 255, 255, .16); padding: 4px 10px; border-radius: 20px; }
.hero-tips a:hover { background: rgba(255, 255, 255, .28); text-decoration: none; }
.hero-side { display: grid; gap: 14px; }
.promo-tile { display: block; position: relative; border-radius: 16px; overflow: hidden; background: #fff; border: 1px solid var(--line); }
.promo-tile img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 760 / 300; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.35fr 1fr; } .hero-main { padding: 40px; min-height: 330px; } }

.cat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.cat-tile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 14px 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); transition: border-color .15s, box-shadow .15s; }
.cat-tile:hover { border-color: var(--brand); box-shadow: var(--shadow); text-decoration: none; color: var(--text); }
.cat-tile img { width: 84px; height: 84px; object-fit: contain; }
.cat-tile span { font-size: .9rem; font-weight: 600; line-height: 1.3; }
.cat-tile small { color: var(--muted); }

.steps { display: grid; gap: 12px; counter-reset: s; }
.steps li { list-style: none; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 14px 56px; position: relative; }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; left: 14px; top: 14px; width: 30px; height: 30px; border-radius: 50%; background: var(--brand-50); color: var(--brand-600); font-weight: 700; display: grid; place-items: center; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); padding: 0; } }

/* ---------- Карти на продукти ---------- */
.grid-products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px) { .grid-products { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } }
@media (min-width: 1000px) { .grid-products { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.with-sidebar .grid-products { }
@media (min-width: 1200px) { .grid-products.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.scroller .grid-products { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 46%); grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.scroller .card { scroll-snap-align: start; }
@media (min-width: 640px) { .scroller .grid-products { grid-auto-columns: minmax(200px, 31%); } }
@media (min-width: 1000px) { .scroller .grid-products { grid-auto-columns: calc((100% - 42px) / 4); } }

.card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .15s, border-color .15s; }
.card:hover { box-shadow: var(--shadow-lg); border-color: #d3dde8; }
.card-media { position: relative; display: block; aspect-ratio: 1 / 1; background: #fff; padding: 10px; }
.card-media img { width: 100%; height: 100%; object-fit: contain; }
.badge { position: absolute; top: 10px; left: 10px; padding: 3px 8px; border-radius: 6px; font-size: .78rem; font-weight: 700; color: #fff; }
.badge-sale { background: var(--sale); }
.fav-btn { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: var(--muted); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); }
.fav-btn:hover { color: var(--sale); }
.fav-btn[aria-pressed="true"] { color: var(--sale); }
.fav-btn[aria-pressed="true"] svg { fill: currentColor; }
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 12px; flex: 1; border-top: 1px solid var(--line); }
.card-meta { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: .76rem; }
.sku { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-title { font-size: .92rem; font-weight: 600; line-height: 1.35; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 3.7em; }
.card-title a { color: var(--text); }
.card-title a::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.card-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.card .btn-cart, .card .fav-btn { position: relative; z-index: 1; }
.card .fav-btn { position: absolute; }
.btn-cart { min-height: 38px; padding: 0 12px; background: var(--accent); border-radius: 10px; }
.btn-cart:hover { background: var(--accent-600); }
.btn-cart svg { width: 18px; height: 18px; }
@media (max-width: 420px) { .btn-cart span { display: none; } .btn-cart { padding: 0 10px; } }
.price { display: flex; flex-direction: column; line-height: 1.2; }
.price .eur { font-size: 1.12rem; font-weight: 800; color: var(--text); }
.price .bgn { font-size: .78rem; color: var(--muted); }
.price-old { font-size: .8rem; color: var(--muted); }

.stock { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; white-space: nowrap; }
.stock::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.stock-in { color: var(--accent-600); }
.stock-out { color: var(--muted); }
.stock-order { color: var(--warn); }

/* ---------- Категория: филтри ---------- */
.layout { display: grid; gap: 20px; }
@media (min-width: 1000px) { .layout { grid-template-columns: 260px minmax(0, 1fr); align-items: start; } }
.filters { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.filters h2 { font-size: .95rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 16px 0 8px; }
.filters h2:first-child { margin-top: 0; }
.filter-list { list-style: none; margin: 0; padding: 0; max-height: 320px; overflow-y: auto; }
.filter-list a { display: flex; justify-content: space-between; padding: 6px 8px; border-radius: 6px; color: var(--text); font-size: .93rem; }
.filter-list a:hover { background: var(--surface-2); text-decoration: none; }
.filter-list a[aria-current] { background: var(--brand-50); color: var(--brand-600); font-weight: 600; }
@media (max-width: 999px) {
  .filters { display: none; }
  .filters.open { display: block; position: fixed; inset: 0; z-index: 85; overflow-y: auto; border-radius: 0; padding: 16px 16px 90px; }
}
.filters-close { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
@media (min-width: 1000px) { .filters-close, .filters-btn { display: none !important; } }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.toolbar .count { color: var(--muted); }
.toolbar-right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar select { min-height: 40px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; background: #fff; border: 1px solid var(--line-strong); border-radius: 20px; color: var(--text); font-size: .88rem; }
.chip:hover { border-color: var(--brand); text-decoration: none; color: var(--text); }
.chip[aria-current] { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip svg { width: 14px; height: 14px; }
.toggle-stock { display: inline-flex; align-items: center; gap: 8px; font-size: .92rem; }
.empty { text-align: center; padding: 40px 16px; background: #fff; border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.empty svg { width: 46px; height: 46px; color: var(--muted); margin: 0 auto 10px; }

.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 24px 0 8px; }
.pager a, .pager span { min-width: 42px; height: 42px; padding: 0 10px; display: grid; place-items: center; border-radius: 10px; background: #fff; border: 1px solid var(--line); color: var(--text); font-weight: 600; }
.pager a:hover { border-color: var(--brand); text-decoration: none; }
.pager [aria-current] { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager .gap { background: none; border: 0; }

/* ---------- Продукт ---------- */
.product { display: grid; gap: 22px; margin-top: 14px; }
@media (min-width: 900px) { .product { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; } }
.gallery-main { background: #fff; border: 1px solid var(--line); border-radius: 16px; aspect-ratio: 1 / 1; display: grid; place-items: center; padding: 18px; }
.gallery-main img { max-height: 100%; width: auto; object-fit: contain; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.thumbs button { width: 72px; height: 72px; padding: 4px; border: 2px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; flex: none; }
.thumbs button[aria-current="true"] { border-color: var(--brand); }
.thumbs img { width: 100%; height: 100%; object-fit: contain; }
.product-info h1 { margin-bottom: 10px; }
.product-codes { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: .9rem; margin-bottom: 14px; }
.product-codes strong { color: var(--text); font-weight: 600; }
.buy-box { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); }
.buy-box .price .eur { font-size: 1.9rem; }
.buy-box .price .bgn { font-size: .95rem; }
.buy-box .vat-note { color: var(--muted); font-size: .82rem; margin: 2px 0 12px; }
.buy-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.buy-row .btn-lg { flex: 1; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; height: 50px; }
.qty button { width: 42px; height: 100%; border: 0; background: none; cursor: pointer; color: var(--text); display: grid; place-items: center; }
.qty input { width: 54px; height: 100%; border: 0; text-align: center; font-weight: 700; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty.sm { height: 40px; }
.qty.sm button { width: 34px; }
.qty.sm input { width: 44px; }
.buy-extra { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 14px; }
.buy-extra .link-btn, .buy-extra a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .92rem; }
.assurances { list-style: none; margin: 16px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: .92rem; }
.assurances li { display: flex; gap: 10px; align-items: center; }
.assurances svg { color: var(--brand); }
.prose { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; overflow-wrap: anywhere; min-width: 0; }
.product > *, .product-sections > *, .product-sections > div > *, .layout > *, .cart-layout > * { min-width: 0; }
.product-info h1 { overflow-wrap: anywhere; }
.prose h2 { font-size: 1.15rem; }
.prose p { margin: 0 0 .4em; }
.prose table { border-collapse: collapse; width: 100%; }
.prose td, .prose th { border: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: top; }
.prose img { height: auto; }
.spec { width: 100%; border-collapse: collapse; font-size: .94rem; }
.spec th, .spec td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.spec th { width: 40%; color: var(--muted); font-weight: 600; background: var(--surface-2); }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.tag-list li { background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; font-family: ui-monospace, Consolas, monospace; font-size: .86rem; }
.share { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.share a, .share button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--text); font-size: .88rem; cursor: pointer; }
.share a:hover, .share button:hover { border-color: var(--brand); text-decoration: none; }
.product-sections { display: grid; gap: 18px; margin-top: 26px; }
@media (min-width: 900px) { .product-sections { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; } }
.sticky-buy { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(15, 27, 45, .08); padding: 10px 16px; display: flex; gap: 10px; align-items: center; justify-content: space-between; }
@media (min-width: 900px) { .sticky-buy { display: none; } }
.has-sticky .footer { padding-bottom: 72px; }

/* ---------- Количка и поръчка ---------- */
.cart-layout { display: grid; gap: 20px; margin-top: 14px; }
@media (min-width: 960px) { .cart-layout { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } }
.cart-lines { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.cart-line { display: grid; grid-template-columns: 72px 1fr; gap: 12px; padding: 14px; border-bottom: 1px solid var(--line); }
.cart-line:last-child { border-bottom: 0; }
.cart-line img { width: 72px; height: 72px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.cart-line-title { font-weight: 600; color: var(--text); }
.cart-line-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.line-total { font-weight: 800; }
.summary { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; position: sticky; top: 140px; }
.summary dl { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 0 0 14px; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; text-align: right; font-weight: 600; }
.summary .total { font-size: 1.25rem; font-weight: 800; color: var(--text); }
.checkout-steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 16px 0; counter-reset: c; font-size: .9rem; overflow-x: auto; }
.checkout-steps li { flex: 1; min-width: 110px; padding: 9px 10px; background: #fff; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.checkout-steps li::before { counter-increment: c; content: counter(c) ". "; }
.checkout-steps [aria-current] { border-color: var(--brand); color: var(--brand-600); background: var(--brand-50); }
.checkout-steps .done { color: var(--accent-600); }
.fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: #fff; margin: 0 0 16px; }
.fieldset legend { font-weight: 700; padding: 0 6px; }
.radio-cards { display: grid; gap: 10px; }
@media (min-width: 640px) { .radio-cards { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); } }
.radio-card { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border: 2px solid var(--line); border-radius: 10px; cursor: pointer; background: #fff; }
.radio-card:has(input:checked) { border-color: var(--brand); background: var(--brand-50); }
.radio-card input { width: 18px; height: 18px; accent-color: var(--brand); }
.table { width: 100%; border-collapse: collapse; background: #fff; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.table th { font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); }
.table .num { text-align: right; white-space: nowrap; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.status { display: inline-block; padding: 3px 9px; border-radius: 20px; background: var(--brand-50); color: var(--brand-600); font-size: .82rem; font-weight: 600; }

/* ---------- Профил / вход ---------- */
.auth { max-width: 440px; margin: 28px auto; }
.account-nav { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 18px; }

/* ---------- Предимства и футър ---------- */
.usp { background: #fff; border-top: 1px solid var(--line); }
.usp-in { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; padding-top: 22px; padding-bottom: 22px; }
@media (min-width: 900px) { .usp-in { grid-template-columns: repeat(4, 1fr); } }
.usp-in div { display: grid; grid-template-columns: 40px 1fr; column-gap: 10px; align-items: center; }
.usp-in svg { grid-row: span 2; width: 32px; height: 32px; color: var(--brand); }
.usp-in strong { font-size: .95rem; }
.usp-in span { color: var(--muted); font-size: .85rem; }
.footer { background: #0f2a43; color: #c4d3e2; font-size: .92rem; }
.footer a { color: #e5eef7; }
.footer-in { display: grid; gap: 26px; padding-top: 34px; padding-bottom: 26px; }
@media (min-width: 700px) { .footer-in { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .footer-in { grid-template-columns: 1.3fr 1fr 1fr 1fr; } }
.footer h2 { color: #fff; font-size: 1rem; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.footer-col img { background: #fff; border-radius: 10px; padding: 6px; margin-bottom: 12px; }
.contact-list li { display: flex; gap: 10px; align-items: center; }
.contact-list svg { color: #6cc3f0; width: 18px; height: 18px; }
.social { display: inline-flex; gap: 8px; align-items: center; }
.footer .muted { color: #93a8bd; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); font-size: .84rem; }
.footer-bottom-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 14px; padding-bottom: 16px; }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 90; background: #0f2a43; color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); display: flex; gap: 12px; align-items: center; max-width: calc(100vw - 32px); }
.toast a { color: #8fd3ff; font-weight: 700; white-space: nowrap; }
.has-sticky .toast { bottom: 84px; }

.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 8px; }
.faq summary { cursor: pointer; padding: 14px 16px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; font-size: 1.3rem; color: var(--brand); line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 16px 14px; color: #2b3a4d; }
.brands-list { columns: 4 180px; column-gap: 24px; list-style: none; padding: 0; }
.brands-list li { break-inside: avoid; padding: 4px 0; }
.notice-db { border-left: 4px solid var(--warn); }

/* Телефони: правилата са в края, за да надделеят над общите */
@media (max-width: 599px) {
  .crumbs ol { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
  .crumbs ol::-webkit-scrollbar { display: none; }
  .crumbs [aria-current] { max-width: none; overflow: visible; }
  .gallery-main { aspect-ratio: 4 / 3; }
  .panel, .prose, .fieldset { padding: 16px; }
}

@media print {
  .topbar, .header, .usp, .footer, .sticky-buy, .fav-btn, .btn-cart { display: none !important; }
  body { background: #fff; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
