/* ============================================================
   24 Автодеталь — интернет-магазин
   Светлый, чистый, современный стиль. Mobile-first.
   ============================================================ */
:root {
  --green-900: #0e3d2a;
  --green-800: #125136;
  --green-700: #15804f;
  --green-600: #1a9a5f;
  --green-500: #22a867;
  --green-100: #ddf5e7;
  --green-50: #effaf3;
  --orange: #ff6a00;
  --orange-dark: #e65f00;
  --ink: #16241d;
  --muted: #6b7a72;
  --line: #e3ece6;
  --bg: #f5f8f6;
  --white: #ffffff;
  --danger: #d33;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(20, 60, 40, .08);
  --shadow-sm: 0 2px 10px rgba(20, 60, 40, .06);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Inter", ui-sans-serif, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--green-700); text-decoration: none; }
a:hover { color: var(--green-800); }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 15px; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.hidden { display: none !important; }

/* ---------- Шапка ---------- */
.topbar { background: var(--green-900); color: #cfe8db; font-size: 13px; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; height: 34px; gap: 16px; }
.topbar a { color: #fff; font-weight: 600; }
.topbar .tb-right { display: flex; gap: 18px; }
@media (max-width: 700px) { .topbar .tb-hide { display: none; } }

.header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header .container { display: flex; align-items: center; gap: 18px; padding-top: 12px; padding-bottom: 12px; }
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-mark {
  width: 46px; height: 46px; border-radius: 12px; background: linear-gradient(135deg, var(--green-600), var(--green-800));
  color: #fff; font-weight: 800; font-size: 17px; display: flex; align-items: center; justify-content: center; letter-spacing: -.5px;
}
.logo-text { line-height: 1.1; }
.logo-text b { font-size: 17px; display: block; color: var(--ink); }
.logo-text span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; }
@media (max-width: 900px) { .logo-text { display: none; } }

.header-search { flex: 1; position: relative; max-width: 640px; }
.header-search form { display: flex; }
.header-search input {
  flex: 1; border: 2px solid var(--green-600); border-right: none; border-radius: 10px 0 0 10px;
  padding: 11px 14px; font-size: 15px; outline: none; min-width: 0; background: #fff;
}
.header-search input:focus { border-color: var(--green-700); box-shadow: 0 0 0 3px rgba(34,168,103,.15); }
.header-search button {
  border: none; background: var(--green-700); color: #fff; border-radius: 0 10px 10px 0;
  padding: 0 20px; font-weight: 700; font-size: 14px;
}
.header-search button:hover { background: var(--green-800); }
@media (max-width: 700px) { .header-search button span { display: none; } .header-search button { padding: 0 14px; } }

.suggest {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff;
  border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  z-index: 60; overflow: hidden; display: none;
}
.suggest.open { display: block; }
.suggest a { display: flex; gap: 10px; align-items: center; padding: 9px 12px; color: var(--ink); border-bottom: 1px solid #f2f6f3; }
.suggest a:hover, .suggest a.active { background: var(--green-50); }
.suggest img { width: 42px; height: 42px; object-fit: contain; background: #f6f9f7; border-radius: 8px; flex-shrink: 0; }
.suggest .sg-name { flex: 1; font-size: 13.5px; line-height: 1.3; min-width: 0; }
.suggest .sg-name small { display: block; color: var(--muted); }
.suggest .sg-price { font-weight: 700; white-space: nowrap; font-size: 14px; }

.header-actions { display: flex; gap: 6px; align-items: center; margin-left: auto; }
.ha {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 12px; border-radius: 10px; color: var(--ink); font-size: 11px; min-width: 58px;
}
.ha:hover { background: var(--green-50); color: var(--green-800); }
.ha .ic { font-size: 21px; line-height: 1; }
.ha .badge {
  position: absolute; top: 0; right: 6px; background: var(--orange); color: #fff;
  font-size: 10.5px; font-weight: 700; border-radius: 99px; padding: 1px 6px; min-width: 17px; text-align: center;
}
@media (max-width: 700px) { .ha { min-width: 44px; padding: 6px 8px; } .ha span:not(.ic):not(.badge) { display: none; } }

/* ---------- Навигация ---------- */
.nav { background: var(--white); border-bottom: 1px solid var(--line); }
.nav .container { display: flex; gap: 4px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.nav .container::-webkit-scrollbar { display: none; }
.nav a { padding: 11px 13px; color: var(--ink); font-weight: 600; font-size: 14px; white-space: nowrap; border-bottom: 2.5px solid transparent; }
.nav a:hover, .nav a.on { color: var(--green-700); border-color: var(--green-600); }
.burger { display: none; }

/* выпадающее меню категорий в шапке */
.nav .drop { position: relative; display: inline-flex; }
.nav .drop-btn::after { content: ""; }
.nav .drop-menu {
  display: none; position: absolute; top: 100%; left: 0; z-index: 70;
  background: #fff; border: 1px solid var(--line); border-radius: 0 0 12px 12px;
  box-shadow: var(--shadow); min-width: 280px; max-height: 70vh; overflow-y: auto;
  padding: 8px; flex-direction: column;
}
.nav .drop:hover .drop-menu, .nav .drop:focus-within .drop-menu { display: flex; }
.drop-menu a { display: block; padding: 8px 12px; border-radius: 8px; border-bottom: none; white-space: nowrap; }
.drop-menu a:hover { background: var(--green-50); color: var(--green-800); }
@media (max-width: 700px) {
  .nav { position: sticky; top: 66px; z-index: 40; }
}

/* ---------- Hero (главная) ---------- */
.hero {
  background:
    radial-gradient(circle at 85% 20%, rgba(34,168,103,.18), transparent 45%),
    linear-gradient(120deg, var(--green-900) 0%, var(--green-800) 55%, var(--green-700) 100%);
  color: #fff; padding: 54px 0 60px;
}
.hero h1 { font-size: clamp(26px, 4.4vw, 44px); margin: 0 0 10px; line-height: 1.15; max-width: 760px; }
.hero p.sub { font-size: clamp(15px, 2vw, 19px); color: #d7ecdf; margin: 0 0 26px; max-width: 640px; }
.hero-search { display: flex; max-width: 720px; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 16px 40px rgba(0,0,0,.25); position: relative; }
.hero-search input { flex: 1; border: none; padding: 17px 18px; font-size: 16px; outline: none; min-width: 0; }
.hero-search .btn-find { border: none; background: var(--orange); color: #fff; font-weight: 800; font-size: 15px; padding: 0 30px; }
.hero-search .btn-find:hover { background: var(--orange-dark); }
.hero-vin { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.35); color: #fff; padding: 11px 20px; border-radius: 11px; font-weight: 700; font-size: 14px; }
.hero-vin:hover { background: rgba(255,255,255,.24); color: #fff; }
.hero-stats { display: flex; gap: 34px; margin-top: 34px; flex-wrap: wrap; }
.hero-stats div b { font-size: 24px; display: block; }
.hero-stats div span { font-size: 13px; color: #cbe6d7; }
@media (max-width: 700px) {
  .hero { padding: 34px 0 40px; }
  .hero-search { flex-direction: column; border-radius: 12px; }
  .hero-search .btn-find { padding: 14px; }
}

/* ---------- Общие блоки ---------- */
.section { padding: 30px 0 10px; }
.section h2 { font-size: 22px; margin: 0 0 16px; }
.page-title { font-size: clamp(20px, 3vw, 28px); margin: 22px 0 4px; }
.breadcrumbs { font-size: 13px; color: var(--muted); margin: 14px 0 0; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--green-700); }

/* ---------- Категории (плитки) ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.cat-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 14px;
  display: flex; flex-direction: column; gap: 4px; color: var(--ink); box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--green-500); }
.cat-card b { font-size: 15px; }
.cat-card span { font-size: 12.5px; color: var(--muted); }
.cat-card .ic { font-size: 24px; }

/* ---------- Сетка товаров ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 14px; }
@media (max-width: 480px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
.pcard {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; flex-direction: column; overflow: hidden; position: relative;
  transition: transform .15s, box-shadow .15s;
}
.pcard:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.pcard .img { display: block; aspect-ratio: 1/1; background: #f7faf8; display: flex; align-items: center; justify-content: center; padding: 10px; }
.pcard .img img { max-height: 100%; max-width: 100%; object-fit: contain; }
.pcard .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pcard .name { font-size: 13.5px; line-height: 1.35; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 36px; }
.pcard .meta { font-size: 12px; color: var(--muted); }
.pcard .bottom { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pcard .price { font-size: 17px; font-weight: 800; letter-spacing: -.3px; }
@media (max-width: 480px) { .pcard .price { font-size: 15px; } .pcard .name { font-size: 12.5px; } }
.pcard .to-cart {
  border: none; background: var(--green-700); color: #fff; border-radius: 9px;
  padding: 8px 12px; font-weight: 700; font-size: 13px; white-space: nowrap;
}
.pcard .to-cart:hover { background: var(--green-800); }
.pcard .to-cart:disabled { background: #cfd8d2; cursor: not-allowed; }
.fav-btn {
  position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(255,255,255,.92); font-size: 16px; z-index: 2;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.fav-btn:hover { border-color: var(--danger); }
.fav-btn.on { color: var(--danger); }

/* ---------- Бейджи статуса ---------- */
.badge-st { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px; display: inline-block; }
.badge-st.in_stock { background: var(--green-100); color: var(--green-800); }
.badge-st.on_order { background: #fff3e0; color: #b25e00; }
.badge-st.out { background: #f1f1f1; color: #888; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 11px; border: none; padding: 13px 22px; font-weight: 700; font-size: 15px;
  background: var(--green-700); color: #fff; transition: background .15s, transform .1s;
}
.btn:hover { background: var(--green-800); color: #fff; }
.btn:active { transform: scale(.98); }
.btn.orange { background: var(--orange); }
.btn.orange:hover { background: var(--orange-dark); }
.btn.ghost { background: #fff; color: var(--green-800); border: 2px solid var(--green-700); }
.btn.ghost:hover { background: var(--green-50); }
.btn.gray { background: #eceff0; color: var(--ink); }
.btn.gray:hover { background: #e0e5e2; }
.btn.big { padding: 16px 30px; font-size: 16px; }
.btn.block { width: 100%; }
.btn:disabled { background: #cfd8d2; cursor: not-allowed; }
.btn-link { background: none; border: none; color: var(--green-700); font-weight: 600; padding: 0; font-size: 14px; }

/* ---------- Каталог: фильтры + сетка ---------- */
.catalog-layout { display: grid; grid-template-columns: 264px 1fr; gap: 22px; align-items: start; padding-bottom: 40px; }
.filters {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; position: sticky; top: 130px; max-height: calc(100vh - 150px); overflow-y: auto;
}
.filters h3 { margin: 0 0 12px; font-size: 16px; }
.f-group { border-top: 1px solid var(--line); padding: 12px 0; }
.f-group:first-of-type { border-top: none; }
.f-group > summary, .f-group .f-title { font-weight: 700; font-size: 13.5px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.f-group > summary::after { content: "▾"; color: var(--muted); }
.f-group[open] > summary::after { content: "▴"; }
.f-group .f-list { margin-top: 8px; display: flex; flex-direction: column; gap: 5px; max-height: 190px; overflow-y: auto; }
.f-group label { display: flex; gap: 8px; font-size: 13.5px; align-items: center; color: var(--ink); cursor: pointer; }
.f-group label span.c { color: var(--muted); font-size: 12px; margin-left: auto; }
.f-group input[type=text], .f-group input[type=number] {
  width: 100%; border: 1.5px solid var(--line); border-radius: 9px; padding: 8px 10px; margin-top: 6px; outline: none;
}
.f-group input:focus { border-color: var(--green-500); }
.f-row2 { display: flex; gap: 8px; }
.f-submit { margin-top: 14px; }
.f-active { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.f-chip { background: var(--green-50); border: 1px solid var(--green-500); color: var(--green-800); border-radius: 99px; padding: 4px 12px; font-size: 13px; display: inline-flex; gap: 6px; align-items: center; }
.f-chip a { color: var(--green-800); font-weight: 700; }
.filters-toggle { display: none; }
@media (max-width: 960px) {
  .catalog-layout { grid-template-columns: 1fr; }
  .filters { position: fixed; inset: 0; z-index: 90; border-radius: 0; max-height: none; overflow-y: auto; transform: translateX(-105%); transition: transform .25s; }
  .filters.open { transform: none; }
  .filters-toggle { display: inline-flex; margin: 12px 0; }
  .filters .f-close { display: block; }
}
.f-close { display: none; background: none; border: none; font-size: 24px; position: absolute; top: 10px; right: 14px; }

.catalog-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.catalog-top .count { color: var(--muted); font-size: 14px; }
.sortsel { border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 12px; background: #fff; font-size: 14px; }

.pager { display: flex; gap: 6px; justify-content: center; margin: 26px 0 40px; flex-wrap: wrap; }
.pager a, .pager span.cur {
  min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: #fff; border-radius: 10px; color: var(--ink); font-weight: 600; padding: 0 8px;
}
.pager span.cur { background: var(--green-700); color: #fff; border-color: var(--green-700); }
.pager a:hover { border-color: var(--green-500); }

/* ---------- Карточка товара ---------- */
.product-layout { display: grid; grid-template-columns: minmax(300px, 46%) 1fr; gap: 28px; margin: 18px 0 30px; }
@media (max-width: 900px) { .product-layout { grid-template-columns: 1fr; gap: 16px; } }
.gallery .main-img {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; padding: 16px; cursor: zoom-in;
}
.gallery .main-img img { max-height: 100%; max-width: 100%; object-fit: contain; }
.gallery .thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.gallery .thumbs button {
  width: 64px; height: 64px; border: 2px solid var(--line); background: #fff; border-radius: 10px;
  padding: 4px; display: flex; align-items: center; justify-content: center;
}
.gallery .thumbs button.on { border-color: var(--green-600); }
.gallery .thumbs img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox {
  position: fixed; inset: 0; background: rgba(10,20,15,.85); z-index: 200; display: none;
  align-items: center; justify-content: center; padding: 20px; cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 96vw; max-height: 92vh; background: #fff; border-radius: 10px; padding: 10px; }

.p-info h1 { font-size: clamp(20px, 2.6vw, 28px); margin: 4px 0 8px; line-height: 1.25; }
.p-arts { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.p-arts b { color: var(--ink); }
.p-price-row { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 10px 0 4px; }
.p-price { font-size: clamp(28px, 4vw, 38px); font-weight: 800; letter-spacing: -1px; }
.p-stock { margin: 8px 0 16px; }
.qty-row { display: flex; align-items: center; gap: 14px; margin: 14px 0 18px; flex-wrap: wrap; }
.qty {
  display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 11px; overflow: hidden; background: #fff;
}
.qty button { width: 42px; height: 44px; border: none; background: #f4f7f5; font-size: 20px; font-weight: 700; color: var(--green-800); }
.qty button:hover { background: var(--green-100); }
.qty input { width: 54px; height: 44px; border: none; text-align: center; font-size: 16px; font-weight: 700; outline: none; }
.buy-row { display: flex; gap: 10px; flex-wrap: wrap; }
.sum-hint { font-size: 14px; color: var(--muted); margin-top: 10px; }
.sum-hint b { color: var(--ink); font-size: 17px; }
.p-guarantee { display: grid; gap: 8px; margin-top: 18px; background: var(--green-50); border: 1px solid var(--green-100); border-radius: var(--radius); padding: 14px 16px; font-size: 13.5px; }

/* вкладки */
.tabs { margin: 10px 0 40px; }
.tab-btns { display: flex; gap: 4px; overflow-x: auto; border-bottom: 2px solid var(--line); }
.tab-btns button {
  border: none; background: none; padding: 12px 16px; font-weight: 700; font-size: 14.5px; color: var(--muted);
  border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap;
}
.tab-btns button.on { color: var(--green-800); border-color: var(--green-600); }
.tab-pane { display: none; background: #fff; border: 1px solid var(--line); border-top: none; border-radius: 0 0 var(--radius) var(--radius); padding: 20px; }
.tab-pane.on { display: block; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.spec-table td { padding: 9px 6px; border-bottom: 1px solid #f0f4f1; }
.spec-table td:first-child { color: var(--muted); width: 40%; }
.spec-table td:last-child { font-weight: 600; }
.offer-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.offer-table th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12.5px; text-transform: uppercase; padding: 6px; border-bottom: 2px solid var(--line); }
.offer-table td { padding: 9px 6px; border-bottom: 1px solid #f0f4f1; }

/* мобильная панель покупки */
.mobile-buy {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; background: #fff;
  border-top: 1px solid var(--line); padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  box-shadow: 0 -6px 24px rgba(0,0,0,.08); align-items: center; gap: 12px;
}
.mobile-buy .mb-price { font-weight: 800; font-size: 18px; }
.mobile-buy .btn { flex: 1; padding: 13px; }
@media (max-width: 700px) { .mobile-buy { display: flex; } body.has-mobile-buy { padding-bottom: 86px; } }

/* ---------- Корзина ---------- */
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; margin: 18px 0 50px; }
@media (max-width: 900px) { .cart-layout { grid-template-columns: 1fr; } }
.cart-list { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cart-row { display: grid; grid-template-columns: 96px 1fr auto; gap: 14px; padding: 14px; border-bottom: 1px solid var(--line); align-items: center; }
.cart-row:last-child { border-bottom: none; }
.cart-row .img { width: 96px; height: 96px; background: #f7faf8; border-radius: 10px; display: flex; align-items: center; justify-content: center; padding: 6px; }
.cart-row .img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cart-row .nm { font-weight: 600; font-size: 14.5px; margin-bottom: 3px; }
.cart-row .art { color: var(--muted); font-size: 13px; }
.cart-row .unit { color: var(--muted); font-size: 13px; margin-top: 4px; }
.cart-row .right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.cart-row .line-total { font-weight: 800; font-size: 17px; }
.cart-row .del { background: none; border: none; color: var(--muted); font-size: 13px; text-decoration: underline; }
.cart-row .del:hover { color: var(--danger); }
@media (max-width: 640px) {
  .cart-row { grid-template-columns: 72px 1fr; }
  .cart-row .img { width: 72px; height: 72px; }
  .cart-row .right { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; text-align: left; }
}
.summary { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; position: sticky; top: 130px; }
.summary h3 { margin: 0 0 12px; font-size: 17px; }
.summary .row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 14.5px; }
.summary .total { border-top: 2px solid var(--line); margin-top: 8px; padding-top: 12px; font-size: 15px; }
.summary .total b { font-size: 24px; }
.summary .btn { margin-top: 14px; }
.empty-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 50px 20px; text-align: center; color: var(--muted); margin: 30px 0 60px; }
.empty-box .ic { font-size: 46px; display: block; margin-bottom: 10px; }

/* ---------- Оформление заказа ---------- */
.co-layout { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; margin: 18px 0 60px; }
@media (max-width: 900px) { .co-layout { grid-template-columns: 1fr; } }
.co-block { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.co-block h3 { margin: 0 0 14px; font-size: 17px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
.field input, .field textarea, .field select {
  width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 12px; outline: none; background: #fff;
}
.field input:focus, .field textarea:focus { border-color: var(--green-500); }
.field .err { color: var(--danger); font-size: 12.5px; margin-top: 4px; }
.field.wide { grid-column: 1 / -1; }
.opt {
  display: flex; gap: 12px; border: 1.5px solid var(--line); border-radius: 12px; padding: 13px 14px; margin-bottom: 9px;
  cursor: pointer; align-items: flex-start; transition: border-color .15s, background .15s;
}
.opt:hover { border-color: var(--green-500); }
.opt input { margin-top: 3px; accent-color: var(--green-700); }
.opt.sel { border-color: var(--green-600); background: var(--green-50); }
.opt b { display: block; font-size: 14.5px; }
.opt span { font-size: 13px; color: var(--muted); }
.co-mini { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid #f2f6f3; font-size: 13.5px; }
.co-mini:last-child { border-bottom: none; }
.co-mini .q { color: var(--muted); white-space: nowrap; }
.co-mini .t { flex: 1; }
.co-mini .s { font-weight: 700; white-space: nowrap; }

/* ---------- Страница заказа / статус ---------- */
.order-head { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; margin: 20px 0; text-align: center; }
.order-head .ok { font-size: 52px; }
.order-head h1 { margin: 8px 0 6px; font-size: 26px; }
.order-num { font-size: 20px; font-weight: 800; color: var(--green-800); }
.status-track { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0; }
.status-track .st {
  flex: 1; min-width: 100px; text-align: center; font-size: 12px; padding: 9px 6px; border-radius: 9px;
  background: #f1f5f2; color: var(--muted); border: 1px solid var(--line);
}
.status-track .st.done { background: var(--green-100); color: var(--green-800); border-color: var(--green-500); font-weight: 600; }
.status-track .st.canceled { background: #fdeaea; color: #b33; border-color: #e8b4b4; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 16px 0; }
.info-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.info-card h4 { margin: 0 0 8px; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.info-card p { margin: 0; font-size: 14.5px; line-height: 1.55; }

/* ---------- Кабинет ---------- */
.acc-layout { display: grid; grid-template-columns: 230px 1fr; gap: 20px; align-items: start; margin: 20px 0 50px; }
@media (max-width: 800px) { .acc-layout { grid-template-columns: 1fr; } }
.acc-menu { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; }
.acc-menu a { padding: 10px 12px; border-radius: 9px; color: var(--ink); font-weight: 600; font-size: 14px; }
.acc-menu a:hover, .acc-menu a.on { background: var(--green-50); color: var(--green-800); }
@media (max-width: 800px) { .acc-menu { flex-direction: row; overflow-x: auto; } .acc-menu a { white-space: nowrap; } }
.table-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
table.t th { text-align: left; padding: 12px 14px; border-bottom: 2px solid var(--line); color: var(--muted); font-size: 12.5px; text-transform: uppercase; }
table.t td { padding: 12px 14px; border-bottom: 1px solid #f0f4f1; vertical-align: middle; }
table.t tr:last-child td { border-bottom: none; }
.st-pill { font-size: 12px; font-weight: 700; border-radius: 99px; padding: 4px 11px; white-space: nowrap; }
.st-pill.new { background: #e8f0fe; color: #2952b3; }
.st-pill.confirmed { background: #e0f2e9; color: #1a7a46; }
.st-pill.paid { background: #d9f2e3; color: #0e6b3c; }
.st-pill.assembling { background: #fff3d9; color: #9a6b00; }
.st-pill.shipped { background: #e5e0fb; color: #5b45c4; }
.st-pill.delivered { background: #d9f0f7; color: #166c86; }
.st-pill.done { background: #ececec; color: #555; }
.st-pill.canceled { background: #fde5e5; color: #b33; }

.auth-box { max-width: 430px; margin: 40px auto 70px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.auth-box h1 { margin: 0 0 18px; font-size: 22px; }
.auth-box .field { margin-bottom: 12px; }
.auth-note { text-align: center; margin-top: 14px; font-size: 14px; color: var(--muted); }
.alert { border-radius: 10px; padding: 11px 14px; font-size: 14px; margin-bottom: 12px; }
.alert.err { background: #fdecec; color: #a33; border: 1px solid #f3c1c1; }
.alert.ok { background: var(--green-50); color: var(--green-800); border: 1px solid var(--green-100); }

/* ---------- Прочее ---------- */
.footer { background: var(--green-900); color: #bcd9c9; margin-top: 50px; padding: 34px 0 26px; font-size: 14px; }
.footer .container { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 22px; }
.footer h4 { color: #fff; margin: 0 0 10px; font-size: 15px; }
.footer a { color: #bcd9c9; display: block; padding: 3px 0; }
.footer a:hover { color: #fff; }
.footer .copy { border-top: 1px solid rgba(255,255,255,.15); margin-top: 24px; padding-top: 16px; font-size: 12.5px; color: #8db7a1; }

.text-page { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 30px; margin: 20px 0 50px; max-width: 900px; }
.text-page h1 { margin-top: 0; }
.text-page h3 { margin: 22px 0 8px; }
.text-page ul { padding-left: 20px; }

.vin-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; max-width: 640px; margin: 26px 0 60px; }
.vin-box input.vin {
  width: 100%; border: 2px solid var(--green-600); border-radius: 12px; padding: 15px;
  font-size: 20px; letter-spacing: 2px; text-transform: uppercase; outline: none; font-weight: 700;
}

/* ---------- Админка магазина ---------- */
.adm-ok { background: #dcfce7; color: #166534; padding: 8px 12px; border-radius: 8px; margin-top: 8px; }
.adm-err { background: #fee2e2; color: #991b1b; padding: 8px 12px; border-radius: 8px; margin-top: 8px; }
.adm-wrap { max-width: 1280px; margin: 0 auto; padding: 18px 16px 60px; }
.adm-nav { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 20px; }
.adm-nav a { padding: 8px 14px; border-radius: 9px; background: #fff; border: 1px solid var(--line); font-weight: 600; font-size: 13.5px; color: var(--ink); }
.adm-nav a.on, .adm-nav a:hover { background: var(--green-700); color: #fff; border-color: var(--green-700); }
.adm-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.adm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 18px; }
.adm-stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.adm-stat b { font-size: 26px; display: block; }
.adm-stat span { color: var(--muted); font-size: 13px; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.adm-table th { text-align: left; padding: 9px 10px; background: #f6f9f7; border-bottom: 1px solid var(--line); white-space: nowrap; }
.adm-table td { padding: 9px 10px; border-bottom: 1px solid #f0f4f1; }
.adm-form .field { margin-bottom: 12px; }
.adm-form input, .adm-form select, .adm-form textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: 9px; padding: 9px 11px; outline: none;
}
.adm-form input:focus, .adm-form textarea:focus { border-color: var(--green-500); }
.adm-form textarea { min-height: 90px; }
.adm-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 700px) { .adm-grid2 { grid-template-columns: 1fr; } }
.adm-photo { width: 76px; height: 76px; object-fit: contain; background: #f6f9f7; border: 1px solid var(--line); border-radius: 8px; padding: 4px; }
.adm-inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.adm-badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--green-100); color: var(--green-800); }
.adm-badge.manual { background: #ffe9d6; color: #b25e00; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; }
