/* ── Reset & base ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:    #1F4E8C;
  --blue-d:  #163a6b;
  --blue-l:  #2a66b8;
  --yellow:  #FFC400;
  --yellow-d:#e6b000;
  --gray:    #6B7280;
  --light:   #F3F4F6;
  --white:   #FFFFFF;
  --border:  #E5E7EB;
  --text:    #111827;
  --text-s:  #6B7280;
  --radius:  6px;
  --shadow:  0 1px 8px rgba(0,0,0,.08);
  --shadow-h:0 4px 20px rgba(0,0,0,.14);
  --trans:   .18s ease;
}

html  { scroll-behavior: smooth; }
body  {
  font-family: 'Montserrat', 'Noto Sans Georgian', 'Segoe UI', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1.4rem;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--trans), color var(--trans), border-color var(--trans),
              box-shadow var(--trans);
  text-decoration: none;
}
.btn-primary {
  background: var(--yellow);
  color: var(--blue-d);
  border-color: var(--yellow);
}
.btn-primary:hover {
  background: var(--yellow-d);
  border-color: var(--yellow-d);
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(255,196,0,.4);
}
.btn-outline {
  background: transparent;
  color: var(--yellow);
  border-color: var(--yellow);
}
.btn-outline:hover {
  background: var(--yellow);
  color: var(--blue-d);
  text-decoration: none;
}
.btn-sm   { padding: .35rem .9rem; font-size: .8rem; }
.btn-full { width: 100%; justify-content: center; }
.btn-group { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; }

/* ── Logo ───────────────────────────────────────────────────────────────── */
.logo {
  display: flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
  flex-shrink: 0;
}
.logo:hover { text-decoration: none; }

.logo-icon-b {
  width: 42px;
  height: 42px;
  background: var(--yellow);
  color: var(--blue-d);
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  transform: rotate(15deg);
  flex-shrink: 0;
  box-shadow: 2px 2px 0 rgba(0,0,0,.15);
}

.logo-text-block {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.logo-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: .06em;
}
.logo-sub {
  font-size: .6rem;
  font-weight: 600;
  color: var(--yellow);
  letter-spacing: .18em;
  text-transform: uppercase;
}

/* ── Navbar ─────────────────────────────────────────────────────────────── */
.navbar {
  background: var(--blue);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(31,78,140,.4);
  border-bottom: 3px solid var(--yellow);
}
.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: .75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-links {
  display: flex;
  gap: 1.75rem;
  flex: 1;
}
.nav-links a {
  color: rgba(255,255,255,.8);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-decoration: none;
  transition: color var(--trans);
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover {
  color: var(--yellow);
  border-bottom-color: var(--yellow);
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}
.nav-auth {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.nav-phone { color: rgba(255,255,255,.65); font-size: .8rem; }
.nav-profile-link {
  color: rgba(255,255,255,.85);
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  transition: color var(--trans);
}
.nav-profile-link:hover { color: var(--yellow); }

/* Language switcher */
.lang-switcher {
  display: flex;
  gap: 2px;
  background: rgba(255,255,255,.1);
  border-radius: 5px;
  padding: 2px;
}
.lang-btn {
  padding: .2rem .45rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: rgba(255,255,255,.6);
  border-radius: 4px;
  text-decoration: none;
  transition: background var(--trans), color var(--trans);
}
.lang-btn:hover       { color: var(--white); background: rgba(255,255,255,.15); text-decoration: none; }
.lang-btn-active      { background: var(--yellow); color: var(--blue-d) !important; }

/* ── Container ──────────────────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Main ───────────────────────────────────────────────────────────────── */
.main { flex: 1; }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--blue-d) 0%, var(--blue) 55%, #2a5fa8 100%);
  padding: 5rem 1.5rem 5.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 80px,
      rgba(255,255,255,.02) 80px,
      rgba(255,255,255,.02) 81px
    ),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 80px,
      rgba(255,255,255,.02) 80px,
      rgba(255,255,255,.02) 81px
    );
  pointer-events: none;
}
.hero-body {
  max-width: 680px;
  margin: 0 auto;
  position: relative;
}
.hero-eyebrow {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--yellow);
  background: rgba(255,196,0,.12);
  border: 1px solid rgba(255,196,0,.3);
  padding: .25rem .75rem;
  border-radius: 20px;
  margin-bottom: 1.25rem;
}
.hero-title {
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: .25rem;
}
.hero-title::after {
  content: '';
  display: block;
  width: 56px;
  height: 4px;
  background: var(--yellow);
  margin: .9rem auto 0;
  border-radius: 2px;
}
.hero-sub {
  font-size: 1rem;
  color: rgba(255,255,255,.72);
  margin: 1.25rem 0 2.25rem;
  font-weight: 500;
}

/* Search ── */
.search-row {
  display: flex;
  gap: 0;
  max-width: 540px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,.25);
}
.search-input {
  flex: 1;
  padding: .85rem 1.2rem;
  border: none;
  font-family: inherit;
  font-size: .95rem;
  background: var(--white);
  color: var(--text);
  outline: none;
}
.search-input::placeholder { color: var(--gray); }
.search-btn {
  flex-shrink: 0;
  border-radius: 0;
  padding: .85rem 1.5rem;
  font-size: .875rem;
}

/* ── Sections ───────────────────────────────────────────────────────────── */
.section     { padding: 4.5rem 0; }
.section-alt { background: var(--light); }

.section-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--blue);
  margin-bottom: .4rem;
  letter-spacing: -.01em;
}
.section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--yellow);
  margin-top: .5rem;
  border-radius: 2px;
}
.section-sub { color: var(--text-s); margin-top: .75rem; margin-bottom: 0; font-size: .9rem; }

/* ── Catalog cards ──────────────────────────────────────────────────────── */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}
.catalog-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--yellow);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform var(--trans), box-shadow var(--trans);
  display: flex;
  flex-direction: column;
  gap: .65rem;
  align-items: center;
}
.catalog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-h);
}
.card-icon  { font-size: 2rem; }
.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: .01em;
}
.card-desc  { font-size: .85rem; color: var(--text-s); flex: 1; }

/* ── About ──────────────────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  margin-top: 2rem;
}
.about-col h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: .75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.about-col ul { display: flex; flex-direction: column; gap: .5rem; }
.about-col li {
  padding-left: 1.4rem;
  position: relative;
  color: var(--text-s);
  font-size: .9rem;
}
.about-col li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .55em;
  width: 8px;
  height: 8px;
  background: var(--yellow);
  border-radius: 50%;
}
.about-col p { color: var(--text-s); margin-bottom: .75rem; font-size: .9rem; }

/* ── Contacts ───────────────────────────────────────────────────────────── */
.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--yellow);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  box-shadow: var(--shadow);
}
.contact-icon { font-size: 1.25rem; flex-shrink: 0; margin-top: .1rem; }
.contact-text strong {
  display: block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: .2rem;
}

/* ── Auth ───────────────────────────────────────────────────────────────── */
.auth-container { max-width: 460px; }
.auth-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 4px solid var(--yellow);
  border-radius: var(--radius);
  padding: 2.25rem;
  box-shadow: var(--shadow);
  margin-top: 1.5rem;
}
.auth-card .auth-form { margin-top: 1.25rem; }
.profile-summary {
  font-size: 1.4rem; font-weight: 800; color: var(--blue);
  cursor: pointer; list-style: none; display: flex; align-items: center; gap: .5rem;
  user-select: none;
}
.profile-summary::-webkit-details-marker { display: none; }
.profile-summary::before { content: '▸'; font-size: 1rem; color: var(--text-s); transition: transform .2s; }
details[open] > .profile-summary::before { transform: rotate(90deg); }
.auth-title { font-size: 1.4rem; font-weight: 800; margin-bottom: .4rem; color: var(--blue); }
.auth-sub   { color: var(--text-s); margin-bottom: 1.5rem; font-size: .9rem; }
.auth-form  { display: flex; flex-direction: column; gap: 1.1rem; }
.auth-hint  { margin-top: .9rem; font-size: .85rem; text-align: center; color: var(--text-s); }

.form-group { display: flex; flex-direction: column; gap: .35rem; }
.form-group label { font-weight: 700; font-size: .8rem; color: var(--blue); text-transform: uppercase; letter-spacing: .04em; }
.form-input {
  padding: .65rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: .95rem;
  outline: none;
  transition: border-color var(--trans);
  width: 100%;
}
.form-input:focus { border-color: var(--blue); }
.form-input-code  { font-size: 1.8rem; letter-spacing: .5rem; text-align: center; font-weight: 700; }

.channel-group {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .9rem 1rem;
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
.channel-group legend { font-weight: 700; font-size: .75rem; text-transform: uppercase;
                        letter-spacing: .04em; color: var(--gray); padding: 0 .3rem; }
.radio-label {
  display: flex;
  align-items: center;
  gap: .35rem;
  cursor: pointer;
  font-size: .875rem;
  font-weight: 600;
  padding: .3rem .6rem;
  border-radius: 4px;
  transition: background var(--trans);
}
.radio-label:hover { background: var(--light); }
.radio-label input { accent-color: var(--blue); }

.error-msg {
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-left: 4px solid #ef4444;
  border-radius: var(--radius);
  padding: .75rem 1rem;
  font-size: .875rem;
  margin-bottom: 1rem;
}
.success-msg {
  color: #166534;
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-left: 4px solid #22c55e;
  border-radius: var(--radius);
  padding: .75rem 1rem;
  font-size: .875rem;
  margin-bottom: 1rem;
}

/* ── Search results ─────────────────────────────────────────────────────── */
.search-result { margin-top: 1rem; }
.search-result p { color: var(--text-s); margin: .75rem 0; }
.search-empty { color: var(--text-s); padding: 2rem 0; }
.search-sub-title { font-size: 1rem; font-weight: 700; color: var(--blue);
  margin: 1.5rem 0 .6rem; }

/* article & VIN results tables */
/* article list with optional details */
.arts-list { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 1.5rem; }
.art-header { background: var(--blue); color: #fff; font-weight: 700;
  font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.art-row { display: grid; grid-template-columns: 2fr 2fr 1fr;
  gap: .5rem; padding: .55rem 1rem; align-items: center; }
.art-item { border-bottom: 1px solid var(--border); }
.art-item:last-child { border-bottom: none; }
.art-item:hover > .art-row { background: var(--light); }
.art-artno { font-weight: 700; color: var(--blue); }
.art-artno-link { font-weight: 700; color: var(--blue); text-decoration: none; }
.art-artno-link:hover { text-decoration: underline; }
.art-brand  { color: var(--text); }
.art-type   { color: var(--text-s); font-size: .8rem; }
.art-type-stock { background: #e8f0fb; color: var(--blue); border-radius: 4px;
  padding: .1rem .4rem; font-size: .72rem; font-weight: 600; }

/* stock block */
.stock-block { display: flex; flex-wrap: wrap; gap: .4rem;
  padding: .3rem 1rem .55rem; }
.stock-row { display: flex; align-items: center; gap: .5rem;
  background: var(--light); border-radius: 6px; padding: .25rem .6rem;
  font-size: .8rem; }
.stock-warehouse { color: var(--text-s); }
.stock-qty { font-weight: 600; }
.stock-qty-ok   { color: #1a7a3a; }
.stock-qty-zero { color: #b94a4a; }
.stock-price { color: var(--blue); font-weight: 600; }

/* cart add */
.cart-add-row { display: flex; align-items: center; gap: .5rem; margin-top: .4rem; }
.cart-qty-input { width: 60px; padding: .3rem .5rem; border: 1px solid var(--border);
  border-radius: 6px; font-size: .85rem; text-align: center; }
.cart-btn-incart { margin-top: .4rem; }

/* nav cart */
.nav-cart-link { position: relative; margin-right: .75rem; font-size: 1.2rem;
  text-decoration: none; display: inline-flex; align-items: center; }
.cart-badge { position: absolute; top: -7px; right: -10px;
  background: #e74c3c; color: #fff; border-radius: 10px;
  font-size: .62rem; padding: 1px 5px; font-weight: 700;
  pointer-events: none; }

/* cart page */
.cart-wrap { overflow-x: auto; margin-bottom: 1.5rem; }
.cart-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.cart-table th { background: var(--blue); color: #fff; padding: .6rem 1rem;
  text-align: left; }
.cart-td { padding: .6rem 1rem; border-bottom: 1px solid var(--border); }
.cart-td-center { text-align: center; }
.cart-td-right  { text-align: right; }
.cart-total { font-weight: 700; font-size: 1rem; color: var(--blue); }
.cart-order-btn { margin-top: .5rem; }
.btn-danger { color: #b94a4a; border-color: #b94a4a; }
.btn-danger:hover { background: #b94a4a; color: #fff; }
.btn-remove { background: none; border: none; cursor: pointer; color: #b94a4a;
  font-size: 1rem; padding: .2rem .4rem; border-radius: 4px; }
.btn-remove:hover { background: #fdecea; }
.cart-article { font-weight: 700; color: var(--blue); }
.cart-article-link { font-weight: 700; color: var(--blue); text-decoration: none; }
.cart-article-link:hover { text-decoration: underline; }
.cart-brand   { font-size: .8rem; color: var(--text-s); margin-top: .15rem; }
.cart-price-unit  { font-size: .8rem; color: var(--text-s); }
.cart-qty-label   { font-size: .8rem; color: var(--text-s); }
.cart-price-total { font-weight: 700; color: var(--blue); }
.cart-qty-ctrl { display: flex; align-items: center; gap: .25rem; }
.cart-qty-btn {
  width: 28px; height: 28px; border: 1px solid var(--border); background: var(--white);
  border-radius: 6px; cursor: pointer; font-size: 1.1rem; line-height: 1;
  color: var(--blue); display: flex; align-items: center; justify-content: center;
  padding: 0;
}
.cart-qty-btn:hover { background: var(--light); border-color: var(--blue); }
.cart-qty-field {
  width: 52px; padding: .25rem .3rem; border: 1px solid var(--border);
  border-radius: 6px; font-size: .9rem; text-align: center;
  -moz-appearance: textfield;
}
.cart-qty-field::-webkit-inner-spin-button,
.cart-qty-field::-webkit-outer-spin-button { -webkit-appearance: none; }
.cart-footer-label { font-weight: 700; color: var(--text); }
.cart-actions { display: flex; gap: 1rem; align-items: center; margin-top: 1.5rem; }


/* bulk search */
.bulk-textarea { width: 100%; font-family: monospace; resize: vertical; margin-bottom: .75rem; }
.bulk-form { display: flex; flex-direction: column; gap: .5rem; max-width: 560px; }
.bulk-results-wrap { margin-top: 1.5rem; overflow-x: auto; }
.bulk-pagination { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: 1rem; }
.pg-btn { padding: .3rem .65rem; border: 1px solid var(--border); background: var(--white);
  border-radius: var(--radius); cursor: pointer; font-size: .85rem; color: var(--blue); }
.pg-btn:hover:not(:disabled) { background: var(--light); }
.pg-btn-active { background: var(--blue); color: #fff; border-color: var(--blue); font-weight: 700; }
.pg-btn-dis { opacity: .35; cursor: default; }
.bulk-spinner { display: none; width: 18px; height: 18px; border: 2px solid #c8d6e8;
  border-top-color: var(--blue); border-radius: 50%;
  animation: spin .7s linear infinite; vertical-align: middle; margin-left: .5rem; }
@keyframes spin { to { transform: rotate(360deg); } }

/* bulk results table */
.br-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.br-table thead th { background: var(--blue); color: #fff; padding: .55rem .9rem;
  text-align: left; white-space: nowrap; }
.br-td { padding: .55rem .9rem; vertical-align: top; border-bottom: 1px solid var(--border); }
.br-qty   { font-weight: 600; white-space: nowrap; }
.br-price { font-weight: 700; color: var(--blue); white-space: nowrap; }
.br-artno { font-weight: 700; color: var(--blue); display: block; text-decoration: none; }
.br-artno:hover { text-decoration: underline; }
.br-brand { color: var(--text-s); font-size: .8rem; display: block; }
.br-cat   { color: var(--text-s); font-size: .75rem; display: block; }
.br-main-row:hover > .br-td { background: #f8fafc; }
.br-ref-row { background: #fafafa; }
.br-ref-row:hover > .br-td { background: #f0f4fb; }
.br-analogs { padding: 0; }

.bulk-in       { color: #1a7a3a; }
.bulk-out      { color: #b94a4a; }
.bulk-notfound { color: var(--text-s); }

/* analogs details */
.bulk-analogs { border: none; }
.bulk-analogs-summary { display: flex; align-items: center; gap: .5rem; cursor: pointer;
  font-size: .8rem; color: var(--blue); font-weight: 600;
  padding: .3rem .5rem; border-radius: 4px; user-select: none; list-style: none; }
.bulk-analogs-summary:hover { background: #eaf0fb; }
.bulk-analogs-count { background: var(--blue); color: #fff; border-radius: 10px;
  font-size: .7rem; padding: 1px 6px; font-weight: 700; }

/* profile orders */
.profile-container { max-width: 860px; }
.profile-orders { margin-top: 2.5rem; }
.profile-orders-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem;
  color: var(--blue); }
.order-status { display: inline-block; padding: .2rem .6rem; border-radius: 20px;
  font-size: .78rem; font-weight: 600; }
.order-status-new      { background: #e8f0fb; color: #1F4E8C; }
.order-status-exported { background: #fff3cd; color: #856404; }
.order-status-ready    { background: #d1f0e0; color: #1a7a3a; }
.order-status-shipped  { background: #e2d9f3; color: #5a3d8a; }
.order-status-received { background: #e9ecef; color: #495057; }
.art-col-header { color: #fff; }
.article-detail { padding: .75rem 1rem 1rem 1rem; background: #f8fafc;
  border-top: 1px solid var(--border); }
.detail-label { display: block; font-size: .78rem; text-transform: uppercase;
  letter-spacing: .06em; color: var(--blue); font-weight: 700; margin: .5rem 0 .3rem; }
.detail-table { max-width: 700px; margin-bottom: .5rem; }
.art-status { font-size: .8rem; color: var(--text-s); margin-bottom: .4rem; font-style: italic; }
.art-linkages { font-size: .82rem; color: var(--text-s); line-height: 1.6; }
.ref-extra { font-size: .75rem; color: var(--text-s); margin-top: .15rem; }
.art-masked { color: var(--text-s); letter-spacing: .05em; }
.search-auth-hint {
  margin-top: 1.25rem; padding: .75rem 1rem;
  background: #fffbeb; border: 1px solid #fde68a;
  border-left: 4px solid var(--yellow);
  border-radius: var(--radius); font-size: .875rem;
}
.link-inline { color: var(--blue); font-weight: 600; text-decoration: underline; }

.arts-section { overflow-x: auto; margin-bottom: 1.5rem; }
.arts-table, .vin-table {
  width: 100%; border-collapse: collapse; font-size: .875rem;
}
.arts-table th, .vin-table .vin-key {
  background: var(--blue); color: #fff;
  padding: .55rem .85rem; text-align: left; white-space: nowrap;
  font-weight: 600; font-size: .8rem; text-transform: uppercase;
  letter-spacing: .04em;
}
.arts-table td, .vin-table td {
  padding: .5rem .85rem; border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.arts-table tr:hover td, .vin-table tr:hover td { background: var(--light); }
.vin-table { max-width: 600px; }
.vin-key { font-weight: 600; color: var(--blue); width: 40%; }

/* VIN result blocks */
.vin-car-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
.vin-car-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; }
.car-sum-desc  { color: var(--text-s); font-weight: 400; }

/* Group chips */
.group-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.group-chip {
  display: inline-block;
  padding: .35rem .85rem;
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: 2rem;
  font-size: .82rem;
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
  transition: background var(--trans), border-color var(--trans);
}
.group-chip:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

/* ── Catalog widget ─────────────────────────────────────────────────────── */
.catalog-widget { margin-top: 1.5rem; min-height: 500px; }

/* ── Coming soon ────────────────────────────────────────────────────────── */
.coming-soon {
  color: var(--text-s);
  font-size: 1rem;
  padding: 3rem;
  text-align: center;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  margin-top: 1.5rem;
}

/* ── Breadcrumb ─────────────────────────────────────────────────────────── */
.breadcrumb { font-size: .82rem; margin-bottom: 1.25rem; }
.bc-link    { color: var(--blue); font-weight: 600; }
.bc-link:hover { text-decoration: underline; }
.bc-sep     { margin: 0 .35rem; color: var(--gray); }
.bc-current { color: var(--gray); }

/* ── Car summary ─────────────────────────────────────────────────────────── */
.car-summary {
  background: var(--blue);
  color: var(--white);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.car-sum-header { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.car-sum-icon   { font-size: 1.5rem; }
.car-sum-title  strong { font-size: 1rem; font-weight: 700; display: block; }
.car-sum-desc   { font-size: .78rem; color: rgba(255,255,255,.65); }
.car-params     { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; flex: 1; }
.car-param      { font-size: .8rem; }
.car-param-key  { color: rgba(255,255,255,.6); }
.car-param-val  { font-weight: 700; color: var(--yellow); }

/* ── Subgroups grid ──────────────────────────────────────────────────────── */
.sg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.sg-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  padding: 1.1rem .75rem .9rem;
  border: 1px solid var(--border);
  border-top: 3px solid transparent;
  border-radius: var(--radius);
  background: var(--white);
  text-align: center;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform var(--trans), box-shadow var(--trans), border-top-color var(--trans);
}
.sg-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-h);
  border-top-color: var(--yellow);
  text-decoration: none;
}
.sg-img  { width: 72px; height: 72px; object-fit: contain; }
.sg-icon { font-size: 1.75rem; }
.sg-name { font-size: .82rem; font-weight: 700; color: var(--blue); line-height: 1.3; }
.sg-hint { font-size: .72rem; font-weight: 700; color: var(--yellow-d); letter-spacing: .03em; }

/* ── Parts page ──────────────────────────────────────────────────────────── */
.parts-layout {
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
  margin-top: 1rem;
  align-items: flex-start;
}

/* Scheme with markers */
.scheme-wrap {
  position: relative;
  flex: 0 0 55%;
  max-width: 55%;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  user-select: none;
}
.scheme-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 72vh;
  object-fit: contain;
}

@media (max-width: 900px) {
  .parts-layout  { flex-direction: column; }
  .scheme-wrap   { flex: none; max-width: 100%; width: 100%; }
}
.scheme-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  visibility: hidden;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  border-radius: 10px;
  background: var(--yellow);
  border: 2px solid var(--blue-d);
  color: var(--blue-d);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: transform .12s, background .12s, color .12s;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
  white-space: nowrap;
}
.scheme-marker:hover,
.scheme-marker.active {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
  transform: translate(-50%, -50%) scale(1.35);
  z-index: 3;
}

/* Parts table */
.parts-table-wrap { width: 100%; overflow-x: auto; }
.parts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}
.parts-table th {
  background: var(--blue);
  color: var(--white);
  padding: .55rem .85rem;
  text-align: left;
  font-weight: 700;
  font-size: .75rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.parts-table td { padding: .45rem .85rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.parts-table tr[data-pos] { cursor: pointer; }
.parts-table tr:hover td { background: #fffbeb; }
.parts-table tr.pt-highlighted td { background: #fff3b0 !important; outline: 2px solid var(--yellow); }
.pt-pos  { width: 3rem; color: var(--gray); text-align: center; font-weight: 700; }
.pt-num  { white-space: nowrap; }
.pt-desc { color: var(--text-s); font-size: .8rem; }
.pt-article {
  font-family: 'Courier New', monospace;
  font-size: .88rem;
  font-weight: 700;
  color: var(--blue-d);
  padding: .15rem .45rem;
  background: #fffbeb;
  border-radius: 4px;
  border: 1px solid var(--yellow);
}
.pt-article:hover {
  background: var(--yellow);
  color: var(--blue-d);
  text-decoration: none;
}

/* ── OEM selector ───────────────────────────────────────────────────────── */
.oem-selector {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 1.5rem;
  min-height: 460px;
}
.sel-col { background: var(--white); display: flex; flex-direction: column; overflow: hidden; }
.sel-col-title {
  padding: .55rem 1rem;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--white);
  background: var(--blue);
  border-bottom: 2px solid var(--yellow);
  flex-shrink: 0;
}
.sel-list { overflow-y: auto; flex: 1; }
.sel-item {
  display: flex;
  flex-direction: column;
  padding: .55rem .85rem;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: background var(--trans);
}
.sel-item:hover  { background: #fffbeb; }
.sel-item.active { background: #fffbeb; border-left: 3px solid var(--yellow); }
.sel-name { font-size: .86rem; font-weight: 600; line-height: 1.3; }
.sel-meta { font-size: .72rem; color: var(--gray); margin-top: .1rem; }
.sel-img  { width: 34px; height: 22px; object-fit: contain; margin-bottom: .25rem; }
.sel-img-stub { font-size: 1.1rem; margin-bottom: .15rem; }
.sel-hint { padding: 1rem; color: var(--gray); font-size: .82rem; }

.sel-group-item { display: flex; align-items: center; gap: .5rem; padding: .55rem .85rem;
                  border-bottom: 1px solid var(--border); font-size: .86rem; }
.sel-group-icon { font-size: .95rem; flex-shrink: 0; }
.sel-group-link { text-decoration: none; color: var(--text); transition: background var(--trans); }
.sel-group-link:hover { background: #fffbeb; border-left: 3px solid var(--yellow); }

@media (max-width: 900px) { .oem-selector { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .oem-selector { grid-template-columns: 1fr; } }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.footer {
  background: var(--blue-d);
  color: rgba(255,255,255,.7);
  margin-top: auto;
  border-top: 3px solid var(--yellow);
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.8fr 1fr;
  gap: 2.5rem;
}
.footer-brand .logo-name { color: var(--white); }
.footer-brand .logo-sub  { color: var(--yellow); }
.footer-tagline { margin-top: .75rem; font-size: .82rem; color: rgba(255,255,255,.5); }
.footer-col h4 {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--yellow);
  margin-bottom: .85rem;
}
.footer-col a, .footer-col p {
  display: block;
  font-size: .85rem;
  color: rgba(255,255,255,.65);
  margin-bottom: .35rem;
}
.footer-col a:hover { color: var(--yellow); }
.footer-phone { font-size: 1rem !important; font-weight: 700; color: var(--yellow) !important; }
.footer-phone:hover { color: #fff !important; }
.branch-addr  { color: rgba(255,255,255,.85); font-weight: 600; }
.branch-city  { color: rgba(255,255,255,.5); }
.branch-kind  { color: rgba(255,255,255,.45); font-size: .78rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  text-align: center;
  padding: 1rem 1.5rem;
  font-size: .75rem;
  color: rgba(255,255,255,.4);
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
  .navbar-inner { flex-wrap: wrap; gap: .65rem; }
  .nav-links    { gap: 1.1rem; }
  .nav-links a  { font-size: .8rem; }
  .hero         { padding: 3rem 1.5rem 3.5rem; }
  .search-row   { flex-direction: column; border-radius: var(--radius); overflow: visible; }
  .search-input { border-radius: var(--radius); border: 2px solid rgba(255,255,255,.3); background: rgba(255,255,255,.15); color: var(--white); }
  .search-input::placeholder { color: rgba(255,255,255,.5); }
  .search-btn   { border-radius: var(--radius); width: 100%; }
  .auth-card    { padding: 1.75rem; }
  .footer-inner { grid-template-columns: 1fr; padding: 2rem 1.5rem 1.5rem; }
}
@media (max-width: 480px) {
  .nav-links  { display: none; }
  .logo-name  { font-size: 1.05rem; }
}

/* ── Map page ────────────────────────────────────────────────────────────── */
.map-embed-wrap { width: 100%; margin-top: 1.5rem; }
.map-embed-wrap iframe { display: block; width: 100%; height: 520px; border: 0; border-radius: var(--radius); }
@media (max-width: 768px) {
  .map-embed-wrap iframe { height: 360px; }
}
