/* Auto Men — dark theme */
:root {
  --bg: #05070b;
  --surface: #0d121c;
  --surface-2: #131a28;
  --line: #222c40;
  --text: #eef2f8;
  --muted: #aab4c7;
  --blue: #2a6bff;
  --blue-soft: #7ea4ff;
  --red: #d71a2d;
  --orange: #ff4d2e;
  --purple: #8b3dff;
  --yellow: #ffd166;
  --grad-hot: linear-gradient(135deg, #d71a2d, #ff4d2e);
  --grad-cool: linear-gradient(135deg, #2a6bff, #8b3dff);
  --grad-line: linear-gradient(90deg, #2a6bff, #8b3dff 50%, #d71a2d);
  --radius: 14px;
  --gutter: 16px;
  --head: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.55;
  overflow-x: hidden;
}

/* Fixed colorful glows */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60vmax 45vmax at 0% 0%, rgba(42, 107, 255, 0.34), transparent 60%),
    radial-gradient(55vmax 42vmax at 100% 0%, rgba(215, 26, 45, 0.32), transparent 60%),
    radial-gradient(70vmax 40vmax at 50% 110%, rgba(139, 61, 255, 0.30), transparent 65%),
    var(--bg);
}

img { max-width: 100%; display: block; }
a { color: var(--blue-soft); }
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.05; margin: 0; letter-spacing: 0.01em; }

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.nowrap { white-space: nowrap; }
.muted { color: var(--muted); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--yellow); color: #111; padding: 10px 14px; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 16px; border-radius: 999px; border: 0;
  font: 600 1rem/1 var(--body); text-decoration: none; cursor: pointer; color: #fff;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn-call { background: var(--grad-cool); box-shadow: 0 6px 22px rgba(42, 107, 255, .35); }
.btn-call:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--blue); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(5, 7, 11, .82);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.site-header::after { content: ""; display: block; height: 3px; background: var(--grad-line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--text); font-family: var(--head); font-weight: 700; font-size: 1.75rem; line-height: 1; text-transform: uppercase; }
.logo-block { background: var(--grad-hot); color: #fff; padding: 5px 8px 4px; border-radius: 6px; box-shadow: 0 4px 18px rgba(255, 77, 46, .35); }
.logo-word { letter-spacing: .02em; }

@media (max-width: 379px) {
  .btn-call { padding: 10px 12px; font-size: .95rem; }
  .btn-call svg { display: none; }
  .logo { font-size: 1.5rem; }
}

/* Hero */
.hero { padding-top: 44px; padding-bottom: 28px; }
.hero-title {
  font-size: clamp(2.6rem, 9vw, 5rem);
  text-transform: uppercase;
  border-left: 6px solid var(--red);
  padding-left: 14px;
}
.hero-title span {
  background: linear-gradient(90deg, #5d8eff 0%, #ffffff 50%, #ff5a3c 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero-sub { margin: 16px 0 0; color: var(--muted); font-size: 1.125rem; max-width: 36rem; }

/* Filters */
.inventory { padding-bottom: 56px; }
.inventory:focus { outline: none; }
.filters {
  display: grid; gap: 12px; grid-template-columns: 1fr 1fr;
  padding: 14px; border-radius: var(--radius);
  background: rgba(13, 18, 28, .78); border: 1px solid var(--line);
}
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-search { grid-column: 1 / -1; }
.field label { font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.field input, .field select {
  width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 10px;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line);
  font: 500 1rem var(--body);
}
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23aab4c7' stroke-width='2.5' d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px;
}
.field input::placeholder { color: #7f8aa0; }
.field input:focus-visible, .field select:focus-visible { border-color: var(--blue); outline-offset: 1px; }
@media (min-width: 768px) {
  .filters { grid-template-columns: 2fr 1fr 1fr; padding: 16px; }
  .field-search { grid-column: auto; }
}

.count { margin: 18px 0 14px; font-weight: 600; color: var(--muted); }
.count strong { color: var(--text); }

/* Grid + cards */
.grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr));
}
.card {
  position: relative; display: flex; flex-direction: column; height: 100%;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease;
}
.card::before { content: ""; height: 4px; background: var(--grad-line); flex: none; }
.card:hover, .card:focus-within {
  border-color: rgba(42, 107, 255, .6);
  box-shadow: 0 0 0 1px rgba(42, 107, 255, .35), 0 12px 40px rgba(42, 107, 255, .32);
  transform: translateY(-2px);
}
.cover {
  position: relative; display: block; width: 100%; padding: 0; border: 0; margin: 0;
  aspect-ratio: 4 / 3; background: #0a0e16; cursor: zoom-in; overflow: hidden;
}
.cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.card:hover .cover img { transform: scale(1.03); }
.cover:focus-visible { outline-offset: -4px; border-radius: 0; }
.badge {
  position: absolute; right: 10px; bottom: 10px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px; background: var(--grad-cool);
  color: #fff; font: 600 .85rem/1.2 var(--body); box-shadow: 0 4px 14px rgba(0, 0, 0, .4);
}

/* Neutral placeholder for missing photos */
.ph {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: repeating-linear-gradient(135deg, #10151f 0 14px, #0c1018 14px 28px);
  color: #8792a8; font-weight: 600; font-size: .95rem;
}
.ph::before {
  content: ""; width: 56px; height: 42px; opacity: .7;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 18'%3E%3Cpath fill='none' stroke='%238792a8' stroke-width='1.5' stroke-linejoin='round' d='M2 4h4l2-2.5h8L18 4h4v12.5H2z'/%3E%3Ccircle cx='12' cy='10' r='4' fill='none' stroke='%238792a8' stroke-width='1.5'/%3E%3C/svg%3E");
}
.ph[hidden] { display: none; }

.card-body { display: flex; flex-direction: column; gap: 10px; padding: 16px; flex: 1; }
.card-title { font-size: 1.75rem; text-transform: uppercase; }
.card-trim { margin: -4px 0 0; color: var(--muted); font-weight: 500; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 0; padding: 0; list-style: none; }
.pill { padding: 4px 10px; border-radius: 999px; font-size: .875rem; font-weight: 600; border: 1px solid; }
.pill-blue { color: #b9ccff; background: rgba(42, 107, 255, .16); border-color: rgba(42, 107, 255, .45); }
.pill-red { color: #ffc2c7; background: rgba(215, 26, 45, .16); border-color: rgba(215, 26, 45, .5); }
.pill-purple { color: #dcc6ff; background: rgba(139, 61, 255, .17); border-color: rgba(139, 61, 255, .5); }
.deal {
  align-self: flex-start; padding: 6px 12px; border-radius: 10px;
  background: rgba(255, 209, 102, .12); border: 1px solid rgba(255, 209, 102, .55);
  color: var(--yellow); font-weight: 600; font-size: .9rem; line-height: 1.3;
}
.card-foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.price-tag {
  position: relative; display: inline-block;
  padding: 6px 14px 4px 24px;
  background: var(--grad-hot); color: #fff;
  font: 700 1.9rem/1 var(--head); letter-spacing: .01em;
  clip-path: polygon(14px 0, 100% 0, 100% 100%, 14px 100%, 0 50%);
  border-radius: 0 8px 8px 0;
}
.price-tag::before {
  content: ""; position: absolute; left: 11px; top: 50%; width: 6px; height: 6px; margin-top: -3px;
  border-radius: 50%; background: var(--bg);
}
.price-tag.call { font-size: 1.4rem; padding-top: 9px; padding-bottom: 7px; }
.ask { font-weight: 600; color: var(--text); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; border-bottom: 2px solid var(--blue); }
.ask:hover { color: #fff; border-bottom-color: var(--orange); }

/* Empty state */
.empty {
  text-align: center; padding: 36px 20px; border: 1px dashed var(--line); border-radius: var(--radius);
  background: rgba(13, 18, 28, .6);
}
.empty-title { font: 700 1.6rem/1.1 var(--head); text-transform: uppercase; margin: 0 0 8px; }
.empty p { margin: 0 0 16px; color: var(--muted); }

/* Visit */
.visit { position: relative; padding: 48px 0 56px; background: rgba(9, 12, 19, .7); }
.visit::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--grad-line); }
.section-title { font-size: clamp(2rem, 6vw, 2.8rem); text-transform: uppercase; margin-bottom: 24px; }
.visit-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .visit-grid { grid-template-columns: repeat(3, 1fr); } }
.visit-item { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.visit-item h3 { font-size: 1.15rem; letter-spacing: .1em; text-transform: uppercase; color: var(--blue-soft); margin-bottom: 10px; }
.visit-item p { margin: 0 0 8px; }
address { font-style: normal; font-size: 1.125rem; margin-bottom: 12px; }
.text-link { font-weight: 600; display: inline-flex; min-height: 44px; align-items: center; }
.hours { margin: 0; display: grid; gap: 6px; font-size: 1.05rem; }
.hours div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.hours div:last-child { border-bottom: 0; }
.hours dt { font-weight: 600; }
.hours dd { margin: 0; color: var(--muted); }
.phone-big { font: 700 2rem/1.1 var(--head); color: var(--text); text-decoration: none; }
.phone-big:hover { color: var(--blue-soft); }

/* Footer */
.site-footer { padding: 24px 0 32px; color: var(--muted); font-size: .95rem; border-top: 1px solid var(--line); }
.site-footer p { margin: 0; }

/* Gallery dialog */
.gallery {
  width: 100%; max-width: 1100px; max-height: 100%;
  margin: auto; padding: 0; border: 0; background: transparent; color: var(--text);
}
.gallery::backdrop { background: rgba(2, 3, 6, .9); }
.gallery-inner {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; display: flex; flex-direction: column; gap: 10px; margin: 8px;
}
.gallery-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gallery-title { font-size: 1.5rem; text-transform: uppercase; padding-left: 4px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text); cursor: pointer;
}
.icon-btn:hover { border-color: var(--blue); background: #1a2338; }
.gallery-stage {
  position: relative; aspect-ratio: 4 / 3; max-height: 68vh; width: 100%;
  background: #000; border-radius: 10px; overflow: hidden; touch-action: pan-y;
}
.gallery-stage img { width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.nav-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(5, 7, 11, .7); border-color: rgba(255, 255, 255, .2); }
.nav-btn.prev { left: 8px; }
.nav-btn.next { right: 8px; }
.gallery-caption { margin: 0; color: var(--muted); font-size: .95rem; padding: 0 4px; }
.gallery-caption b { color: var(--text); font-weight: 600; }
.thumbs { position: relative; display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 6px; scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
.thumb {
  position: relative; flex: none; width: 84px; aspect-ratio: 4 / 3; padding: 0; border-radius: 8px; overflow: hidden;
  border: 2px solid transparent; background: #0a0e16; cursor: pointer; opacity: .6; scroll-snap-align: center;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .ph { font-size: 0; gap: 0; }
.thumb .ph::before { width: 26px; height: 20px; }
.thumb[aria-current="true"] { border-color: var(--blue); opacity: 1; }
.thumb:hover { opacity: 1; }
.thumb:focus-visible { outline-offset: 0; }
@media (min-width: 768px) {
  .gallery-inner { padding: 16px; margin: 16px; }
  .thumb { width: 104px; }
  .nav-btn.prev { left: 12px; }
  .nav-btn.next { right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .card:hover, .card:focus-within, .btn-call:hover { transform: none; }
  .card:hover .cover img { transform: none; }
}
