/* ======== Override-и на хедъра ======== */
.garage__car {
  font-size: 12px;
  font-weight: 400;
  color: #fff;
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search__btn {
  height: 100%;
  display: flex;
  align-items: center;
  background: var(--accent-grad);
  color: #fff;
  padding: 0 12px;
  font-weight: 700;
  font-size: 15px;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(79,135,1, .30);
  transition: transform .2s var(--ease), filter .2s;
}
.search__input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 0 14px;
  font-size: 14px;
  color: var(--ink);
  height: 100%;
}

/* ---- Количка в хедъра ---- */
.cart {
  position: relative;
  display: flex;
  align-items: center;
  height: 52px;
  background: var(--accent-grad);
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(79,135,1,.30);
}
.cartbtn {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  padding: 0 12px 0 16px;
  color: #fff;
  text-decoration: none;
  border-radius: 14px 0 0 14px;
  transition: filter .18s;
}
.cartbtn:hover { filter: brightness(1.08); }
.cartbtn__ico { position: relative; flex: none; display: flex; }
.cartbtn__ico svg { width: 30px; height: 30px; fill: #fff; }
.cartbtn__count {
  position: absolute;
  top: -7px; right: -9px;
  min-width: 20px; height: 20px;
  padding: 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1f2b;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  font-style: normal;
  border-radius: 12px;
  border: 2px solid #4c7f0a;
}
.cartbtn__txt { display: flex; flex-direction: column; line-height: 1.15; }
.cartbtn__label { font-size: 14px; font-weight: 600; }
.cartbtn__sum { font-size: 16px; font-weight: 800; }
/* Количката живее в localStorage — сървърът НЕ я знае, затова баджът тръгва
   с атрибут `hidden` и js-ът го пълни. Но голото [hidden] (display:none от
   браузъра) губи от display:flex по-горе и „0" мига до събуждането на js-а.
   Същият капан е описан и в ai-widget.css, tts.css и blog-guide.css. */
.cartbtn__count[hidden] { display: none; }
/* Гаражът вече идва верен от сървъра, но при нула пак трябва да се скрие. */
.garage__count[hidden] { display: none; }

.cartbtn__toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 40px;
  background: none;
  border: none;
  border-left: 1px solid rgba(255,255,255,.4);
  border-radius: 0 14px 14px 0;
  cursor: pointer;
  transition: filter .18s;
}
.cartbtn__toggle:hover { filter: brightness(1.08); }
.cartbtn__caret { width: 20px; height: 20px; color: #fff; flex: none; transition: transform .2s; }
.cart.is-open .cartbtn__caret { transform: rotate(180deg); }

/* Падащо меню */
.cartdd {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 340px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 16px 50px rgba(0,0,0,.18);
  color: var(--dark);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .2s, transform .2s, visibility .2s;
  z-index: 200;
}
.cart.is-open .cartdd { opacity: 1; visibility: visible; transform: translateY(0); }
.cartdd::before {
  content: "";
  position: absolute;
  top: -7px; right: 22px;
  width: 14px; height: 14px;
  background: #fff;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  transform: rotate(45deg);
}
.cartdd__head { padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.cartdd__title { margin: 0 0 6px; font-size: 16px; font-weight: 800; color: var(--dark); }
.cartdd__title span { color: var(--muted); font-weight: 600; }
.cartdd__stock { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #16a34a; }
.cartdd__stock svg { width: 15px; height: 15px; }

.cartdd__items { max-height: 280px; overflow-y: auto; padding: 4px 18px; }
.cartdd__item { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cartdd__item:last-child { border-bottom: none; }
.cartdd__item > img, .cartdd__imglink > img { width: 64px; height: 56px; object-fit: contain; flex: none; border-radius: 8px; }
.cartdd__imglink { flex: none; display: block; line-height: 0; }
.cartdd__info { flex: 1; min-width: 0; }
.cartdd__name { font-size: 13px; font-weight: 800; color: var(--dark); }
.cartdd__namelink { color: inherit; text-decoration: none; display: inline; }
.cartdd__namelink:hover { color: var(--accent); }
.cartdd__cat { font-size: 12px; color: var(--muted); margin: 1px 0 4px; }
.cartdd__price { font-size: 12px; font-weight: 600; color: var(--dark); margin-bottom: 8px; }
.cartdd__qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 8px; overflow: hidden; background: #f6f6f6; }
.cartdd__qbtn { width: 26px; height: 30px; border: none; background: #f6f6f6; font-size: 16px; color: var(--dark); cursor: pointer; }
.cartdd__qbtn:hover { background: #ececec; }
.cartdd__qval { width: 30px; height: 30px; border: none; background: #f6f6f6; text-align: center; font-size: 13px; font-weight: 700; font-family: inherit; }
.cartdd__qval:focus { outline: none; }
.cartdd__del { align-self: center; width: 34px; height: 34px; flex: none; display: grid; place-items: center; background: none; border: none; color: var(--muted); cursor: pointer; border-radius: 8px; transition: color .15s, background .15s; }
.cartdd__del:hover { color: var(--danger); background: #fdecee; }
.cartdd__del svg { width: 18px; height: 18px; }

.cartdd__summary { padding: 10px 18px; background: #f8f9fb; border-top: 1px solid var(--line); }
.cartdd__srow { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.cartdd__srow b { color: var(--dark); font-weight: 800; }
.cartdd__free { color: #16a34a; font-weight: 800; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 20px; padding: 2px 10px; font-size: 11px; }
.cartdd__note { font-size: 11px; color: var(--muted); margin-bottom: 10px; }
.cartdd__total { display: flex; align-items: baseline; justify-content: space-between; padding-top: 8px; border-top: 1px solid var(--line); }
.cartdd__total > span:first-child { font-size: 15px; font-weight: 800; color: var(--dark); }
.cartdd__total-val { font-size: 20px; font-weight: 800; color: var(--accent); }
.cartdd__total-val small { font-size: 13px; font-weight: 600; color: var(--muted); }

.cartdd__actions { display: flex; flex-direction: column; gap: 10px; padding: 14px 18px; }
.cartdd__btn { display: flex; align-items: center; justify-content: center; gap: 8px; height: 46px; border-radius: 10px; font-size: 14px; font-weight: 800; text-decoration: none; transition: filter .18s, border-color .18s, color .18s; }
.cartdd__btn svg { width: 18px; height: 18px; fill: currentColor; }
.cartdd__btn--primary { background: var(--accent-grad); color: #fff; box-shadow: 0 6px 16px rgba(79,135,1,.25); }
.cartdd__btn--primary:hover { filter: brightness(1.07); }
.cartdd__btn--ghost { background: #fff; color: var(--dark); border: 1.5px solid var(--line); }
.cartdd__btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

.cartdd__usps { display: flex; justify-content: space-between; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); }
.cartdd__usp { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.cartdd__usp svg { width: 22px; height: 22px; color: var(--accent); fill: none; stroke: currentColor; stroke-width: 1.6; margin-bottom: 2px; }
.cartdd__usp b { font-size: 11px; font-weight: 700; color: var(--dark); line-height: 1.2; }
.cartdd__usp span { font-size: 10px; color: var(--muted); line-height: 1.2; }

@media (max-width: 720px) {
  .cart { height: 46px; }
  .cartbtn { padding: 0 10px 0 12px; gap: 8px; }
  .cartbtn__txt { display: none; }
  .cartdd { position: fixed; top: auto; right: 8px; left: 8px; width: auto; }
}

/* ============================================================================
   ХЕДЪРЪТ НА ТЕСЕН ЛАПТОП / ТАБЛЕТ В ХОРИЗОНТАЛ (861–1180 px).
   Редът е един (двата реда започват под 861), а лого + търсене + гараж +
   бутони искаха ~1117 px — между 861 и 1116 px всяка страница ставаше по-широка
   от екрана и се плъзгаше настрани. Търсачката не се свиваше под 324 px, защото
   полето има собствена ширина по подразбиране (`size=20`) — `width:0` + `flex:1`
   я освобождава. Надписите под иконките отпадат (иконките са ясни), а до
   1100 px и гаражът става само иконка и стрелка, както на телефон — иначе на
   iPad в хоризонтал (1024) за търсачката оставаха ~240 px.
   ========================================================================== */
@media (min-width:861px) and (max-width:1180px){
  .header__inner{ gap:12px }
  .logo__img{ height:42px }
  .search-wrap{ min-width:0 }
  .search__input{ width:0; min-width:0 }
  .search__btn{ padding:0 18px }
  .haction > .haction__label{ display:none }
  .haction{ padding:8px }
}
@media (min-width:861px) and (max-width:1100px){
  .garage__txt{ display:none }
  .garage__main{ padding:0 8px 0 10px; gap:8px }
}

.garage__label-d{ display:none }
@media (min-width:861px){ .garage__label-d{ display:inline } .garage__label-m{ display:none } }

/* ============================================================================
   Визията на Sauto.BG (03.11.2026) — тъмносиня горна лента със зелени иконки,
   бял хедър: търсачка, „Моят автомобил" със снимката на колата, бутони за любими и
   профил (инициали), зелена количка със сумата — всички с ъглите на логото. На вътрешните
   страници под него е тъмната лента с менюто; на началната я няма — там
   категориите са в страничната колона (home.css).
   САМО за компютър: под 861px хедърът е подреден наново в mobile.css.
   ============================================================================ */
@media (min-width:861px){
  /* Ъглите — по зеления квадрат с S в логото: там извивката е ~10,6% от страната
     (5,5px при 52px в хедъра). Едно правило за всичко в хедъра (Мариян, 03.11.2026):
     голямо (52–60px) → --r-logo, вложеното в него (44px) → --r-logo-in. Нищо кръгло. */
  :root{ --r-logo:6px; --r-logo-in:5px; --h-ctl:56px }   /* --h-ctl: една височина за търсачката, колата, бутоните и количката */

  /* горна лента — тъмна, със зелен лъч в празното между двете групи; иконките
     лимоненозелени с лек ореол, текстът бял */
  .topbar{ background:linear-gradient(90deg,#0b151c 0%,#0f1d27 50%,#0b151c 100%); color:#fff; border-bottom:0; font-size:13.5px; font-weight:600; letter-spacing:.1px }
  .topbar__inner{ height:46px; gap:0 }
  .topbar__left, .topbar__right{ flex:none; gap:0 }
  .topbar__item{ white-space:nowrap; gap:9px }
  .topbar__item .ic, .topbar__link .ic{ width:21px; height:21px; flex:none; opacity:1; color:#8fd13a; fill:none; stroke:currentColor; filter:drop-shadow(0 0 6px rgba(143,209,58,.35)) }
  .topbar__item .ic--solid{ stroke:none; fill:currentColor; width:23px; height:23px }
  .topbar__left .topbar__item + .topbar__item{ margin-left:18px; padding-left:18px; border-left:1px solid rgba(255,255,255,.2) }
  .topbar__item strong{ color:#fff; font-weight:600 }
  .topbar__item--accent{ color:#fff; font-weight:600 }
  .topbar__item--accent .ic{ fill:none }
  .topbar__item--accent a{ font-weight:600 }
  .topbar__item--accent a:hover, .topbar__link:hover{ color:#8fd13a }
  .topbar__sep{ width:1px; height:18px; margin:0 18px; background:rgba(255,255,255,.2) }
  .topbar__link{ display:inline-flex; align-items:center; gap:10px; color:#fff; font-weight:600 }
  .topbar__link::after{ display:none }
  /* между двете групи — две тънки наклонени лимонени черти с мек отблясък (без плътен
     блок — той стоеше като парче; Мариян, 03.11.2026); при тясно място просто ги няма */
  .topbar__glow{ flex:1 1 0; min-width:0; align-self:stretch; position:relative; margin:0 18px }
  .topbar__glow::before, .topbar__glow::after{
    content:''; position:absolute; top:-2px; bottom:-2px; width:2px; border-radius:2px; transform:skewX(-28deg);
    background:linear-gradient(180deg, rgba(166,227,82,0) 0%, #a6e352 45%, rgba(166,227,82,0) 100%);
    box-shadow:0 0 10px rgba(143,209,58,.55);
  }
  .topbar__glow::before{ right:30px }
  .topbar__glow::after{ right:20px; opacity:.45 }

  /* хедърът */
  .header__inner{ height:100px; gap:16px }
  .logo__img{ height:54px }

  /* търсачката */
  .search{ height:var(--h-ctl); background:#f3f5f6; border:1.5px solid #e1e6e9; border-radius:var(--r-logo); padding:6px 6px 6px 22px }
  .search:focus-within{ background:#fff; border-color:var(--accent); box-shadow:0 8px 24px rgba(79,135,1,.12) }
  .search__lead{ color:#1c2228; width:22px; height:22px }
  .search__input{ font-size:15px; padding:0 14px }
  .search__btn{ height:44px; border-radius:var(--r-logo-in); background:linear-gradient(135deg,#5a9a08 0%,#3f6e00 100%); box-shadow:none; padding:0 30px; font-size:16px; font-weight:800 }
  .search__btn:hover{ filter:brightness(1.08); transform:none }

  /* „Моят автомобил" — бяло каре; снимката на активната кола, иначе зелената иконка */
  .garage__btn{ height:var(--h-ctl); background:#fff; color:var(--dark); border:1.5px solid #e1e6e9; border-radius:var(--r-logo); box-shadow:0 4px 14px rgba(15,27,38,.06) }
  .garage__btn::before{ display:none }
  .garage__btn:hover{ border-color:var(--accent); box-shadow:0 8px 20px rgba(15,27,38,.10) }
  .garage__main{ color:var(--dark); padding:0 8px 0 8px; gap:10px }
  .garage__ico, .garage__ico__img{ border-radius:var(--r-logo-in) }
  .garage__ico{ width:44px; height:44px; background:var(--accent) }
  .garage__ico--photo{ width:64px; background:transparent; box-shadow:none }
  .garage__label{ font-size:12.5px; font-weight:600; color:#4b5249; text-transform:none; letter-spacing:0 }
  .garage__car{ font-size:14.5px; font-weight:800; color:var(--dark); max-width:140px }
  .garage__toggle{ border-left:0; width:34px; border-radius:0 var(--r-logo) var(--r-logo) 0 }
  .garage__toggle:hover{ background:transparent }
  .garage__caret{ color:#1c2228 }

  /* любими и профил — квадратни бутони само с иконка, с ъглите на логото */
  .header__actions{ gap:12px }
  .haction__label, .haction__txt{ display:none }
  .haction, .haction--user{ min-width:0; width:var(--h-ctl); height:var(--h-ctl); padding:0; border-radius:var(--r-logo); border:1.5px solid #e1e6e9; background:#fff; color:var(--dark); box-shadow:0 4px 12px rgba(15,27,38,.06) }
  .haction:hover{ border-color:var(--accent); background:#fff }
  .haction svg{ fill:#1c2228; width:24px; height:24px }
  .haction--fav svg{ fill:none; stroke:#1c2228 }
  .haction-fav__count{ background:var(--accent); color:#fff; border:2px solid #fff }
  .haction__initials{
    width:44px; height:44px; border-radius:var(--r-logo-in); display:grid; place-items:center;
    background:#13222e; color:#fff; font-size:15px; font-weight:800; letter-spacing:.3px;
  }
  .haction--user:has(.haction__initials) svg.ic-desk{ display:none }
  .haction__dot{ display:none }

  /* количката */
  .cart{ height:var(--h-ctl); border-radius:var(--r-logo); background:linear-gradient(135deg,#5a9a08 0%,#3f6e00 100%); box-shadow:0 8px 20px rgba(79,135,1,.28) }
  .cartbtn{ gap:10px; padding:0 8px 0 16px }
  .cartbtn__ico svg{ width:28px; height:28px }

  /* лентата с менюто — на вътрешните страници */
  .nav{ background:#13222e }
  .nav__inner{ height:60px; gap:10px }
  .nav__cats{ background:linear-gradient(135deg,#5a9a08 0%,#3f6e00 100%); padding:0 30px 0 26px; font-size:16px; font-weight:800; gap:12px }
  .nav__cats svg{ width:22px; height:22px }
  .nav__list{ flex:1; gap:6px; margin-left:14px }
  .nav__list a{ display:inline-flex; align-items:center; gap:9px; padding:10px 16px; border-radius:var(--r-logo-in); font-size:15px; font-weight:500; color:#eef1ec }
  .nav__list a{ transition:background-color .15s, color .15s }
  .nav__list a:hover .nav__ic{ color:var(--accent) }
  .nav__ic{ width:21px; height:21px; flex:none; color:#dfe5db; transition:color .2s }
  /* цветните иконки (NavIcon::tile, dark) — върху тъмното бяло-черният вариант (зелено-белият не
     хареса, 04.11.2026); посочената връзка (и тази с отвореното мега меню, li.is-hot) става бяла и
     показва обикновената цветна (Мариян, 03.11.2026) */
  .nav__list .nav__ic--img{ width:30px; height:30px; object-fit:contain }
  .nav__list .nav__ic--on-light{ display:none }
  .nav__list a:hover, .nav__list .is-hot > a{ background:#fff; color:#13222e }
  .nav__list a:hover .nav__ic--on-dark, .nav__list .is-hot > a .nav__ic--on-dark{ display:none }
  .nav__list a:hover .nav__ic--on-light, .nav__list .is-hot > a .nav__ic--on-light{ display:block }
  .nav__list li:has(> .nav__sale){ margin-left:auto }
  .nav__list .nav__sale{ color:#fff !important; border:1.5px solid #6fb31a; border-radius:var(--r-logo-in); padding:8px 18px }
  .nav__list .nav__sale .nav__ic{ color:#fff }
  .nav__list .nav__sale:hover{ background:rgba(111,179,26,.16) }
  .nav__sale-pct{ font-style:normal; font-weight:800; color:#8fd13a }

  /* на началната менюто е страничната колона — лентата я няма */
  .page-home .nav{ display:none }
  .page-home .header{ box-shadow:none }
}

/* под 1500px часовете не се побират до обещанията — остават телефонът и „Контакти" */
@media (min-width:861px) and (max-width:1499px){
  .topbar__right .topbar__item--hide{ display:none }
}

/* по-тесен компютър (861–1199px) */
@media (min-width:861px) and (max-width:1199px){
  .topbar__item--hide{ display:none }
  .topbar__left .topbar__item + .topbar__item{ margin-left:14px; padding-left:14px }
  .nav__cats{ padding:0 18px 0 16px; font-size:15px }
  .nav__list{ margin-left:8px; gap:2px }
  .nav__list a{ padding:10px 10px; font-size:14px; gap:7px }
  .nav__ic{ width:18px; height:18px }
  .garage__txt{ display:none }
}
