:root {
  --bg: #f4f5f6;
  --surface: #ffffff;
  --surface-alt: #f9fafb;
  --dark: #181c20;
  --dark-2: #23282e;
  --text: #1f2429;
  --muted: #5c6570;
  --border: #dfe3e8;
  --border-strong: #c8cfd6;
  --red: #c8102e;
  --red-hover: #a60d26;
  --green: #15803d;
  --green-bg: #ecfdf3;
  --warn: #b45309;
  --warn-bg: #fef3c7;
  --danger-bg: #fef2f2;
  --radius: 3px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
main, .page-main {
  flex: 1 0 auto;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.site-header, .shop-nav, .site-footer {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--red); }
button, input, select, textarea { font: inherit; }
img { max-width: 100%; display: block; }

.wrap { width: 100%; max-width: 1360px; min-width: 0; margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* Header & Topbar */
.topbar {
  background: var(--dark);
  color: #cfd5dc;
  font-size: 12px;
  border-bottom: 1px solid #2d333b;
}
.topbar-inner {
  min-height: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
}
.topbar-links { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.topbar a { color: #e5e9ef; }
.topbar a:hover { color: #ffffff; text-decoration: underline; }

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 0;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-logo { height: 46px; width: auto; max-width: 190px; object-fit: contain; display: block; }
.brand-admin-tag { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; padding: 3px 7px; border-radius: 3px; background: var(--dark); color: #ffffff; text-transform: uppercase; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: var(--red);
  color: #ffffff;
  border-radius: var(--radius);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.brand-text strong { display: block; font-size: 17px; letter-spacing: 0.04em; color: var(--text); line-height: 1.1; }
.brand-text small { display: block; font-size: 10px; letter-spacing: 0.12em; color: var(--muted); }

.header-search {
  flex: 1;
  max-width: 620px;
  display: flex;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.header-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 9px 12px;
  font-size: 14px;
  color: var(--text);
  background: transparent;
}
.header-search button {
  border: 0;
  background: var(--dark-2);
  color: #ffffff;
  padding: 0 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}
.header-search button:hover { background: var(--red); }

.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.header-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.header-btn:hover { border-color: var(--text); color: var(--text); }
.header-btn-cart { background: var(--red); border-color: var(--red); color: #ffffff; }
.header-btn-cart:hover { background: var(--red-hover); border-color: var(--red-hover); color: #ffffff; }
.cart-badge {
  background: #ffffff;
  color: var(--red);
  border-radius: 2px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 700;
}

.shop-nav {
  background: var(--dark-2);
  color: #e4e7ec;
  border-bottom: 2px solid var(--red);
}
.shop-nav-inner {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
}
.shop-nav a {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  color: #e4e7ec;
}
.shop-nav a:hover, .shop-nav a.active {
  background: var(--dark);
  color: #ffffff;
}

/* Icons */
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.icon-sm { width: 15px; height: 15px; }
.icon-lg { width: 28px; height: 28px; }

/* Buttons & Forms */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.25;
}
.button-primary { background: var(--red); color: #ffffff; border-color: var(--red); }
.button-primary:hover { background: var(--red-hover); border-color: var(--red-hover); color: #ffffff; }
.button-dark { background: var(--dark-2); color: #ffffff; border-color: var(--dark-2); }
.button-dark:hover { background: var(--dark); color: #ffffff; }
.button-outline { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.button-outline:hover { border-color: var(--text); color: var(--text); }
.button:disabled { opacity: 0.45; cursor: not-allowed; }
.button-sm { padding: 6px 10px; font-size: 12px; }
.button-full { width: 100%; }

label.field { display: grid; gap: 5px; font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 12px; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"], select, textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(200, 16, 46, 0.2); border-color: var(--red); }

/* Main Sections */
.page-main { padding: 18px 0 44px; }
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 18px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.section-head h1, .section-head h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
}
.text-link { color: var(--red); font-size: 13px; font-weight: 600; }
.text-link:hover { text-decoration: underline; }

/* Finder Bar */
.finder-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--red);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 14px;
}
.finder-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.finder-title-row h1 { margin: 0; font-size: 18px; font-weight: 700; }
.finder-title-row span { font-size: 12px; color: var(--muted); }
.finder-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  gap: 10px;
  align-items: end;
}
.finder-grid label { display: grid; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }

/* Offer / USPs Strip */
.usp-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.usp-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 12px;
}
.usp-item svg { color: var(--red); }
.usp-item strong { display: block; font-size: 13px; color: var(--text); }
.usp-item span { color: var(--muted); }

/* Popular Categories */
.cat-bar {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.cat-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  color: var(--text);
}
.cat-tile:hover, .cat-tile.active {
  border-color: var(--red);
  background: #fff9fa;
  color: var(--text);
}
.cat-tile svg { color: var(--dark-2); }
.cat-tile.active svg, .cat-tile:hover svg { color: var(--red); }
.cat-tile strong { font-size: 13px; font-weight: 700; }
.cat-tile small { font-size: 11px; color: var(--muted); }

/* Catalog Toolbar & Filters */
.catalog-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-tab {
  padding: 6px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.filter-tab.active, .filter-tab:hover {
  background: var(--dark-2);
  border-color: var(--dark-2);
  color: #ffffff;
}
.filter-inputs { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filter-inputs select { width: auto; min-width: 140px; }
.filter-inputs input[type="number"] { width: 92px; }

/* 4-5 Column Compact Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.product-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.product-card:hover { border-color: var(--border-strong); }
.product-thumb {
  height: 195px;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  display: block;
  color: #8b949e;
  position: relative;
  padding: 0;
  overflow: hidden;
}
.product-thumb img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform .22s ease;
}
.product-card:hover .product-thumb img {
  transform: scale(1.03);
}
.product-thumb-caption {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  font-size: 11px;
  color: var(--muted);
}
.product-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 12px;
  gap: 4px;
}
.product-brand { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--muted); letter-spacing: 0.03em; }
.product-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}
.product-title a:hover { color: var(--red); }
.product-meta-line { font-size: 12px; color: var(--muted); line-height: 1.35; }
.stock-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 2px;
  width: fit-content;
  margin-top: 2px;
}
.stock-in { background: var(--green-bg); color: var(--green); }
.stock-out { background: var(--danger-bg); color: var(--red); }
.product-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.price-block strong { display: block; font-size: 17px; font-weight: 800; color: var(--text); }
.price-block small { display: block; font-size: 11px; color: var(--muted); }

/* Pagination */
.pagination-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* Vehicles Autoportal List & Detail */
.vehicle-list { display: grid; gap: 12px; }
.vehicle-row {
  display: grid;
  grid-template-columns: 240px 1fr 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.vehicle-row-img {
  background: var(--surface-alt);
  border-right: 1px solid var(--border);
  display: block;
  min-height: 180px;
  color: #8b949e;
  padding: 0;
  overflow: hidden;
  position: relative;
}
.vehicle-row-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.vehicle-row-info { padding: 14px 18px; }
.vehicle-row-info h3 { margin: 0 0 8px; font-size: 17px; }
.spec-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.spec-chip {
  font-size: 12px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 2px;
  color: var(--text);
}
.vehicle-row-buy {
  padding: 14px 18px;
  border-left: 1px solid var(--border);
  background: var(--surface-alt);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}
.vehicle-row-buy .price { font-size: 20px; font-weight: 800; }

/* Product & Vehicle Detail 3-Column Layout */
.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.detail-3col {
  display: grid;
  grid-template-columns: 340px 1fr 310px;
  gap: 18px;
  align-items: start;
}
.gallery-main {
  border: 1px solid var(--border);
  background: var(--surface-alt);
  height: 340px;
  display: block;
  padding: 0;
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
}
.gallery-main img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: center;
  display: block;
  transform-origin: center center;
  transition: transform .1s ease-out;
  user-select: none;
  -webkit-user-drag: none;
}
.gallery-main.is-zooming { cursor: zoom-in; }
.gallery-zoom-hint {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: rgba(15, 20, 26, 0.8);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  pointer-events: none;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.gallery-thumbs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.gallery-thumb {
  width: 64px;
  height: 64px;
  border: 2px solid var(--border);
  background: var(--surface);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  display: block;
  border-radius: 2px;
}
.gallery-thumb img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: center;
  display: block;
}
.gallery-thumb.active { border-color: var(--red); }
.buy-box {
  border: 1px solid var(--border);
  border-top: 3px solid var(--red);
  background: var(--surface-alt);
  padding: 16px;
  border-radius: var(--radius);
}
.qty-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 12px 0;
}
.qty-row button { width: 32px; height: 34px; border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; font-weight: 700; }
.qty-row input { width: 58px; text-align: center; height: 34px; }

/* Tables */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.data-table th {
  background: var(--surface-alt);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 700;
}
.spec-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.spec-table th, .spec-table td { padding: 7px 10px; border-bottom: 1px solid var(--border); text-align: left; }
.spec-table th { width: 38%; color: var(--muted); font-weight: 600; background: var(--surface-alt); }

/* Status Badges & Alerts */
.badge {
  display: inline-block;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 2px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
}
.badge-ok { background: var(--green-bg); color: var(--green); border-color: #bbf7d0; }
.badge-warn { background: var(--warn-bg); color: var(--warn); border-color: #fde68a; }
.badge-err { background: var(--danger-bg); color: var(--red); border-color: #fecaca; }

.alert {
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-alt);
  font-size: 13px;
  margin-bottom: 14px;
}
.alert-ok { background: var(--green-bg); border-color: #bbf7d0; color: #14532d; }
.alert-err { background: var(--danger-bg); border-color: #fecaca; color: #7f1d1d; }

/* Checkout Stepper */
.stepper {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-bottom: 18px;
}
.step-btn {
  padding: 9px 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
}
.step-btn.active {
  background: var(--dark-2);
  border-color: var(--dark-2);
  color: #ffffff;
}
.step-btn.done {
  border-color: var(--green);
  color: var(--green);
}
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 18px;
  align-items: start;
}

/* Account & Admin Sidebar Layouts */
.sidebar-layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 18px;
  align-items: start;
}
.sidebar-nav {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.sidebar-nav button, .sidebar-nav a {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.sidebar-nav button:last-child, .sidebar-nav a:last-child { border-bottom: 0; }
.sidebar-nav button.active, .sidebar-nav a.active, .sidebar-nav button:hover, .sidebar-nav a:hover {
  background: var(--surface-alt);
  color: var(--red);
  border-left: 3px solid var(--red);
}
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.kpi-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.kpi-box small { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; }
.kpi-box strong { display: block; font-size: 22px; font-weight: 800; margin-top: 2px; }

/* Footer */
.site-footer {
  margin-top: auto;
  background: var(--dark);
  color: #cfd5dc;
  border-top: 3px solid var(--red);
  padding: 32px 0 18px;
  font-size: 13px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid #2d333b;
}
.footer-grid h4 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: #ffffff; }
.footer-grid a, .footer-grid p { display: block; margin: 0 0 6px; color: #aeb6c0; font-size: 13px; }
.footer-grid a:hover { color: #ffffff; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  font-size: 12px;
  color: #8b949e;
  gap: 10px;
  flex-wrap: wrap;
}
.footer-bottom a { color: #cfd5dc; }

/* App Promo Banner */
.app-promo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: var(--dark);
  color: #ffffff;
  border: 1px solid #2d333b;
  border-left: 4px solid var(--red);
  border-radius: 6px;
  padding: 20px 24px;
  margin-bottom: 18px;
}
.app-promo-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1 1 320px;
}
.app-promo-icon {
  width: 68px;
  height: 68px;
  border-radius: 14px;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.15);
}
.app-promo-title { margin: 0 0 4px; font-size: 18px; font-weight: 700; color: #ffffff; }
.app-promo-sub { margin: 0; font-size: 13px; color: #cfd5dc; line-height: 1.45; }
.app-promo-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.app-promo-meta { font-size: 11.5px; color: #9aa3ad; }
html.in-koder-app .app-promo,
html.in-koder-app .app-download-only-web { display: none !important; }

.empty-state { padding: 24px; text-align: center; color: var(--muted); background: var(--surface-alt); border: 1px dashed var(--border); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

/* Responsive Tablet & Mobile */
@media (max-width: 1279px) {
  .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .wrap { padding: 0 16px; }
  .brand-logo { height: 40px; max-width: 165px; }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cat-bar { grid-template-columns: repeat(3, 1fr); }
  .detail-3col { grid-template-columns: 1fr 1fr; }
  .detail-3col > :last-child { grid-column: span 2; }
  .vehicle-row { grid-template-columns: 200px 1fr; }
  .vehicle-row-buy { grid-column: span 2; border-left: 0; border-top: 1px solid var(--border); flex-direction: row; align-items: center; }
  .checkout-layout, .sidebar-layout { grid-template-columns: 1fr; }
  .sidebar-nav { display: flex; overflow-x: auto; gap: 6px; padding: 8px; scrollbar-width: none; }
  .sidebar-nav::-webkit-scrollbar { display: none; }
  .sidebar-nav button, .sidebar-nav a { width: auto; flex-shrink: 0; border: 1px solid var(--border); border-radius: 4px; padding: 8px 12px; }
  .sidebar-nav button.active, .sidebar-nav a.active { border-left: 1px solid var(--red); border-color: var(--red); background: var(--red); color: #ffffff; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 18px; }
}
@media (max-width: 767px) {
  html, body { overflow-x: hidden; max-width: 100%; }
  .wrap { padding: 0 12px; }
  .page-main { padding: 12px 0 32px; }
  .header-inner { flex-wrap: wrap; gap: 8px; padding: 8px 0; }
  .brand-logo { height: 32px; max-width: 130px; }
  .header-actions { margin-left: auto; gap: 6px; min-width: 0; }
  .header-btn { padding: 6px 9px; font-size: 12.5px; min-height: 40px; gap: 5px; }
  .header-search { order: 3; flex: 1 1 100%; width: 100%; max-width: none; min-width: 0; }
  .header-search button { padding: 0 12px; flex-shrink: 0; }
  input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"], select, textarea { font-size: 16px; min-height: 40px; }
  .shop-nav-inner { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .shop-nav-inner::-webkit-scrollbar { display: none; }
  .shop-nav-inner a { white-space: nowrap; flex-shrink: 0; }
  .finder-grid { grid-template-columns: 1fr; }
  .finder-grid > button { grid-column: auto; }
  .usp-bar { grid-template-columns: 1fr; }
  .cat-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .cat-tile { min-width: 0; padding: 10px; }
  .cat-tile strong, .cat-tile small { overflow-wrap: anywhere; }
  .panel { padding: 14px; max-width: 100%; overflow-x: hidden; }
  .section-head { flex-wrap: wrap; gap: 6px; }
  .section-head h1, .section-head h2 { font-size: 17px; }
  .catalog-toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
  .filter-tabs { flex-wrap: wrap; gap: 6px; }
  .filter-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; }
  .filter-inputs select, .filter-inputs input { width: 100% !important; min-width: 0 !important; max-width: none !important; }
  .filter-inputs .veh-search-full { grid-column: 1 / -1; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product-thumb { height: 150px; padding: 0; }
  .product-thumb img { max-height: none; width: 100%; height: 100%; object-fit: cover; }
  .detail-3col { grid-template-columns: 1fr; }
  .detail-3col > :last-child { grid-column: auto; }
  .gallery-main { height: 240px; padding: 0; }
  .gallery-thumb { width: 56px; height: 56px; }
  .veh-feature-list { grid-template-columns: 1fr !important; }
  .vehicle-row { grid-template-columns: 1fr; }
  .vehicle-row-img { border-right: 0; border-bottom: 1px solid var(--border); height: 200px; min-height: 200px; padding: 0; }
  .vehicle-row-img img { max-height: none; width: 100%; height: 100%; object-fit: cover; }
  .vehicle-row-buy { grid-column: auto; flex-direction: column; align-items: stretch; }
  .stepper { grid-template-columns: 1fr 1fr; }
  .step-btn { min-height: 40px; }
  .kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .grid-3, .footer-grid { grid-template-columns: 1fr; }
  .grid-2 > *, .grid-3 > *, .detail-3col > *, .finder-grid > *, .cat-bar > *, .product-grid > *, .filter-inputs > *, .checkout-layout > *, .sidebar-layout > *, .vehicle-list > *, .vehicle-row > *, .veh-feature-list > * { min-width: 0; overflow-wrap: anywhere; }
  .spec-table { table-layout: fixed; width: 100%; }
  .spec-table th { width: 42%; }
  .spec-table th, .spec-table td { overflow-wrap: anywhere; word-break: break-word; padding: 7px 6px; }
  .account-subnav { padding: 8px 10px; }
  .account-subnav-links { flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; padding-bottom: 2px; }
  .account-subnav-links a { flex-shrink: 0; padding: 7px 10px; }
  .data-table { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .app-promo { padding: 16px; }
  .app-promo-left { flex-basis: 100%; }
  .app-promo-actions { align-items: flex-start; width: 100%; }
  .app-promo-actions .button { width: 100%; justify-content: center; }
  .button { min-height: 42px; }
  .button-sm { min-height: 36px; }
}
@media (max-width: 480px) {
  .brand-logo { height: 28px; max-width: 108px; }
  .header-btn { padding: 6px 8px; font-size: 12px; gap: 4px; }
  #cart-sum-badge { display: none; }
}
@media (max-width: 420px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .product-body { padding: 9px; }
  .product-title { font-size: 13px; }
  .stepper { grid-template-columns: 1fr; }
}

/* Admin Bild-Freisteller (remove.bg Studio) */
.bg-dropzone {
  border: 2px dashed var(--border-strong);
  background: var(--surface-alt);
  border-radius: 6px;
  padding: 16px;
  text-align: center;
  margin-bottom: 12px;
}
.bg-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.bg-stage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.bg-stage-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  min-width: 0;
}
.bg-stage-label {
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
}
.bg-canvas-wrap {
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}
.bg-canvas-wrap canvas {
  max-width: 100%;
  max-height: 360px;
  height: auto;
  width: auto;
  display: block;
}
.bg-checker {
  background-color: #ffffff;
  background-image:
    linear-gradient(45deg, #e5e7eb 25%, transparent 25%),
    linear-gradient(-45deg, #e5e7eb 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e5e7eb 75%),
    linear-gradient(-45deg, transparent 75%, #e5e7eb 75%);
  background-size: 18px 18px;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
}
@media (max-width: 767px) {
  .bg-stage-grid { grid-template-columns: 1fr; }
}

/* Bild-Zoom Lightbox (Produkt- & Fahrzeuggalerie) */
.koder-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(12, 16, 22, 0.94);
  color: #ffffff;
  display: none;
  flex-direction: column;
  user-select: none;
}
.koder-lightbox.open { display: flex; }
.koder-lb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(18, 24, 32, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.koder-lb-title {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.koder-lb-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.koder-lb-btn {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.koder-lb-btn:hover { background: rgba(255, 255, 255, 0.24); }
.koder-lb-btn-close {
  background: var(--red, #c8102e);
  border-color: var(--red, #c8102e);
}
.koder-lb-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  padding: 12px;
}
.koder-lb-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform-origin: center center;
  transition: transform 0.12s ease-out;
  cursor: zoom-in;
  -webkit-user-drag: none;
}
.koder-lb-img.zoomed { cursor: grab; }
.koder-lb-img.dragging { cursor: grabbing; transition: none; }
.koder-lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(15, 20, 26, 0.72);
  color: #ffffff;
  font-size: 26px;
  line-height: 1;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.koder-lb-nav:hover { background: rgba(200, 16, 46, 0.9); }
.koder-lb-prev { left: 14px; }
.koder-lb-next { right: 14px; }
.koder-lb-thumbs {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 10px 14px;
  background: rgba(18, 24, 32, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  overflow-x: auto;
}
.koder-lb-thumb {
  width: 56px;
  height: 56px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  overflow: hidden;
  background: #1f2630;
  cursor: pointer;
  flex-shrink: 0;
}
.koder-lb-thumb.active { border-color: var(--red, #c8102e); }
.koder-lb-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 768px) {
  .koder-lb-nav { width: 36px; height: 44px; font-size: 22px; }
  .koder-lb-prev { left: 6px; }
  .koder-lb-next { right: 6px; }
}

/* Echte Maps-Adresssuche & Kartenvorschau */
.geo-ac-wrap {
  position: relative;
  margin-bottom: 12px;
  padding: 10px 12px;
  background: var(--surface-alt, #f6f7f9);
  border: 1px solid var(--border, #d8dde3);
  border-radius: 6px;
}
.geo-ac-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text, #181c20);
  margin-bottom: 6px;
}
.geo-ac-badge {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted, #5c6670);
  background: #ffffff;
  border: 1px solid var(--border, #d8dde3);
  border-radius: 3px;
  padding: 1px 6px;
}
.geo-ac-input-row {
  position: relative;
  display: flex;
  align-items: center;
}
.geo-ac-icon {
  position: absolute;
  left: 10px;
  color: var(--red, #c8102e);
  pointer-events: none;
  display: flex;
}
.geo-ac-input {
  width: 100%;
  padding-left: 34px !important;
  padding-right: 32px !important;
  background: #ffffff;
}
.geo-ac-clear {
  position: absolute;
  right: 8px;
  border: 0;
  background: transparent;
  color: var(--muted, #5c6670);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  display: none;
}
.geo-ac-clear.visible { display: block; }
.geo-ac-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 60;
  background: #ffffff;
  border: 1px solid var(--border-strong, #b8c0cc);
  border-radius: 6px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.14);
  max-height: 260px;
  overflow-y: auto;
  display: none;
}
.geo-ac-menu.open { display: block; }
.geo-ac-item {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #eef1f4;
  background: #ffffff;
  text-align: left;
  padding: 9px 12px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 9px;
}
.geo-ac-item:last-child { border-bottom: 0; }
.geo-ac-item:hover, .geo-ac-item.active { background: #fdf2f4; }
.geo-ac-item-pin { color: var(--red, #c8102e); flex-shrink: 0; margin-top: 2px; }
.geo-ac-item-main { font-size: 13px; font-weight: 700; color: var(--text, #181c20); line-height: 1.3; }
.geo-ac-item-sub { font-size: 11.5px; color: var(--muted, #5c6670); line-height: 1.3; margin-top: 1px; }
.geo-ac-status { padding: 10px 12px; font-size: 12px; color: var(--muted, #5c6670); }
.geo-ac-preview {
  margin-top: 8px;
  font-size: 12px;
  display: none;
}
.geo-ac-preview.visible { display: block; }
.geo-ac-verified {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  background: #eefaf1;
  border: 1px solid #bbf7d0;
  border-radius: 4px;
  color: #14532d;
}
.geo-ac-mapframe {
  margin-top: 8px;
  width: 100%;
  height: 190px;
  border: 1px solid var(--border, #d8dde3);
  border-radius: 4px;
  display: block;
  background: #e5e7eb;
}

