/* ==========================================================================
   pix-l.biz
   Само светла тема — сайтът е бял независимо от системната настройка
   на браузъра. Тъмната тема е премахната нарочно.
   Светла и тъмна тема. Цветовете са проверени за контраст WCAG AA
   (4.5:1 за текст, 3:1 за едър текст и границите на контролите).
   ========================================================================== */

:root {
  --bg:            #ffffff;
  --bg-soft:       #fafbfc;
  --bg-raised:     #ffffff;
  --border:        #d3d9e2;
  --border-strong: #aeb7c4;

  --text:          #14181f;   /* 16.4:1 върху --bg */
  --text-muted:    #545c6b;   /*  6.9:1 върху --bg */
  --text-inverse:  #ffffff;

  --accent:        #8b0000;   /* 10.0:1 върху --bg — тъмно червено */
  --accent-hover:  #6b0000;   /* 12.9:1 */
  --accent-soft:   #fbeaea;
  --accent-text:   #8b0000;   /* 10.0:1 — за текст/връзки */

  --ok:            #1d6b3f;
  --ok-soft:       #e4f3ea;
  --warn:          #8a5a00;
  --warn-soft:     #fdf1dc;
  --error:         #a32323;
  --error-soft:    #fdeaea;

  --focus:         #8b0000;
  --btn:           #1d6b3f;   /* бял текст върху него: 6.5:1 */
  --btn-hover:     #175733;
  --btn-edge:      #2f3a35;   /* лек тъмно сив ръб */
  --shadow:        0 1px 2px rgba(16, 24, 40, .05), 0 2px 6px rgba(16, 24, 40, .05);
  --radius:        6px;
  --radius-lg:     8px;
  --wrap:          1360px;   /* менюто е 9 елемента и иска ширина */
  --header-h:      76px;   /* по-едро лого */
}



/* Ръчният избор бие системния — и в двете посоки */


/* --------------------------------------------------------------- основа */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

html { background: var(--bg); }

body {
  margin: 0;
  background: transparent;          /* фонът е на html, снимката е отдолу */
  color: var(--text);
  font: 400 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.22; margin: 0 0 .5em; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: clamp(1.85rem, 1.2rem + 2.4vw, 2.9rem); }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.3vw, 2rem); }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 1rem; }

a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }

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

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: .5rem; top: -4rem; z-index: 100;
  background: var(--accent); color: var(--text-inverse);
  padding: .7rem 1.1rem; border-radius: var(--radius);
  font-weight: 600; text-decoration: none; transition: top .15s;
}
.skip-link:focus { top: .5rem; color: var(--text-inverse); }

main:focus { outline: none; }

.muted { color: var(--text-muted); }
.small { font-size: .875rem; }
.center { text-align: center; }

/* -------------------------------------------------------------- хедър */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  min-height: var(--header-h);
  display: flex; align-items: center; gap: 1rem;
}

.brand {
  display: flex; flex-direction: column; text-decoration: none;
  color: var(--text); line-height: 1.05;
}
.brand-mark { font-weight: 800; font-size: 1.4rem; letter-spacing: -.02em; }
.brand-mark span { color: var(--accent-text); }
.brand-sub { font-size: .7rem; color: var(--text-muted); letter-spacing: .12em; text-transform: uppercase; }

.primary-nav { margin-inline-start: auto; }
.primary-nav ul { display: flex; gap: .15rem; list-style: none; margin: 0; padding: 0; }
.primary-nav a {
  display: block; padding: .55rem .8rem; border-radius: var(--radius);
  color: var(--text); text-decoration: none; font-weight: 500; font-size: .95rem;
}
.primary-nav a:hover { background: var(--bg-soft); color: var(--text); }
.primary-nav a[aria-current="page"] {
  background: var(--accent-soft); color: var(--accent-text); font-weight: 650;
}

.header-tools { display: flex; align-items: center; gap: .4rem; }

.header-phone {
  font-weight: 650; white-space: nowrap; text-decoration: none;
  padding: .5rem .9rem; border-radius: var(--radius);
  background: var(--accent); color: var(--text-inverse); font-size: .9rem;
}
.header-phone:hover { background: var(--accent-hover); color: var(--text-inverse); }

.lang-button, .nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0;
  background: transparent; color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius);
  cursor: pointer; font: inherit; font-size: .85rem; font-weight: 650;
}
.lang-button:hover, .nav-toggle:hover {
  background: var(--bg-soft); border-color: var(--border-strong);
}


.lang-switch { position: relative; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + .4rem);
  min-width: 11rem; margin: 0; padding: .35rem; list-style: none;
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); z-index: 60;
}
.lang-menu[hidden] { display: none; }
.lang-menu a {
  display: block; padding: .5rem .7rem; border-radius: var(--radius);
  color: var(--text); text-decoration: none; font-size: .92rem;
}
.lang-menu a:hover { background: var(--bg-soft); }
.lang-menu a[aria-current="true"] { background: var(--accent-soft); color: var(--accent-text); font-weight: 650; }

.nav-toggle { display: none; }
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  content: ""; display: block; width: 18px; height: 2px;
  background: currentColor; border-radius: 2px; position: relative;
}
.nav-toggle-bar::before { position: absolute; top: -6px; }
.nav-toggle-bar::after  { position: absolute; top: 6px; }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; margin-inline-start: auto; order: 3; }
  .header-tools { order: 2; margin-inline-start: auto; }
  .header-phone { display: none; }
  .primary-nav {
    order: 4; flex-basis: 100%; margin: 0;
    display: none; padding-bottom: .75rem;
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; gap: .1rem; }
  .primary-nav a { padding: .75rem .8rem; }
  .header-inner { flex-wrap: wrap; }
}

/* -------------------------------------------------------------- бутони */

/* Бутоните са зелени със стъклен блик: светлина отгоре, тънък тъмен ръб,
   нисък профил и малък радиус. Белият текст върху #1d6b3f е 6.5:1. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .48rem 1.05rem; border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255,255,255,.26) 0%, rgba(255,255,255,.06) 48%, rgba(0,0,0,.06) 100%),
    var(--btn); 
  color: #fff;
  border: 1px solid var(--btn-edge);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.30), 0 1px 2px rgba(16,24,40,.10);
  font: inherit; font-size: .93rem; font-weight: 600; line-height: 1.35;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.btn:hover {
  background:
    linear-gradient(180deg, rgba(255,255,255,.32) 0%, rgba(255,255,255,.08) 48%, rgba(0,0,0,.05) 100%),
    var(--btn-hover);
  color: #fff;
}
.btn:active {
  background: var(--btn-hover);
  box-shadow: inset 0 1px 3px rgba(0,0,0,.24);
}
.btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.btn-outline {
  background: transparent; color: var(--accent-text);
  border-color: var(--border-strong); box-shadow: none;
}
.btn-outline:hover {
  background: var(--accent-soft); color: var(--accent-text); border-color: var(--accent);
}
.btn-small { padding: .34rem .8rem; font-size: .85rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* -------------------------------------------------------------- секции */

.section { padding: clamp(2.75rem, 5vw, 4.5rem) 0; }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 62ch; margin-bottom: 2rem; }
.section-head p { color: var(--text-muted); font-size: 1.05rem; }

.hero {
  padding: clamp(3rem, 7vw, 6rem) 0;
  background:
    radial-gradient(1100px 420px at 15% -10%, var(--accent-soft), transparent 65%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}
.hero h1 { max-width: 20ch; }
.hero p.lead { max-width: 58ch; font-size: 1.12rem; color: var(--text-muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

.page-head {
  padding: clamp(2rem, 4vw, 3.25rem) 0 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
}
.page-head p { color: var(--text-muted); max-width: 62ch; margin-bottom: 0; }

/* --------------------------------------------------------------- решетки */

.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.card {
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.4rem;
}
.card h3 { margin-bottom: .35rem; }
.card p { color: var(--text-muted); margin-bottom: 0; }

.card-link { text-decoration: none; color: inherit; display: block; transition: border-color .15s, transform .15s; }
.card-link:hover { border-color: var(--accent); transform: translateY(-2px); color: inherit; }

.card-icon {
  width: 42px; height: 42px; margin-bottom: .9rem;
  display: grid; place-items: center; border-radius: var(--radius);
  background: var(--accent-soft); color: var(--accent-text);
}
.card-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------- продукти */

.product-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.product-media {
  aspect-ratio: 4 / 3; background: var(--bg-soft);
  display: grid; place-items: center; overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-media .placeholder { color: var(--text-muted); font-size: .85rem; }
.product-body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; flex: 1; }
.product-title { font-size: 1rem; font-weight: 650; margin: 0 0 .3rem; }
.product-desc { font-size: .88rem; color: var(--text-muted); margin-bottom: .9rem; }
.product-foot { margin-top: auto; display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.price { font-size: 1.2rem; font-weight: 750; color: var(--text); }
.price-old { font-size: .9rem; color: var(--text-muted); text-decoration: line-through; margin-inline-start: .4rem; }

/* Правоъгълен хоризонтален етикет: жълто-оранжев градиент, черен ръб,
   тъмночервен надпис. Обхватът на градиента е избран така, че надписът
   да остава четим и в най-тъмния му край (4.6:1 при #e8a317). */
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .2rem .6rem; border-radius: 2px;
  font-size: .72rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; line-height: 1.25; white-space: nowrap;
  border: 1px solid #1a1a1a;
}
.badge-ok {
  background: linear-gradient(180deg, #f5c344 0%, #e8a317 100%);
  color: #8b0000;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.42);
}
.badge-warn {
  background: linear-gradient(180deg, #eceff3 0%, #dbe0e7 100%);
  color: #4a5260;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}
.badge-error { background: var(--error-soft); color: var(--error); }
.badge-info  { background: var(--accent-soft); color: var(--accent-text); }

.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.75rem; }
.chip {
  padding: .45rem .95rem; border-radius: 999px; font-size: .88rem;
  border: 1px solid var(--border); background: var(--bg-raised);
  color: var(--text); text-decoration: none;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip[aria-current="true"] {
  background: var(--accent); border-color: var(--accent);
  color: var(--text-inverse); font-weight: 650;
}

/* --------------------------------------------------------------- форми */

.form { display: grid; gap: 1.1rem; max-width: 42rem; }
.form-row { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.field { display: grid; gap: .35rem; }
.field > label { font-weight: 600; font-size: .92rem; }
.field .hint { font-size: .82rem; color: var(--text-muted); }

input[type="text"], input[type="email"], input[type="tel"], input[type="search"],
input[type="password"], select, textarea {
  width: 100%; padding: .7rem .85rem;
  background: var(--bg-raised); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  font: inherit; font-size: .97rem;
}
input:hover, select:hover, textarea:hover { border-color: var(--accent); }
textarea { min-height: 9rem; resize: vertical; }

input::placeholder, textarea::placeholder { color: var(--text-muted); opacity: 1; }

.checkbox { display: flex; align-items: flex-start; gap: .6rem; font-size: .92rem; }
.checkbox input { width: 1.1rem; height: 1.1rem; margin-top: .18rem; accent-color: var(--accent); }

.required-mark { color: var(--error); font-weight: 700; }

.notice {
  padding: .95rem 1.15rem; border-radius: var(--radius);
  border: 1px solid transparent; margin-bottom: 1.5rem;
}
.notice-ok    { background: var(--ok-soft);    border-color: var(--ok);    color: var(--ok); }
.notice-error { background: var(--error-soft); border-color: var(--error); color: var(--error); }
.notice-info  { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); }
.notice strong { color: inherit; }

.newsletter-row { display: flex; gap: .5rem; margin-bottom: .4rem; }
.newsletter-row input { flex: 1; min-width: 0; }

/* -------------------------------------------------------------- таблици */

.table-scroll { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th, table.data td {
  padding: .65rem .8rem; text-align: start;
  border-bottom: 1px solid var(--border); vertical-align: top;
}
table.data th { font-weight: 650; background: var(--bg-soft); white-space: nowrap; }
table.data tr:last-child td { border-bottom: 0; }

/* ------------------------------------------------------------ хронология */

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  position: relative; padding: 0 0 1.35rem 1.6rem;
  border-inline-start: 2px solid var(--border); margin-inline-start: .4rem;
}
.timeline li::before {
  content: ""; position: absolute; inset-inline-start: -7px; top: .35rem;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--bg);
}
.timeline li:last-child { border-inline-start-color: transparent; padding-bottom: 0; }
.timeline .when { font-size: .82rem; color: var(--text-muted); }

/* ---------------------------------------------------------------- проза */

.prose { max-width: 72ch; }
.prose h2 { margin-top: 2rem; }
.prose h3 { margin-top: 1.5rem; }
.prose ul, .prose ol { padding-inline-start: 1.3rem; }
.prose li { margin-bottom: .4rem; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; font-size: .93rem; }
.prose th, .prose td { border: 1px solid var(--border); padding: .55rem .7rem; text-align: start; }
.prose th { background: var(--bg-soft); }

/* --------------------------------------------------------------- футър */

.site-footer {
  margin-top: 4rem; padding: 3rem 0 1.5rem;
  background: var(--bg-soft); border-top: 1px solid var(--border);
}
.footer-grid {
  display: grid; gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.footer-brand { font-weight: 800; font-size: 1.2rem; margin-bottom: .25rem; }
.footer-heading { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); margin-bottom: .8rem; }
.footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.footer-list a, .footer-address a { color: var(--text); text-decoration: none; font-size: .93rem; }
.footer-list a:hover, .footer-address a:hover { color: var(--accent-text); text-decoration: underline; }
.footer-address { font-style: normal; font-size: .93rem; }
.footer-address p { margin-bottom: .4rem; }

.footer-bottom {
  margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between;
}
.footer-bottom p { margin: 0; }
.footer-langs { display: flex; flex-wrap: wrap; gap: .9rem; list-style: none; margin: 0; padding: 0; font-size: .85rem; }
.footer-langs a { color: var(--text-muted); text-decoration: none; }
.footer-langs a:hover { color: var(--accent-text); }
.footer-langs a[aria-current="true"] { color: var(--text); font-weight: 650; }

/* --------------------------------------------------------------- админ */

.admin-body { background: var(--bg-soft); }
.admin-bar {
  background: var(--bg-raised); border-bottom: 1px solid var(--border);
  padding: .75rem 0;
}
.admin-bar .wrap { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.admin-bar nav ul { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.admin-bar nav a {
  padding: .45rem .8rem; border-radius: var(--radius); font-size: .9rem;
  color: var(--text); text-decoration: none;
}
.admin-bar nav a:hover { background: var(--bg-soft); }
.admin-bar nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); font-weight: 650; }

.stat-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat { background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem; }
.stat .value { font-size: 1.8rem; font-weight: 750; line-height: 1.1; }
.stat .label { font-size: .82rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }

.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem; }
.login-card {
  width: min(100%, 24rem); background: var(--bg-raised);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 2rem; box-shadow: var(--shadow);
}

/* --------------------------------------------------------------- печат */

@media print {
  .site-header, .site-footer, .skip-link, .hero-actions, .newsletter { display: none; }
  body { background: #fff; color: #000; }
  a { text-decoration: underline; }
}

/* --------------------------------------------------------------------------
   Лого в хедъра. Едро, без рамка — бялата подложка се разтваря наляво и
   надясно, за да не изглежда като залепена кутийка (както е в корпорейта).
   -------------------------------------------------------------------------- */
.brand-logo {
  background: #fff;
  padding: 6px 22px;
  display: grid;
  place-items: center;
  height: 54px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 15%, #000 85%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 15%, #000 85%, transparent 100%);
}
.brand-logo img {
  max-height: 42px;
  max-width: 230px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.brand { display: flex; align-items: center; }

@media (max-width: 700px) {
  .brand-logo { height: 44px; padding: 4px 16px; }
  .brand-logo img { max-height: 32px; max-width: 175px; }
}

/* --------------------------------------------------------------------------
   Каталог: „Поръчай" води право към контактната форма — тук няма кошница
   и регистрация, затова го пишем ясно, но дребно.
   -------------------------------------------------------------------------- */
.catalog-note {
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: .6rem;
}
.product-card .product-order {
  margin: 0 .9rem .9rem;
  align-self: start;
}
.product-card {
  display: flex;
  flex-direction: column;
}
.product-card .product-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-card .product-foot {
  margin-top: auto;
}


/* --------------------------------------------------------------------------
   Фон: снимка на сервиза, едва загатната. Стои на fixed слой под цялото
   съдържание, за да не се повтаря при скрол и да не пипа контраста на
   текста — при 5% непрозрачност белият фон си остава бял.
   -------------------------------------------------------------------------- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url('../img/service.webp') center center / cover no-repeat;
  opacity: .05;
  pointer-events: none;
}


/* На тесни екрани снимката само шуми — махаме я. */
@media (max-width: 700px) {
  body::before { display: none; }
}

/* ==========================================================================
   КАТАЛОГ — странична лента с категории и филтри + решетка с продукти.
   Разстоянията са стегнати нарочно: на каталожна страница вертикалното
   място е скъпо, купувачът иска да види повече продукти без скрол.
   ========================================================================== */

.catalog { padding: 1.1rem 0 2rem; }

.catalog-layout {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

/* ---- странична лента ---- */
.catalog-side { display: grid; gap: .75rem; position: sticky; top: calc(var(--header-h) + .5rem); }

.side-box {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .7rem .8rem;
}
.side-title {
  font-size: .78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--text-muted);
  margin: 0 0 .5rem;
}
.cat-list { list-style: none; margin: 0; padding: 0; }
.cat-list li + li { border-top: 1px solid var(--border); }
.cat-list a {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .38rem .1rem; font-size: .88rem; color: var(--text);
  text-decoration: none; line-height: 1.3;
}
.cat-list a:hover { color: var(--accent-text); }
.cat-list a[aria-current="true"] { color: var(--accent-text); font-weight: 650; }
.cat-count {
  font-size: .72rem; color: var(--text-muted);
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius-pill, 999px); padding: 0 .38rem; flex: none;
}

.side-label { display: block; font-size: .78rem; color: var(--text-muted); margin-bottom: .3rem; }
.price-row { display: flex; align-items: center; gap: .35rem; margin-bottom: .55rem; }
.price-row input {
  width: 100%; min-width: 0; padding: .32rem .45rem; font: inherit; font-size: .85rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg); color: var(--text);
}
.side-check {
  display: flex; align-items: center; gap: .45rem;
  font-size: .86rem; margin-bottom: .6rem; cursor: pointer;
}
.side-actions { display: flex; gap: .4rem; }

/* ---- лента над решетката ---- */
.catalog-head { margin-bottom: .7rem; }
.catalog-head h1 { font-size: 1.5rem; margin: 0 0 .15rem; }
.catalog-head .catalog-note { margin-top: .15rem; }

.catalog-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .6rem; margin-bottom: .9rem;
  padding-bottom: .7rem; border-bottom: 1px solid var(--border);
}
.bar-search { display: flex; gap: .35rem; flex: 1 1 18rem; max-width: 26rem; }
.bar-search input {
  flex: 1; min-width: 0; padding: .38rem .6rem; font: inherit; font-size: .9rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg); color: var(--text);
}
.bar-right { display: flex; align-items: center; gap: .6rem; }
.bar-count { font-size: .85rem; color: var(--text-muted); white-space: nowrap; }
.bar-right select {
  padding: .35rem .5rem; font: inherit; font-size: .85rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg); color: var(--text);
}

/* ---- решетката ---- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(198px, 1fr));
  gap: .75rem;
}
.catalog-empty { padding: 2rem 0; }

.pager {
  display: flex; align-items: center; justify-content: center; gap: .6rem;
  margin-top: 1.2rem;
}
.pager-now { font-size: .88rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
  .catalog-layout { grid-template-columns: 1fr; }
  .catalog-side { position: static; grid-template-columns: 1fr 1fr; display: grid; }
}
@media (max-width: 560px) {
  .catalog-side { grid-template-columns: 1fr; }
}

/* ==========================================================================
   ГОРНО МЕНЮ — главни букви и осезаема реакция при посочване.
   Подчертаването расте от центъра, а не се появява наведнъж — движението
   е кратко (.18s), за да води окото, без да бави клика.
   ========================================================================== */
.primary-nav ul { display: flex; gap: .1rem; list-style: none; margin: 0; padding: 0; }

.primary-nav a {
  position: relative;
  display: block;
  padding: .5rem .7rem;
  font-size: .82rem;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  border-radius: var(--radius);
  transition: color .16s ease, background-color .16s ease;
}
.primary-nav a::after {
  content: '';
  position: absolute;
  left: 50%; right: 50%; bottom: .22rem;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: left .18s ease, right .18s ease;
}
.primary-nav a:hover,
.primary-nav a:focus-visible { color: var(--accent-text); background: var(--accent-soft); }
.primary-nav a:hover::after,
.primary-nav a:focus-visible::after { left: .7rem; right: .7rem; }

.primary-nav a[aria-current="page"] { color: var(--accent-text); }
.primary-nav a[aria-current="page"]::after { left: .7rem; right: .7rem; }

@media (prefers-reduced-motion: reduce) {
  .primary-nav a::after { transition: none; }
}

/* ---- превключвател на езика: знаме + код ---- */
.lang-button { display: inline-flex; align-items: center; gap: .35rem; }
.lang-button .flag { width: 21px; height: 15px; display: block; border-radius: 1px; }
.lang-button .lang-code { font-size: .78rem; font-weight: 650; letter-spacing: .04em; }
.lang-menu a { display: flex; align-items: center; gap: .5rem; }
.lang-menu .flag { width: 21px; height: 15px; flex: none; border-radius: 1px; }

/* ==========================================================================
   НАЧАЛНА СТРАНИЦА — каталожна, без рекламен банер.
   Разстоянията са стегнати: над сгъвката трябва да се вижда стока, а не
   празно място.
   ========================================================================== */
.home-cats { padding: 1.1rem 0 .4rem; }
.home-row  { padding: 1.1rem 0; }
.home-row-soft { background: var(--bg-soft); border-block: 1px solid var(--border); }

.row-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; margin-bottom: .6rem;
}
.row-head h2 { font-size: 1.15rem; margin: 0; }
.row-more {
  font-size: .84rem; font-weight: 650; color: var(--accent-text);
  text-decoration: none; white-space: nowrap;
}
.row-more:hover { text-decoration: underline; }

.cat-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: .5rem;
}
.cat-tile {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .55rem .7rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text); text-decoration: none;
  font-size: .88rem; font-weight: 600; line-height: 1.3;
  transition: border-color .16s ease, color .16s ease, background-color .16s ease;
}
.cat-tile:hover {
  border-color: var(--accent);
  color: var(--accent-text);
  background: var(--accent-soft);
}
.cat-tile-count {
  flex: none; font-size: .72rem; font-weight: 600; color: var(--text-muted);
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 999px; padding: 0 .38rem;
}

/* ---- стягане на вертикалното място в целия сайт ---- */
.section { padding: 1.4rem 0; }
.section-head { margin-bottom: .8rem; }
.page-head { padding: 1rem 0 .6rem; }
.page-head h1 { margin-bottom: .2rem; }
.prose > * + * { margin-top: .7rem; }

/* ---- подреждане в долния ред на картата ---- */
.product-card .product-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: .5rem; flex-wrap: wrap;
  padding-top: .45rem; margin-top: .5rem;
  border-top: 1px solid var(--border);
}
.product-card .price { font-size: 1.02rem; font-weight: 700; color: var(--accent-text); }
.product-card .product-title { font-size: .92rem; line-height: 1.35; margin: 0 0 .25rem; }
.product-card .product-title a { color: var(--text); text-decoration: none; }
.product-card .product-title a:hover { color: var(--accent-text); }
.product-card .product-body { padding: .6rem .7rem .2rem; }
.product-card .product-order { margin: .55rem .7rem .7rem; }

/* ==========================================================================
   Долен ред на картата: наличност и „Поръчай" един до друг.
   Еднаква височина и еднакъв радиус — иначе двата елемента се карат.
   ========================================================================== */
.product-cta {
  display: flex; align-items: stretch; gap: .4rem;
  margin: .5rem .7rem .7rem;
}
.product-cta .badge {
  border-radius: var(--radius);      /* леко заоблени, като бутона */
  padding: .3rem .55rem;
  flex: 0 0 auto;
}
.product-cta .product-order {
  margin: 0;
  flex: 1 1 auto;
  border-radius: var(--radius);
}
.product-card .product-foot { border-top: none; padding-top: 0; margin-top: .35rem; }

/* ==========================================================================
   Лентата с търсене и подредба над решетката.
   ========================================================================== */
.catalog-bar {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .55rem .7rem;
  box-shadow: var(--shadow);
}
.bar-search input {
  border-radius: var(--radius);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.bar-search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.bar-right select {
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .16s ease;
}
.bar-right select:hover { border-color: var(--border-strong); }
.bar-right select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.bar-count {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .2rem .5rem;
  font-variant-numeric: tabular-nums;
}

/* Странична лента — по-ясно отделени групи */
.side-box { box-shadow: var(--shadow); }
.side-title {
  padding-bottom: .35rem;
  border-bottom: 1px solid var(--border);
}

/* ==========================================================================
   МОБИЛНИ ПОПРАВКИ
   Сайтът е респонсив с един комплект шаблони — тук само се коригира това,
   което новите елементи чупят на тесен екран.
   ========================================================================== */

/* Пръстът иска поне 44px височина. btn-small беше правен за мишка. */
@media (hover: none) and (pointer: coarse) {
  .btn { min-height: 44px; padding-block: .6rem; }
  .btn-small { min-height: 40px; padding-block: .5rem; }
  .cat-list a { padding-block: .6rem; }
  .lang-menu a { padding-block: .6rem; }
  .primary-nav a { padding-block: .7rem; }
}

@media (max-width: 700px) {
  /* Решетката слиза до две колони; 198px не се събират на 320px екран. */
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .55rem; }
  .cat-tiles    { grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: .4rem; }

  /* Лентата с търсене и подредба се разделя на два реда. */
  .catalog-bar { flex-direction: column; align-items: stretch; gap: .5rem; }
  .bar-search  { max-width: none; }
  .bar-right   { justify-content: space-between; }
  .bar-right select { flex: 1; min-width: 0; }

  .catalog-head h1 { font-size: 1.25rem; }
  .row-head h2 { font-size: 1.05rem; }
}

@media (max-width: 430px) {
  /* Бейджът и бутонът не се събират един до друг — слизат един под друг. */
  .product-cta { flex-direction: column; align-items: stretch; gap: .3rem; }
  .product-cta .badge { align-self: flex-start; }
  .product-cta .product-order { text-align: center; }
}

@media (max-width: 360px) {
  /* Най-тесните телефони: една колона, за да не се реже името на продукта. */
  .product-grid { grid-template-columns: 1fr; }
  .cat-tiles    { grid-template-columns: 1fr; }
}

/* Дългите имена без интервали (кодове, артикулни номера) не бива да
   разпъват картата встрани. */
.product-title a, .cat-tile-name { overflow-wrap: anywhere; }

/* Нищо не бива да предизвиква хоризонтален скрол на цялата страница. */
html, body { overflow-x: hidden; }
.admin-table, .dtbl { display: block; overflow-x: auto; }

/* ==========================================================================
   МОБИЛЕН ИНТЕРФЕЙС (templates/mobile/)
   Отделен изглед, не свит десктоп: навигацията е долна лента под палеца,
   съдържанието е в една колона, филтрите са прибрани в чекмедже.
   Правилата важат само за .m-body, за да не текат в десктопния изглед.
   ========================================================================== */
.m-body {
  margin: 0;
  padding-bottom: calc(58px + env(safe-area-inset-bottom));  /* място за лентата */
  background: var(--bg);
  color: var(--text);
}

/* ---- хедър ---- */
.m-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .4rem .6rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.m-brand img { display: block; max-height: 30px; width: auto; }
.m-header-tools { display: flex; align-items: center; gap: .35rem; }
.m-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; flex: none;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg); color: var(--text); text-decoration: none;
}
.m-icon-btn svg { width: 21px; height: 21px; }
.m-icon-btn .flag { width: 22px; height: 16px; display: block; border-radius: 1px; }

.m-main { padding: 0; }

/* ---- секции ---- */
.m-sec { padding: .8rem .7rem; }
.m-sec-soft { background: var(--bg-soft); border-block: 1px solid var(--border); }
.m-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; }
.m-sec-head a { font-size: .84rem; font-weight: 650; color: var(--accent-text); text-decoration: none; }
.m-sec-title { font-size: 1.02rem; margin: 0 0 .5rem; }

/* ---- категории ---- */
.m-cats { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.m-cats a {
  display: flex; align-items: center; justify-content: space-between; gap: .4rem;
  min-height: 46px; padding: .5rem .6rem;
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .85rem; font-weight: 600; line-height: 1.25;
  color: var(--text); text-decoration: none;
}
.m-cats a:active { background: var(--accent-soft); border-color: var(--accent); }

/* ---- решетка с продукти ---- */
.m-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
@media (max-width: 340px) { .m-grid, .m-cats { grid-template-columns: 1fr; } }

.m-card {
  display: flex; flex-direction: column;
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.m-card-media {
  display: grid; place-items: center;
  aspect-ratio: 4 / 3; background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}
.m-card-media img { width: 100%; height: 100%; object-fit: contain; }
.m-card-ph { font-size: .72rem; color: var(--text-muted); letter-spacing: .04em; }
.m-card-body { display: flex; flex-direction: column; gap: .3rem; padding: .5rem .55rem .6rem; flex: 1; }
.m-card-body h3 { font-size: .84rem; line-height: 1.3; margin: 0; overflow-wrap: anywhere; }
.m-card-body h3 a { color: var(--text); text-decoration: none; }
.m-card-price { margin: 0; font-size: .98rem; font-weight: 700; color: var(--accent-text); }
.m-card-cta { display: flex; flex-direction: column; gap: .3rem; margin-top: auto; }
.m-card-cta .badge { align-self: flex-start; }
.m-card-cta .btn { justify-content: center; }

/* ---- каталог: търсене и филтри ---- */
.m-cat-head { padding: .8rem .7rem .3rem; }
.m-cat-head h1 { font-size: 1.2rem; margin: 0 0 .2rem; }

.m-search { display: flex; gap: .35rem; padding: 0 .7rem .6rem; }
.m-search input {
  flex: 1; min-width: 0; min-height: 42px; padding: .4rem .6rem;
  font: inherit; font-size: 16px;   /* под 16px iOS сам увеличава страницата */
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg); color: var(--text);
}

.m-filters { margin: 0 .7rem .7rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-raised); }
.m-filters > summary {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  min-height: 44px; padding: .5rem .7rem;
  font-size: .9rem; font-weight: 650; cursor: pointer; list-style: none;
}
.m-filters > summary::-webkit-details-marker { display: none; }
.m-found { font-size: .8rem; font-weight: 500; color: var(--text-muted); }
.m-filter-form { padding: 0 .7rem .7rem; display: grid; gap: .5rem; }
.m-label { font-size: .78rem; font-weight: 600; color: var(--text-muted); }
.m-filter-form select,
.m-price-row input {
  width: 100%; min-height: 42px; padding: .4rem .55rem;
  font: inherit; font-size: 16px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg); color: var(--text);
}
.m-price-row { display: flex; align-items: center; gap: .4rem; }
.m-check { display: flex; align-items: center; gap: .5rem; min-height: 42px; font-size: .9rem; }
.m-filter-actions { display: flex; gap: .4rem; }
.m-filter-actions .btn { flex: 1; justify-content: center; }

.m-pager { display: flex; align-items: center; justify-content: center; gap: .7rem; padding: 1rem .7rem; }
.m-empty { padding: 2rem .7rem; }

/* ---- долна лента ---- */
.m-tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--bg); border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}
.m-tabs a {
  display: flex; align-items: center; justify-content: center;
  min-height: 52px; padding: .3rem .2rem;
  font-size: .68rem; font-weight: 650; letter-spacing: .02em; text-transform: uppercase;
  color: var(--text-muted); text-decoration: none; text-align: center; line-height: 1.15;
  border-top: 2px solid transparent;
}
.m-tabs a[aria-current="page"] { color: var(--accent-text); border-top-color: var(--accent); }

/* ---- футър ---- */
.m-footer { padding: 1rem .7rem 1.2rem; border-top: 1px solid var(--border); background: var(--bg-soft); font-size: .85rem; }
.m-footer p { margin: 0 0 .35rem; }
.m-foot-brand { font-weight: 700; }
.m-foot-links a, .m-switch { color: var(--accent-text); }
.m-switch { display: inline-block; margin-top: .5rem; font-weight: 650; }

/* ==========================================================================
   Хедърът побира 9 точки в менюто. Отстоянията са стегнати, а самото меню
   получава правото да се свива преди логото и телефона.
   ========================================================================== */
.header-inner { gap: .6rem; }
.primary-nav { min-width: 0; }
.primary-nav ul { flex-wrap: nowrap; }
.primary-nav a { padding: .5rem .48rem; font-size: .77rem; letter-spacing: .04em; white-space: nowrap; }
.primary-nav a::after { bottom: .18rem; }
.primary-nav a:hover::after,
.primary-nav a:focus-visible::after,
.primary-nav a[aria-current="page"]::after { left: .48rem; right: .48rem; }

/* Телефонът отстъпва пръв, ако мястото свърши — той е и в футъра. */
@media (max-width: 1200px) { .header-phone { display: none; } }

/* Между 960 и 1100 менюто диша по-трудно — още малко стягане. */
@media (max-width: 1100px) and (min-width: 961px) {
  .primary-nav a { padding-inline: .38rem; font-size: .73rem; letter-spacing: .03em; }
  .brand-logo { padding-inline: 14px; }
  .brand-logo img { max-height: 34px; max-width: 190px; }
}

/* ==========================================================================
   Бутонът за език: същата височина и радиус като кутията с телефона,
   въздух около знамето и стъклен блик — от едно семейство са.
   ========================================================================== */
.lang-button {
  width: auto;
  min-height: 38px;
  padding: .42rem .6rem;
  gap: .4rem;
  background:
    linear-gradient(180deg, rgba(255,255,255,.85) 0%, rgba(240,242,246,.9) 100%);
  border: 1px solid var(--border-strong);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 1px 2px rgba(16,24,40,.07);
}
.lang-button:hover {
  background:
    linear-gradient(180deg, rgba(255,255,255,.95) 0%, rgba(233,237,243,.95) 100%);
  border-color: var(--accent);
}
.lang-button:active { box-shadow: inset 0 1px 3px rgba(16,24,40,.16); }
.lang-button .flag { border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.10); }
.lang-button .lang-code { color: var(--text); }

.header-phone { min-height: 38px; display: inline-flex; align-items: center; }

/* Мобилният бутон за език — същото семейство, но квадратен като другите. */
.m-icon-btn.lang-button {
  width: 42px; padding: 0; justify-content: center;
}

/* ==========================================================================
   ВХОД В АДМИНИСТРАЦИЯТА
   Една карта в средата, нищо друго. Снимката на сервиза стои отзад силно
   приглушена — да се усеща чия е системата, без да пречи на четенето.
   ========================================================================== */
.login-body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem 1rem;
  /* Бял фон — логото е черно и трябва да стои на чисто, без снимка отзад. */
  background: #fff;
  color: var(--text);
  font: 400 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.login-shell { width: 100%; max-width: 380px; }

.login-card {
  display: grid;
  gap: .85rem;
  padding: 1.9rem 1.7rem 1.5rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 2px rgba(16,24,40,.06), 0 10px 34px rgba(16,24,40,.10);
}

.login-logo {
  display: block;
  height: 34px; width: auto;
  margin: 0 auto .4rem;
}

.login-card h1 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: .01em;
}
.login-sub {
  margin: -.5rem 0 .3rem;
  font-size: .82rem;
  color: var(--text-muted);
  text-align: center;
}

.login-error {
  margin: 0;
  padding: .55rem .7rem;
  font-size: .86rem;
  color: #8b0000;
  background: var(--error-soft);
  border: 1px solid #f0c4c4;
  border-left: 3px solid var(--error);
  border-radius: var(--radius);
}

.login-field { display: grid; gap: .3rem; }
.login-field label {
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.login-field input {
  width: 100%;
  min-height: 42px;
  padding: .5rem .7rem;
  font: inherit;
  font-size: 16px;                 /* под 16px iOS увеличава страницата */
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.login-field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.login-submit {
  width: 100%;
  justify-content: center;
  min-height: 44px;
  margin-top: .25rem;
  font-size: .95rem;
}

.login-foot {
  margin: .3rem 0 0;
  padding-top: .8rem;
  border-top: 1px solid var(--border);
  font-size: .74rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
}

/* ==========================================================================
   ПРОДУКТОВИ КАРТИ — окончателна подредба.
   Правилата дотук се натрупаха на пластове и се караха помежду си:
   .product-body имаше свой отстъп, а .product-cta — собствени полета,
   затова бутонът излизаше извън рамката. Тук всичко се води от едно място.
   ========================================================================== */
.product-grid { grid-template-columns: repeat(auto-fill, minmax(216px, 1fr)); gap: .8rem; }

.product-card {
  display: flex;
  flex-direction: column;
  min-width: 0;                     /* иначе дълго име разпъва колоната */
  overflow: hidden;                 /* нищо не излиза извън рамката */
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.product-card .product-body {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  flex: 1;
  min-width: 0;
  padding: .7rem .75rem .75rem;     /* единственият отстъп в картата */
}

.product-card .product-title { margin: 0; font-size: .92rem; line-height: 1.35; }
.product-card .product-foot {
  margin: 0; padding: 0; border-top: none;
  display: flex; align-items: baseline; gap: .4rem;
}
.product-card .price { font-size: 1.05rem; font-weight: 700; color: var(--accent-text); }

/* Наличност и бутон: един ред, центрирани, без собствени полета. */
.product-card .product-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  margin: .15rem 0 0;               /* отстъпът идва от .product-body */
  min-width: 0;
}
.product-card .product-cta .badge {
  flex: 0 0 auto;
  padding: .26rem .5rem;
  font-size: .68rem;
}
.product-card .product-cta .product-order {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  justify-content: center;
  padding: .34rem .6rem;            /* леко смалени спрямо общия бутон */
  font-size: .82rem;
  min-height: 32px;
}

@media (max-width: 700px) {
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(164px, 1fr)); gap: .6rem; }
}
@media (max-width: 430px) {
  /* Под тази ширина двата елемента не се събират един до друг. */
  .product-card .product-cta { flex-direction: column; align-items: stretch; gap: .3rem; }
  .product-card .product-cta .badge { align-self: center; }
}
@media (max-width: 360px) {
  .product-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   АДМИНИСТРАЦИЯ — обвивка със странична лента.
   Панелът дотук беше една лента с връзки върху празна страница. Тук получава
   собствена рамка: тъмна лента вляво, заглавна лента отгоре, съдържание в
   карти. Всичко е в .adm, за да не тече в публичния сайт.
   ========================================================================== */
.adm {
  margin: 0;
  background: var(--bg-soft);
  color: var(--text);
  font: 400 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.adm-shell { display: flex; min-height: 100vh; }

/* ---- странична лента ---- */
.adm-side {
  width: 232px; flex: none;
  position: fixed; inset: 0 auto 0 0; z-index: 1000;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #191c25 0%, #0f1116 100%);
  color: #c7ccd6;
  box-shadow: 2px 0 18px rgba(0,0,0,.16);
  transition: transform .22s ease;
}
.adm-brand { padding: 14px 0 13px; border-bottom: 1px solid rgba(255,255,255,.06); }
.adm-logo {
  /* Знакът е черен: стои на бяла подложка, която се разтваря към краищата. */
  display: flex; align-items: center; justify-content: center;
  height: 44px; padding: 6px 18px; background: #fff;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16%, #000 84%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 16%, #000 84%, transparent 100%);
}
.adm-logo img { max-height: 26px; max-width: 150px; object-fit: contain; display: block; }

.adm-nav {
  flex: 1; overflow-y: auto; padding: 10px 10px 16px;
  display: flex; flex-direction: column; gap: 1px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.adm-nav::-webkit-scrollbar { width: 0; }
.adm-link {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: var(--radius);
  color: #aab0bd; text-decoration: none;
  font-size: 13.5px; font-weight: 600; line-height: 1.3;
  border-left: 2px solid transparent;
  transition: background-color .16s ease, color .16s ease;
}
.adm-link svg { width: 18px; height: 18px; flex: none; }
.adm-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.adm-link.active { background: rgba(200,30,45,.16); color: #fff; border-left-color: #8b0000; }
.adm-link.active svg { color: #ff7480; }
.adm-side-foot {
  padding: 12px 16px; font-size: 12px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.adm-side-foot a { color: #7a8291; text-decoration: none; }
.adm-side-foot a:hover { color: #fff; }

/* ---- дясна колона ---- */
.adm-main { flex: 1; margin-left: 232px; min-width: 0; display: flex; flex-direction: column; }
.adm-top {
  height: 72px; padding: 14px 22px 0;
  position: sticky; top: 0; z-index: 800;
  display: flex; align-items: center; gap: 14px;
  background: #fff; border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(16,24,40,.04);
}
/* Горните 14px са в тъмното на лентата — двете страни свършват на една линия. */
.adm-top::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 14px;
  background: linear-gradient(180deg, #191c25 0%, #0f1116 100%);
}
.adm-top-title { font-size: 15px; font-weight: 700; }
.adm-top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.adm-user { font-size: 13px; font-weight: 650; color: var(--text-muted); }
.adm-avatar {
  width: 32px; height: 32px; border-radius: 999px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #8b0000, #6b0000);
  color: #fff; font-weight: 700; font-size: 13px;
}
.adm-burger { display: none; background: none; border: none; font-size: 21px; cursor: pointer; color: var(--text); }

.adm-content { padding: 20px 22px 40px; max-width: 1400px; width: 100%; }
.adm-content h1 { font-size: 1.35rem; margin: 0 0 .2rem; }
.adm-content > p.muted { margin-top: 0; }

/* ---- съобщения ---- */
.adm-flash {
  padding: .6rem .85rem; margin-bottom: .8rem;
  border-radius: var(--radius); font-size: .9rem;
  border: 1px solid var(--border); border-left-width: 3px;
}
.adm-flash-success { background: var(--ok-soft);    border-left-color: var(--ok);    color: #12693a; }
.adm-flash-error   { background: var(--error-soft); border-left-color: var(--error); color: #8b0000; }

/* ---- карти, ленти, таблици ---- */
.admin-card {
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1rem 1.1rem 1.2rem; margin-bottom: 1rem;
}
.admin-card > h2 {
  font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-muted); margin: 0 0 .8rem;
  padding-bottom: .45rem; border-bottom: 1px solid var(--border);
}
.admin-bar {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .55rem .7rem; margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.admin-bar input[type="search"], .admin-bar input[type="text"] {
  min-height: 36px; padding: .35rem .6rem; font: inherit; font-size: .9rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg); color: var(--text); min-width: 12rem;
}
.admin-check { display: inline-flex; align-items: center; gap: .4rem; font-size: .88rem; }

.admin-table {
  width: 100%; border-collapse: collapse; font-size: .89rem;
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.admin-table thead th {
  background: var(--bg-soft); text-align: left; padding: .55rem .7rem;
  font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--text-muted); border-bottom: 1px solid var(--border); white-space: nowrap;
}
.admin-table td { padding: .5rem .7rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: var(--bg-soft); }
.admin-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.admin-table .small { font-size: .76rem; }

.thumb {
  width: 46px; height: 46px; object-fit: contain; display: block;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius);
}
.thumb-empty { display: grid; place-items: center; color: var(--text-muted); font-size: .8rem; }

.admin-form { display: grid; gap: .7rem; }
.admin-form .field { display: grid; gap: .25rem; }
.admin-form label { font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.admin-form input[type="text"], .admin-form input[type="file"], .admin-form textarea {
  width: 100%; padding: .45rem .6rem; font: inherit; font-size: .92rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg); color: var(--text);
}
.admin-form textarea { resize: vertical; min-height: 7rem; }

.img-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1rem; }
.img-item { margin: 0; width: 148px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--bg); }
.img-item.is-main { border-color: var(--ok); }
.img-item img { width: 100%; height: 108px; object-fit: contain; display: block; background: var(--bg-soft); }
.img-item figcaption { display: flex; gap: .3rem; padding: .35rem; border-top: 1px solid var(--border); }

.adm-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 999; }
.adm-backdrop.show { display: block; }

@media (max-width: 980px) {
  .adm-side { transform: translateX(-100%); }
  .adm-side.open { transform: translateX(0); }
  .adm-main { margin-left: 0; }
  .adm-burger { display: block; }
  .adm-content { padding: 16px 14px 40px; }
}



/* ==========================================================================
   МАЛКА КАРТА ПОД КОНТАКТИТЕ
   Същата карта като на страницата за поддръжка. Държи се малка — тя е
   ориентир, не главното съдържание на страницата.
   ========================================================================== */
.map-section { padding-top: .4rem; }
.map-title { font-size: 1.05rem; margin: 0 0 .55rem; }

.map-small {
  max-width: 560px;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-soft);
  box-shadow: var(--shadow);
}
.map-small iframe { width: 100%; height: 100%; border: 0; display: block; }

.map-under {
  max-width: 560px;
  margin: .5rem 0 0;
  font-size: .84rem;
  color: var(--text-muted);
}
.map-under a { color: var(--accent-text); font-weight: 650; }

@media (max-width: 700px) {
  .map-small { max-width: none; aspect-ratio: 4 / 3; }
  .map-under { max-width: none; }
}

/* ==========================================================================
   ОБЕМ НА КАРТИТЕ
   Сянката е на три слоя: тънка контактна линия точно под ръба, къс
   среден слой и широк разсеян, който гасне надолу. Така ръбът остава
   ясен, а картата се отделя от фона, без сянката да личи като петно.
   Отрицателният spread на последния слой я прибира навътре — иначе на
   бял фон се вижда като ореол.
   ========================================================================== */
:root {
  --lift:       0 1px 1px rgba(16,24,40,.05),
                0 2px 4px -1px rgba(16,24,40,.06),
                0 6px 14px -5px rgba(16,24,40,.10);
  --lift-hover: 0 1px 1px rgba(16,24,40,.06),
                0 3px 6px -1px rgba(16,24,40,.08),
                0 10px 22px -6px rgba(16,24,40,.14);
}

.card,
.product-card,
.cat-tile,
.side-box,
.catalog-bar,
.admin-card,
.admin-bar,
.admin-table,
.map-small,
.m-card,
.m-cats a,
.m-filters,
.img-item {
  box-shadow: var(--lift);
}

/* При посочване сянката се разтваря малко повече — картата „идва напред",
   без да подскача. Подскокът е първото, което издава шаблонен дизайн. */
.card,
.product-card,
.cat-tile,
.m-card,
.m-cats a {
  transition: box-shadow .18s ease, border-color .18s ease;
}
.card:hover,
.product-card:hover,
.cat-tile:hover,
.m-cats a:hover {
  box-shadow: var(--lift-hover);
}

/* Логото в тъмната лента няма нужда от сянка — фонът вече е тъмен. */
.adm-logo, .brand-logo { box-shadow: none; }

@media (prefers-reduced-motion: reduce) {
  .card, .product-card, .cat-tile, .m-card, .m-cats a { transition: none; }
}

/* ==========================================================================
   НАЧАЛНА СТРАНИЦА — представителна, без повторение на менюто.
   Категорийните плочки паднаха: те дублираха навигацията на каталога.
   Отгоре стои кратка лента, която казва с какво се занимава фирмата, после
   веднага стоката.
   ========================================================================== */
.intro-strip {
  padding: 1.2rem 0 1.1rem;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}
.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 1.4rem;
  align-items: center;
}
.intro-lead h1 { font-size: 1.42rem; line-height: 1.25; margin: 0 0 .35rem; }
.intro-lead p { margin: 0; color: var(--text-muted); font-size: .95rem; }

.intro-points { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.intro-points li {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: .6rem;
  align-items: baseline;
  padding: .4rem .6rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  font-size: .87rem;
}
.intro-points strong {
  font-size: .74rem; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--accent-text);
}
.intro-points span { color: var(--text-muted); line-height: 1.4; }

.row-sub { margin: -.35rem 0 .7rem; color: var(--text-muted); font-size: .9rem; }

/* Представителните карти носят текст, не действие — по-тих ръб от
   продуктовите, за да не спорят с тях за вниманието. */
.card-flat { padding: .9rem 1rem; }
.card-flat h3 { font-size: .98rem; margin: 0 0 .3rem; }
.card-flat h3 a { color: var(--text); text-decoration: none; }
.card-flat h3 a:hover { color: var(--accent-text); }
.card-flat p { margin: 0; font-size: .88rem; color: var(--text-muted); line-height: 1.5; }

/* Затваряща карта с телефоните — страницата свършва с действие. */
.contact-card {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 1.1rem 1.2rem;
}
.contact-card h2 { font-size: 1.1rem; margin: 0 0 .2rem; }
.contact-card p { margin: 0; color: var(--text-muted); font-size: .9rem; }
.contact-card-actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.contact-phone {
  font-weight: 700; font-size: .95rem; color: var(--accent-text);
  text-decoration: none; white-space: nowrap;
}
.contact-phone:hover { text-decoration: underline; }

@media (max-width: 860px) {
  .intro-grid { grid-template-columns: 1fr; gap: .9rem; }
  .intro-lead h1 { font-size: 1.25rem; }
}
@media (max-width: 560px) {
  .intro-points li { grid-template-columns: 1fr; gap: .1rem; }
  .contact-card { flex-direction: column; align-items: stretch; }
  .contact-card-actions { justify-content: space-between; }
}

/* ==========================================================================
   ПРОДУКТОВА СТРАНИЦА
   Дотук беше обща двуколонна решетка с inline стилове — оттам идваше
   грубият вид. Тук снимката и блокът за поръчка са отделни, а данните
   слизат под тях, за да не се борят за вниманието.
   ========================================================================== */
.pd { padding: .9rem 0 2.2rem; }

.crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: .35rem;
  font-size: .82rem; color: var(--text-muted); margin-bottom: .8rem;
}
.crumbs a { color: var(--text-muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent-text); text-decoration: underline; }
.crumbs-now { color: var(--text); font-weight: 600; }

.pd-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.6rem;
  align-items: start;
}

/* ---- галерия ---- */
.pd-figure {
  aspect-ratio: 4 / 3;
  display: grid; place-items: center;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--lift);
  overflow: hidden;
}
.pd-figure img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.pd-ph { font-size: .8rem; letter-spacing: .06em; color: var(--text-muted); }

.pd-thumbs { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.pd-thumb {
  width: 62px; height: 62px; padding: .2rem;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  cursor: pointer; display: grid; place-items: center;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.pd-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pd-thumb:hover { border-color: var(--border-strong); }
.pd-thumb.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }

/* ---- дясна колона ---- */
.pd-info h1 { font-size: 1.4rem; line-height: 1.3; margin: 0 0 .5rem; }

.pd-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .7rem; }
.pd-chip {
  display: inline-flex; align-items: center;
  padding: .18rem .5rem; border-radius: var(--radius);
  background: var(--bg-soft); border: 1px solid var(--border);
  font-size: .74rem; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .03em;
}

.pd-lead { margin: 0 0 .9rem; color: var(--text-muted); font-size: .95rem; line-height: 1.55; }

/* Блокът за поръчка е обособен — цената и действието стоят заедно. */
.pd-buy {
  padding: .9rem 1rem 1rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--lift);
  margin-bottom: 1rem;
}
.pd-price { display: flex; align-items: baseline; gap: .35rem; margin-bottom: .7rem; }
.pd-price strong {
  font-size: 1.75rem; font-weight: 700; line-height: 1;
  color: var(--accent-text); font-variant-numeric: tabular-nums;
}
.pd-cur { font-size: .95rem; font-weight: 650; color: var(--accent-text); }
.pd-price .price-old { margin-left: .3rem; font-size: .9rem; }

.pd-order { width: 100%; justify-content: center; min-height: 42px; font-size: .95rem; }
.pd-note { margin: .5rem 0 0; font-size: .78rem; color: var(--text-muted); }

.pd-contact {
  display: flex; flex-wrap: wrap; gap: .8rem;
  margin-top: .7rem; padding-top: .7rem;
  border-top: 1px solid var(--border);
}
.pd-contact a {
  font-size: .9rem; font-weight: 700; color: var(--accent-text);
  text-decoration: none; white-space: nowrap;
}
.pd-contact a:hover { text-decoration: underline; }

/* ---- кратки данни ---- */
.pd-facts {
  display: grid; grid-template-columns: auto 1fr;
  gap: .1rem .9rem; margin: 0; font-size: .88rem;
}
.pd-facts dt {
  color: var(--text-muted); padding: .3rem 0;
  border-bottom: 1px solid var(--border);
}
.pd-facts dd {
  margin: 0; padding: .3rem 0; font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.pd-facts dt:last-of-type, .pd-facts dd:last-of-type { border-bottom: none; }

/* ---- описание и характеристики ---- */
.pd-more { margin-top: 1.6rem; display: grid; gap: 1rem; }
.pd-block {
  padding: 1rem 1.1rem 1.2rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--lift);
}
.pd-block h2 {
  font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-muted); margin: 0 0 .7rem;
  padding-bottom: .4rem; border-bottom: 1px solid var(--border);
}

.pd-specs { width: 100%; border-collapse: collapse; font-size: .89rem; }
.pd-specs th {
  text-align: left; font-weight: 600; color: var(--text-muted);
  padding: .45rem .7rem .45rem 0; width: 38%;
  border-bottom: 1px solid var(--border); vertical-align: top;
}
.pd-specs td { padding: .45rem 0; border-bottom: 1px solid var(--border); }
.pd-specs tr:last-child th, .pd-specs tr:last-child td { border-bottom: none; }

@media (max-width: 860px) {
  .pd-grid { grid-template-columns: 1fr; gap: 1rem; }
  .pd-info h1 { font-size: 1.2rem; }
}
