:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #f1f4f8;
  --text: #16202b;
  --muted: #5b6b7f;
  --border: #e2e8f0;
  --primary: #0b1f33;
  --primary-2: #17324d;
  --accent: #c2410c;
  --accent-2: #ea580c;
  --success: #0f7b3e;
  --success-bg: #e7f5ec;
  --danger: #b42318;
  --danger-bg: #fdecea;
  --warn: #b45309;
  --warn-bg: #fdf3e2;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(11, 31, 51, 0.06), 0 8px 24px rgba(11, 31, 51, 0.07);
  --shadow-sm: 0 1px 2px rgba(11, 31, 51, 0.08);
  --font: "Inter", "Manrope", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary-2); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; }

.container { max-width: 1240px; margin: 0 auto; padding: 0 16px; }

/* ─── Header ─────────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 0 var(--border);
}
.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--primary);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.3px;
  white-space: nowrap;
}
.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.3px;
}
.logo-text span { color: var(--accent); }

.search {
  flex: 1;
  display: flex;
  max-width: 640px;
  margin: 0 auto;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--border);
}
.search input {
  flex: 1;
  border: 0;
  outline: 0;
  padding: 11px 18px;
  font-size: 16px;
  background: transparent;
  color: var(--text);
}
.search button {
  border: 0;
  background: var(--accent);
  color: #fff;
  padding: 0 20px;
  font-size: 16px;
}

.cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  color: var(--primary);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s;
}
.cart-btn:hover { background: var(--border); }
.cart-count {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ─── Category nav ───────────────────────────────────────── */
.cats {
  background: #fff;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.cats::-webkit-scrollbar { display: none; }
.cats-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 8px 16px;
  display: flex;
  gap: 8px;
}
.cat-chip {
  flex: 0 0 auto;
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.15s;
}
.cat-chip:hover { background: var(--surface-2); color: var(--primary); }
.cat-chip.active { background: var(--primary); color: #fff; }

/* ─── Layout: catalog ────────────────────────────────────── */
.catalog { display: grid; grid-template-columns: 260px 1fr; gap: 22px; padding: 22px 0 60px; }

.filters {
  position: sticky;
  top: 116px;
  align-self: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}
.filters h3 {
  margin: 18px 0 8px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
}
.filters h3:first-child { margin-top: 0; }
.filter-list { display: flex; flex-direction: column; gap: 5px; }
.filter-opt {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  padding: 4px 2px;
}
.filter-opt:hover { color: var(--primary-2); }
.filter-opt input { accent-color: var(--accent); }
.filter-opt .cnt { margin-left: auto; color: var(--muted); font-size: 12px; }
.price-row { display: flex; gap: 8px; align-items: center; }
.price-row input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 14px;
}
.reset-btn {
  width: 100%;
  margin-top: 16px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  border-radius: var(--radius-sm);
  padding: 9px;
  font-size: 14px;
  font-weight: 600;
}
.reset-btn:hover { color: var(--danger); border-color: var(--danger); }

/* ─── Products grid ──────────────────────────────────────── */
.grid-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.grid-head .count { color: var(--muted); font-size: 14px; }
.grid-head .spacer { flex: 1; }
.sort-select {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 14px;
  background: #fff;
  color: var(--text);
}
.filters-toggle {
  display: none;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  font-size: 14px;
  font-weight: 600;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.12s, box-shadow 0.12s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-media {
  position: relative;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 58px;
}
.card-media .badge-type {
  position: absolute;
  top: 10px;
  left: 10px;
}
.card-media-mono { font-size: 20px; font-weight: 800; letter-spacing: 1.5px; color: rgba(255,255,255,.55); }
.card-body { padding: 13px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-brand { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; }
.card-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  min-height: 38px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
}
.card-name:hover { color: var(--primary-2); }
.card-sku { color: var(--muted); font-size: 12px; }
.card-price-row { display: flex; align-items: baseline; gap: 8px; margin-top: auto; }
.price { font-size: 20px; font-weight: 800; color: var(--text); }
.price-old { font-size: 13px; color: var(--muted); text-decoration: line-through; }
.card-stock { font-size: 12.5px; font-weight: 600; }
.in-stock { color: var(--success); }
.out-stock { color: var(--danger); }
.add-btn {
  margin-top: 10px;
  width: 100%;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  padding: 10px;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.15s;
}
.add-btn:hover { background: var(--accent-2); }
.add-btn:disabled { background: #cbd5e1; cursor: not-allowed; }

.badge-type {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.badge-original { background: #eef2ff; color: #4338ca; }
.badge-analog { background: #e0f2fe; color: #0369a1; }
.badge-stm { background: var(--warn-bg); color: var(--warn); }

.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 24px; }
.page-btn {
  min-width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ─── Drawer (cart) ──────────────────────────────────────── */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(14, 42, 67, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 80;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(430px, 100%);
  background: #fff;
  box-shadow: -12px 0 40px rgba(14,42,67,0.2);
  transform: translateX(105%);
  transition: transform 0.25s ease;
  z-index: 90;
  display: flex;
  flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.drawer-head h2 { margin: 0; font-size: 19px; }
.icon-btn {
  border: 0;
  background: var(--surface-2);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 15px;
  color: var(--muted);
}
.drawer-body { flex: 1; overflow-y: auto; padding: 14px 20px; }
.cart-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.cart-item .thumb {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex: 0 0 auto;
}
.cart-item .ci-main { flex: 1; min-width: 0; }
.cart-item .ci-name { font-size: 14px; font-weight: 600; line-height: 1.3; }
.cart-item .ci-price { font-weight: 700; margin-top: 3px; }
.qty { display: inline-flex; align-items: center; gap: 8px; margin-top: 7px; }
.qty button {
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
}
.qty span { min-width: 22px; text-align: center; font-weight: 700; }
.ci-remove { margin-left: 8px; border: 0; background: none; color: var(--muted); font-size: 16px; }
.ci-remove:hover { color: var(--danger); }
.drawer-foot { padding: 16px 20px; border-top: 1px solid var(--border); }
.total-row { display: flex; justify-content: space-between; font-size: 17px; font-weight: 800; margin-bottom: 12px; }
.checkout-btn {
  width: 100%;
  border: 0;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 13px;
  font-size: 15px;
  font-weight: 800;
}
.checkout-btn:hover { background: var(--accent-2); }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; }
.empty .big { font-size: 46px; }

/* ─── Modal (product) ────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(14,42,67,0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 100;
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.97);
  width: min(820px, 94%);
  max-height: 88vh;
  overflow-y: auto;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0,0,0,0.35);
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s;
  z-index: 110;
}
.modal.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.modal-inner { display: grid; grid-template-columns: 320px 1fr; gap: 22px; }
.modal-media { height: 100%; min-height: 260px; display: flex; align-items: center; justify-content: center; font-size: 96px; }
.modal-info { padding: 24px 24px 24px 0; }
.modal-info h2 { margin: 8px 0 6px; font-size: 24px; line-height: 1.25; }
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: 0;
  background: var(--surface-2);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 16px;
  color: var(--muted);
  z-index: 2;
}
.modal-price-row { display: flex; align-items: baseline; gap: 12px; margin: 12px 0; }
.modal-price-row .price { font-size: 26px; }
.meta-table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14px; }
.meta-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.meta-table td:first-child { color: var(--muted); width: 42%; }
.modal-qty { display: flex; align-items: center; gap: 14px; margin: 14px 0; }
.modal-add {
  flex: 1;
  border: 0;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 13px;
  font-size: 15px;
  font-weight: 800;
}
.modal-add:hover { background: var(--accent-2); }

/* ─── Checkout / Order pages ─────────────────────────────── */
.page { max-width: 900px; margin: 28px auto 60px; }
.page-title { font-size: 28px; font-weight: 800; margin: 0 0 4px; }
.page-sub { color: var(--muted); margin: 0 0 20px; }
.checkout-grid { display: grid; grid-template-columns: 1fr 360px; gap: 20px; align-items: start; }
.panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.panel h3 { margin: 0 0 14px; font-size: 18px; }
.field { margin-bottom: 13px; }
.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: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: transparent;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pay-methods { display: flex; flex-direction: column; gap: 8px; }
.pay-method {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  cursor: pointer;
}
.pay-method input { accent-color: var(--accent); }
.pay-method.active { border-color: var(--accent); background: #fff7f0; }
.pay-method .pm-name { font-weight: 700; font-size: 14px; }
.pay-method .pm-desc { font-size: 12px; color: var(--muted); }
.summary-item { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 5px 0; }
.summary-item .q { color: var(--muted); }
.summary-total { display: flex; justify-content: space-between; font-size: 18px; font-weight: 800; border-top: 1px solid var(--border); margin-top: 10px; padding-top: 12px; }
.pay-btn {
  width: 100%;
  border: 0;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 15px;
  font-size: 16px;
  font-weight: 800;
  margin-top: 16px;
}
.pay-btn:hover { background: var(--accent-2); }
.pay-btn:disabled { background: #cbd5e1; cursor: wait; }

.order-status-card { text-align: center; padding: 30px 20px; }
.order-status-card .big { font-size: 60px; }
.status-pill {
  display: inline-block;
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}
.st-paid { background: var(--success-bg); color: var(--success); }
.st-pending { background: var(--warn-bg); color: var(--warn); }
.st-cancelled { background: var(--danger-bg); color: var(--danger); }

/* ─── Toast ──────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--primary);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s;
  z-index: 200;
  box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ─── Admin ──────────────────────────────────────────────── */
.admin-wrap { padding: 24px 0 60px; }
.admin-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.admin-top h1 { margin: 0; font-size: 22px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.stat .v { font-size: 26px; font-weight: 800; }
.stat .l { color: var(--muted); font-size: 13px; }
.tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.tab {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
}
.tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.data th { background: var(--surface-2); color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.4px; position: sticky; top: 0; }
table.data tr:last-child td { border-bottom: 0; }
.mini { font-size: 12.5px; color: var(--muted); }
.order-row { cursor: pointer; }
.order-row:hover td { background: var(--surface-2); }
select.status-select { border: 1px solid var(--border); border-radius: 6px; padding: 6px 8px; font-size: 13px; background: #fff; }
.num-input { border: 1px solid var(--border); border-radius: 6px; padding: 6px 8px; font-size: 13px; width: 110px; }
.login-box { max-width: 360px; margin: 60px auto; }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .catalog { grid-template-columns: 1fr; }
  .filters {
    position: fixed;
    left: 0;
    top: 0;
    height: 100%;
    width: 300px;
    max-height: 100%;
    border-radius: 0;
    transform: translateX(-105%);
    transition: transform 0.25s;
    z-index: 120;
  }
  .filters.open { transform: translateX(0); }
  .filters-toggle { display: inline-block; }
  .checkout-grid { grid-template-columns: 1fr; }
  .modal-inner { grid-template-columns: 1fr; }
  .modal-media { min-height: 180px; }
  .modal-info { padding: 0 24px 24px; }
  .search { max-width: none; }
  .logo-text { display: none; }
}
@media (max-width: 560px) {
  .header-inner { flex-wrap: wrap; gap: 10px; }
  .search { order: 3; flex-basis: 100%; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .card-media { height: 120px; font-size: 46px; }
  .card-name { font-size: 13px; }
  .price { font-size: 16px; }
  .field-row { grid-template-columns: 1fr; }
}

/* ─── ИИ-консультант ──────────────────────────────────────── */
.ai-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 0;
  background: var(--accent);
  color: #fff;
  font-size: 26px;
  box-shadow: 0 10px 26px rgba(255, 106, 19, 0.4);
  z-index: 150;
  transition: transform 0.15s;
}
.ai-fab:hover { transform: scale(1.07); }

.ai-panel {
  position: fixed;
  right: 22px;
  bottom: 92px;
  width: min(380px, calc(100vw - 32px));
  height: min(540px, 68vh);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 22px 60px rgba(14, 42, 67, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(16px) scale(0.98);
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s;
  z-index: 160;
}
.ai-panel.open { opacity: 1; pointer-events: auto; transform: none; }
.ai-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}
.ai-head .icon-btn { background: rgba(255, 255, 255, 0.14); color: #fff; }
.ai-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface-2);
}
.ai-msg {
  max-width: 85%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.ai-bot { background: #fff; border: 1px solid var(--border); align-self: flex-start; border-bottom-left-radius: 4px; }
.ai-user { background: var(--accent); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.ai-typing { color: var(--muted); font-style: italic; }
.ai-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); background: #fff; }
.ai-input input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 14px;
  outline: none;
  font-family: inherit;
}
.ai-input input:focus { border-color: var(--accent); }
.ai-input button {
  border: 0;
  background: var(--accent);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 17px;
  flex: 0 0 auto;
}
.ai-input button:disabled { background: #cbd5e1; }

.search #ai-search-btn { background: #6d28d9; }
.search #ai-search-btn:hover { background: #7c3aed; }

.ai-banner {
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
  border: 1px solid #ddd6fe;
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--primary-2);
}
.ai-banner b { color: var(--primary); }
.ai-banner .reset-btn { display: inline-block; margin-left: 10px; }

.ai-chips { display: flex; gap: 6px; padding: 8px 12px; flex-wrap: wrap; border-top: 1px solid var(--border); background: #fff; }
.ai-chips button {
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}
.ai-chips button:hover { border-color: var(--accent); color: var(--accent); }

.catalog-head { padding: 18px 0 2px; }
.catalog-head h1 { margin: 0 0 6px; font-size: 32px; font-weight: 800; letter-spacing: -0.3px; }
.catalog-head p { margin: 0 0 14px; color: var(--muted); font-size: 16px; }
@media (max-width: 560px) {
  .catalog-head h1 { font-size: 21px; }
  .catalog-head p { font-size: 14px; }
}

/* Показать/скрыть пароль */
.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 46px; }
.pass-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
  padding: 6px;
}

/* Вкладки личного кабинета */
.acc-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin: 4px 0 18px;
  flex-wrap: wrap;
}
.acc-tab {
  border: 0;
  background: transparent;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.acc-tab:hover { color: var(--primary); }
.acc-tab.active { color: var(--primary); border-bottom-color: var(--accent); }

/* ─── Topbar ─────────────────────────────────────────────── */
.topbar { background: #0b2136; color: rgba(255,255,255,.78); font-size: 13px; }
.topbar-inner {
  max-width: 1240px; margin: 0 auto; padding: 7px 16px;
  display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
}
.topbar-spacer { flex: 1; }

/* ─── Hero ───────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  margin: 18px auto 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #0b1f33 0%, #12293d 55%, #17324d 100%);
  color: #fff;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.10) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: .5;
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; padding: 48px 44px 42px; max-width: 760px; }
.hero-kicker { text-transform: uppercase; letter-spacing: 1.4px; font-size: 12px; font-weight: 700; color: #d9a06a; margin-bottom: 12px; }
.hero-title { margin: 0 0 12px; font-size: 44px; line-height: 1.08; font-weight: 800; letter-spacing: -1px; }
.hero-title span { color: #e7a06a; }
.hero-sub { margin: 0 0 22px; font-size: 17px; color: rgba(255,255,255,.82); max-width: 580px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 30px; }
.hero-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 16px;
  padding: 14px 22px; border-radius: 12px;
  box-shadow: 0 10px 22px rgba(194, 65, 12, 0.28);
  transition: transform .15s, background .15s;
}
.hero-cta:hover { background: var(--accent-2); transform: translateY(-1px); }
.hero-ghost {
  background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.28);
  padding: 14px 22px; border-radius: 12px; font-size: 16px; font-weight: 600;
}
.hero-ghost:hover { background: rgba(255,255,255,.16); }
.hero-stats { display: flex; gap: 36px; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats b { font-size: 26px; font-weight: 800; }
.hero-stats span { font-size: 13px; color: rgba(255,255,255,.72); }

/* ─── Car selector ───────────────────────────────────────── */
.car-select {
  margin: 18px auto 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 22px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}
.car-select-left { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 260px; }
.car-select-icon { font-size: 30px; }
.car-select-left b { display: block; font-size: 17px; }
.car-select-left small { color: var(--muted); font-size: 13.5px; }
.car-select-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.car-select-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary); color: #fff; font-weight: 700; font-size: 14px;
  padding: 11px 16px; border-radius: 10px;
}
.car-select-btn:hover { background: var(--primary-2); }
.car-select-btn.ghost { background: var(--surface-2); color: var(--primary); border: 1px solid var(--border); }
.car-select-btn.ghost:hover { background: var(--border); }

/* ─── Category tiles ─────────────────────────────────────── */
.cat-tiles { margin: 28px auto 0; }
.section-title { font-size: 22px; font-weight: 800; margin: 0 0 14px; }
.cat-tiles-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.cat-tile {
  display: flex; align-items: center; gap: 12px; text-align: left;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px; cursor: pointer;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.cat-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: transparent; }
.cat-tile-icon {
  flex: 0 0 44px; height: 44px; border-radius: 10px;
  background: var(--primary); color: #fff;
  font-size: 17px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.cat-tile-name { font-weight: 700; font-size: 15px; color: var(--text); }

/* ─── Benefits ───────────────────────────────────────────── */
.benefits { margin: 22px auto 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.benefit {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 16px; display: flex; flex-direction: column; gap: 4px;
}
.benefit-icon { display: none; }
.benefit b { font-size: 15px; }
.benefit small { color: var(--muted); font-size: 13px; }

/* ─── Footer ─────────────────────────────────────────────── */
.footer { margin-top: 42px; background: #0b2136; color: rgba(255,255,255,.8); }
.footer-inner {
  max-width: 1240px; margin: 0 auto; padding: 40px 16px 26px;
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1.2fr; gap: 24px;
}
.footer-logo { font-size: 24px; font-weight: 800; color: #fff; margin-bottom: 10px; }
.footer-logo span { color: var(--accent); }
.footer-brand p { margin: 0; font-size: 14px; line-height: 1.5; color: rgba(255,255,255,.65); max-width: 320px; }
.footer-col h4 { margin: 0 0 10px; font-size: 14px; color: #fff; }
.footer-col a, .footer-col span { display: block; font-size: 14px; color: rgba(255,255,255,.68); margin-bottom: 7px; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); text-align: center; padding: 16px; font-size: 13px; color: rgba(255,255,255,.5); }

/* ─── Card hover ─────────────────────────────────────────── */
.card { transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(15,43,70,.12); }

@media (max-width: 900px) {
  .hero-inner { padding: 32px 22px 30px; }
  .hero-title { font-size: 32px; }
  .cat-tiles-grid, .benefits { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .hero-title { font-size: 27px; }
  .hero-stats { gap: 20px; }
  .footer-inner { grid-template-columns: 1fr; }
  .topbar-inner { gap: 10px; font-size: 12px; }
}

/* ══════════════════════════════════════════════════════════
   LOFT THEME — бетон, графит, ржавый акцент, прямые углы
   ══════════════════════════════════════════════════════════ */
:root {
  --bg: #e8e5e0;
  --surface: #f3f1ed;
  --surface-2: #ddd9d2;
  --text: #1b1b1b;
  --muted: #6a655e;
  --border: #c7c2ba;
  --primary: #1f1f1f;
  --primary-2: #3a3a3a;
  --accent: #b65a2e;
  --accent-2: #c96b3c;
  --success: #2f6b4f;
  --success-bg: #e0eae4;
  --danger: #9b2c1f;
  --danger-bg: #f1e2df;
  --radius: 0px;
  --radius-sm: 0px;
  --shadow: none;
  --shadow-sm: none;
  --font: "Bahnschrift", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { border-radius: 0 !important; }

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

h1, h2, h3, h4, .hero-title, .section-title, .page-title, .logo, .footer-logo {
  font-family: "Bahnschrift", "Arial Narrow", "Segoe UI", sans-serif;
  letter-spacing: 0.4px;
}

/* Header */
.topbar, .footer { background: #1c1c1c; color: #b9b4ac; }
.header { background: var(--surface); border-bottom: 1px solid #1c1c1c; box-shadow: none; }
.logo { color: #1c1c1c; }
.logo-mark { background: #1c1c1c; color: #f3f1ed; }
.logo-text span { color: var(--accent); }
.cats { background: var(--surface); border-bottom: 1px solid var(--border); }
.cat-chip { text-transform: uppercase; letter-spacing: 0.6px; font-size: 12px; border: 1px solid transparent; }
.cat-chip:hover { background: transparent; border-color: #1c1c1c; color: #1c1c1c; }
.cat-chip.active { background: #1c1c1c; color: #f3f1ed; border-color: #1c1c1c; }
.search { background: var(--surface); border: 1px solid #1c1c1c; box-shadow: none; }
.search button { background: #1c1c1c; }
.cart-btn { border: 1px solid #1c1c1c; background: transparent; color: #1c1c1c; text-transform: uppercase; font-size: 12px; letter-spacing: 0.6px; }
.cart-btn:hover { background: #1c1c1c; color: #f3f1ed; }
.cart-count { background: var(--accent); }

/* Hero */
.hero { background: #1c1c1c; }
.hero::after {
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 1;
}
.hero-title { text-transform: uppercase; letter-spacing: 0; }
.hero-title span { color: var(--accent-2); }
.hero-kicker { color: #c9a06a; }
.hero-cta { background: var(--accent); color: #fff; text-transform: uppercase; letter-spacing: 0.6px; box-shadow: none; }
.hero-ghost { border: 1px solid #6a655e; background: transparent; text-transform: uppercase; letter-spacing: 0.6px; }
.hero-ghost:hover { background: rgba(255,255,255,.08); }

/* Car selector */
.car-select { background: var(--surface); border: 1px solid #1c1c1c; box-shadow: none; }
.car-select-btn { background: #1c1c1c; text-transform: uppercase; letter-spacing: 0.5px; font-size: 12px; }
.car-select-btn.ghost { background: transparent; border: 1px solid #1c1c1c; color: #1c1c1c; }

/* Category tiles */
.cat-tile { background: var(--surface); border: 1px solid #1c1c1c; transition: none; }
.cat-tile:hover { transform: none; box-shadow: 3px 3px 0 #1c1c1c; border-color: #1c1c1c; }
.cat-tile-icon { background: #1c1c1c; color: #f3f1ed; }
.cat-tile-name { text-transform: uppercase; letter-spacing: 0.5px; font-size: 13px; }

/* Benefits */
.benefit { background: var(--surface); border: 1px solid #1c1c1c; }
.benefit b { text-transform: uppercase; letter-spacing: 0.5px; font-size: 13px; }

/* Products */
.card { background: var(--surface); border: 1px solid #1c1c1c; box-shadow: none; transition: none; }
.card:hover { transform: none; box-shadow: 4px 4px 0 #1c1c1c; }
.card-media { background: #2b2b2b !important; }
.card-media-mono { color: rgba(255,255,255,.42); }
.card-brand { color: var(--muted); }
.add-btn { text-transform: uppercase; letter-spacing: 0.6px; font-size: 12px; }
.section-title { text-transform: uppercase; font-size: 20px; letter-spacing: 0.6px; }

/* Panels, filters, forms */
.panel, .filters { background: var(--surface); border: 1px solid #1c1c1c; }
.filters { border-right: 1px solid #1c1c1c; }
.field input, .field select, .field textarea { border: 1px solid #1c1c1c; background: #fff; }
.pay-btn, .reset-btn { border: 1px solid #1c1c1c; }

/* Footer */
.footer-col h4 { text-transform: uppercase; letter-spacing: 0.6px; }

