@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Manrope:wght@400;500;700&display=swap');

:root {
  --bg: #0b0d12;
  --bg-soft: #111420;
  --panel: #121826;
  --panel-2: #0f141f;
  --border: #1f2a3a;
  --text: #e8edf7;
  --muted: #9aa6bd;
  --accent: #36c3ff;
  --accent-2: #2b6bff;
  --accent-3: #12d6a7;
  --danger: #b00020;
  --shadow: 0 20px 50px rgba(0,0,0,0.45);
}

.site-public {
  --bg: #f6f7fb;
  --bg-soft: #ffffff;
  --panel: #ffffff;
  --panel-2: #f2f4f8;
  --border: #e2e7ef;
  --text: #0f172a;
  --muted: #5b677a;
  --accent: #00b7c9;
  --accent-2: #1f8ecb;
  --accent-3: #17c3a5;
  --danger: #e11d48;
  --shadow: 0 16px 40px rgba(17,24,39,0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Space Grotesk", "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}

body {
  background: radial-gradient(1200px 600px at 20% -10%, rgba(54,195,255,0.15), transparent 70%),
              radial-gradient(1000px 500px at 90% 0%, rgba(43,107,255,0.12), transparent 60%),
              var(--bg);
  color: var(--text);
  line-height: 1.55;
}

.site-public {
  background: #f6f7fb;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.header {
  background: rgba(10,12,18,0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.site-public .header {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}

.header__inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.brand__name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.6px;
}

.brand__tag { font-size: 12px; color: var(--muted); }

.nav { display: flex; gap: 22px; }
.nav__link { font-size: 14px; color: #cbd5f5; opacity: 0.8; }
.nav__link:hover, .nav__link--active { opacity: 1; color: #fff; }
.site-public .nav__link { color: #1f2937; opacity: 0.7; }
.site-public .nav__link:hover, .site-public .nav__link--active { opacity: 1; color: #0f172a; }

.subnav {
  background: rgba(8,10,16,0.9);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.site-public .subnav { background: #ffffff; }
.subnav__inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  gap: 18px;
  overflow-x: auto;
}
.subnav__link {
  font-size: 13px;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.subnav__link--active, .subnav__link:hover {
  color: #fff;
  border-color: rgba(54,195,255,0.35);
  background: rgba(54,195,255,0.08);
}

.commitments {
  background: linear-gradient(90deg, rgba(16,20,34,0.9), rgba(10,12,20,0.9));
  border-bottom: 1px solid var(--border);
}
.site-public .commitments { background: #f2f4f8; }
.commitments__inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  gap: 28px;
  font-size: 13px;
  color: #cbd5f5;
  flex-wrap: wrap;
}

.hero {
  max-width: 1300px;
  margin: 30px auto 0;
  padding: 0 24px;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 26px;
  align-items: stretch;
}

.hero-wide {
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.hero-wide__media {
  position: relative;
  height: clamp(200px, 32vw, 380px);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero-wide__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-wide__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8,10,16,0.85), rgba(8,10,16,0.15) 60%, rgba(8,10,16,0.2));
}
.site-public .hero-wide__overlay {
  background: linear-gradient(90deg, rgba(255,255,255,0.95), rgba(255,255,255,0.25) 60%, rgba(255,255,255,0.2));
}

.hero-wide__content {
  position: absolute;
  inset: 0;
  max-width: 1300px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  align-content: center;
}

.hero-wide__title {
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 700;
  margin-bottom: 10px;
}

.hero-wide__subtitle {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 18px;
  max-width: 520px;
}

.hero-wide__search {
  max-width: 620px;
}

.hero-wide__video {
  max-width: 1300px;
  margin: 20px auto 0;
  padding: 0 24px;
}

.video-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--panel-2);
  box-shadow: var(--shadow);
}

.video-card video {
  width: 100%;
  height: auto;
  display: block;
}

.video-card--small {
  max-width: 80%;
  margin: 0 auto;
}

.video-card__controls {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: flex;
  gap: 8px;
}

.video-card__btn {
  border: 0;
  background: rgba(17,24,39,0.8);
  color: #fff;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.12);
}

.hero__eyebrow {
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.hero__title {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  margin-bottom: 12px;
}

.hero__subtitle {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 18px;
}

.hero__search {
  display: flex;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px;
  box-shadow: var(--shadow);
}

.hero__search input {
  flex: 1;
  background: transparent;
  border: 0;
  color: var(--text);
  padding: 10px 12px;
  font-size: 15px;
  outline: none;
}

.hero__search button {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: 0;
  color: #001018;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
}

.hero__panel {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.panel-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.panel-card h3 {
  font-size: 14px;
  color: #cfe4ff;
  margin-bottom: 8px;
}

.filter-dd summary { list-style: none; }
.filter-dd summary::-webkit-details-marker { display: none; }

.filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
}

.check { display: flex; gap: 8px; align-items: center; font-size: 13px; color: #cbd5f5; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #001018;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #001018;
}

.btn-secondary {
  background: #1b2333;
  color: #dbe6ff;
  border: 1px solid var(--border);
}

.hero__media {
  display: grid;
  gap: 16px;
}

.media-card {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
}

.media-card img,
.media-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-card--video {
  min-height: 220px;
}

.container {
  max-width: 1300px;
  margin: 34px auto 60px;
  padding: 0 24px;
}

.pagehead {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 20px;
}
.pagehead h1 { font-size: 24px; font-weight: 700; }
.pagehead__count { font-size: 13px; color: var(--muted); }

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

.car-card {
  background: rgba(12,16,26,0.9);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.site-public .car-card {
  background: #ffffff;
}
.car-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.5);
}

.car-card__media { position: relative; height: 200px; background: #000; }
.car-card__media img { width: 100%; height: 100%; object-fit: cover; }
.car-card__media.is-sold img { filter: grayscale(100%) brightness(0.75) contrast(0.95); }

.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #2563eb;
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}
.badge--sold { background: var(--danger); }
.badge--warranty { background: var(--accent-3); color: #062019; }

.car-card__body { padding: 14px 16px 16px; }
.car-card__title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.car-card__meta { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.car-card__price { font-size: 18px; font-weight: 700; color: var(--accent); margin-bottom: 10px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 11px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(54,195,255,0.12);
  border: 1px solid rgba(54,195,255,0.3);
  color: #cfe9ff;
}

.site-public .chip {
  background: rgba(0,183,201,0.1);
  border: 1px solid rgba(0,183,201,0.3);
  color: #0e3a42;
}

.footer {
  background: rgba(7,9,14,0.9);
  border-top: 1px solid var(--border);
  padding: 20px;
  text-align: center;
  font-size: 13px;
  color: #6b7280;
}

.site-public .footer {
  background: #ffffff;
  color: #6b7280;
}

/* Show page */
.show-hero {
  max-width: 1300px;
  margin: 30px auto 0;
  padding: 0 24px;
}

.show-hero__grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
}

.show-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.show-media { position: relative; }
.show-media img { width: 100%; height: 460px; object-fit: cover; }
.show-media.is-sold img { filter: grayscale(100%) brightness(0.75) contrast(0.95); }
.show-thumbs { display: flex; gap: 10px; padding: 12px; background: #0c101a; border-top: 1px solid var(--border); overflow-x: auto; }
.show-thumbs button { border: 0; background: none; padding: 0; cursor: pointer; }
.show-thumbs img { width: 90px; height: 64px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); opacity: 0.7; }
.show-thumbs img.active { outline: 2px solid var(--accent); opacity: 1; }

.price-card { padding: 18px; display: grid; gap: 12px; }
.price-card h1 { font-size: 22px; font-weight: 700; }
.price { font-size: 26px; font-weight: 800; color: var(--accent); }

.meta-line { color: var(--muted); font-size: 13px; }

.specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.spec {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  font-size: 13px;
}

.desc-card {
  max-width: 1300px;
  margin: 24px auto 50px;
  padding: 0 24px;
}

.desc-card .panel-card { padding: 20px; }

/* Spoticar-like search panel */
.search-panel {
  max-width: 1300px;
  margin: 26px auto 0;
  padding: 0 24px;
}

.search-panel__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.search-panel__grid--single {
  grid-template-columns: 1fr;
}

.search-panel__left,
.search-panel__right {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.search-panel__title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 10px;
}

.segmented {
  display: inline-flex;
  background: #f2f4f8;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.segmented__btn {
  padding: 8px 18px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
}

.segmented__btn.is-active {
  background: #0b0d12;
  color: #fff;
}

.range-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.range-fields input,
.search-panel__input {
  background: #f7f8fb;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
}

.range-bar {
  height: 8px;
  background: #e6ebf2;
  border-radius: 999px;
  margin-top: 12px;
  position: relative;
}
.range-bar span {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 999px;
}

.range-bar--single {
  height: 10px;
}

.range-bar--single input[type="range"] {
  position: absolute;
  left: 0;
  top: -6px;
  width: 100%;
  background: transparent;
  pointer-events: auto;
  appearance: none;
}

.range-bar--single input[type="range"]::-webkit-slider-runnable-track {
  background: transparent;
  height: 8px;
}
.range-bar--single input[type="range"]::-moz-range-track {
  background: transparent;
  height: 8px;
}
.range-bar--single input[type="range"]::-webkit-slider-thumb {
  height: 16px;
  width: 16px;
  border-radius: 50%;
  border: 0;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,183,201,0.2);
  -webkit-appearance: none;
}
.range-bar--single input[type="range"]::-moz-range-thumb {
  height: 16px;
  width: 16px;
  border-radius: 50%;
  border: 0;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,183,201,0.2);
}

.brand-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.brand-pill {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  font-size: 12px;
  cursor: pointer;
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 40px;
  position: relative;
}

.brand-pill input {
  display: none;
}

.brand-pill img {
  height: 18px;
  width: auto;
  object-fit: contain;
}

.brand-pill .brand-text {
  display: block;
  text-align: center;
}

.brand-pill input:checked ~ .brand-text {
  background: rgba(0,183,201,0.15);
  border-radius: 10px;
  padding: 8px 6px;
  border: 1px solid rgba(0,183,201,0.4);
}

.brand-pill input:checked ~ img {
  filter: drop-shadow(0 0 0 rgba(0,0,0,0)) brightness(0.95);
}

.brand-pill input:checked ~ .brand-text,
.brand-pill input:checked ~ img {
  transform: scale(0.98);
}

.brand-pill input:checked ~ .brand-text,
.brand-pill input:checked ~ img {
  border-radius: 10px;
}

.brand-count {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
.brand-pill.has-logo .brand-text {
  display: none;
}

.brand-pill--all {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #001018;
  font-weight: 700;
  border: 0;
}

.search-panel__actions {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.link-ghost {
  font-size: 12px;
  color: #0f172a;
  text-decoration: underline;
}

.commit-list {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}
.commit-item {
  background: #f5f6fa;
  border-radius: 12px;
  padding: 12px;
  font-size: 13px;
}

@media (max-width: 900px) {
  .search-panel__grid { grid-template-columns: 1fr; }
  .brand-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1000px) {
  .hero__grid,
  .show-hero__grid {
    grid-template-columns: 1fr;
  }
  .show-media img { height: 320px; }
}

@media (max-width: 700px) {
  .hero__search { flex-direction: column; border-radius: 18px; }
  .hero__search button { width: 100%; }
}
