/* ============================================================
   REALRIDE AUTO SALES — CSS
   Aesthetic: industrial-clean, bold condensed type, steel tones
   ============================================================ */

:root {
  --red:     #c0392b;
  --red-dk:  #922b21;
  --charcoal:#1c1f24;
  --steel:   #2c3440;
  --mid:     #4a5568;
  --light:   #f4f5f7;
  --border:  #dde1e7;
  --white:   #ffffff;
  --shadow:  0 2px 12px rgba(0,0,0,.09);
  --radius:  6px;
  --font-head: 'Barlow Condensed', sans-serif;
  --font-body: 'Barlow', sans-serif;
}

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

body {
  font-family: var(--font-body);
  background: var(--light);
  color: var(--charcoal);
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--red); }

/* ── TOP BAR ─────────────────────────────────────────────── */
.topbar {
  background: var(--charcoal);
  color: #aab0bb;
  font-size: .78rem;
  font-family: var(--font-body);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .4rem 1.5rem;
  letter-spacing: .02em;
}
.topbar-phone { color: var(--white); font-weight: 600; }

/* ── HEADER ──────────────────────────────────────────────── */
.header {
  background: var(--white);
  border-bottom: 3px solid var(--red);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.header-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: .75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-shrink: 0;
}
.logo-icon { font-size: 1.8rem; }
.logo-text { display: flex; flex-direction: column; }
.logo-name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: .04em;
  color: var(--charcoal);
  line-height: 1;
}
.logo-tagline { font-size: .7rem; color: var(--mid); letter-spacing: .06em; text-transform: uppercase; }

.nav {
  display: flex;
  align-items: center;
  gap: .25rem;
  margin-left: auto;
}
.nav a {
  padding: .45rem .8rem;
  font-weight: 500;
  font-size: .88rem;
  letter-spacing: .02em;
  border-radius: var(--radius);
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.nav a:hover, .nav a.active { background: var(--light); color: var(--red); }

.nav-dropdown { position: relative; }
.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 180px;
  z-index: 200;
}
.nav-dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a {
  display: block;
  padding: .5rem 1rem;
  border-radius: 0;
  font-size: .85rem;
}
.dropdown-menu a:hover { background: var(--light); }

.btn-call {
  background: var(--red);
  color: var(--white) !important;
  padding: .45rem 1rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-family: var(--font-head);
  font-size: 1rem;
  letter-spacing: .04em;
  white-space: nowrap;
  transition: background .15s;
}
.btn-call:hover { background: var(--red-dk); color: var(--white); }

.burger {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--charcoal);
}

/* ── HERO STRIP ──────────────────────────────────────────── */
.hero-strip {
  background: linear-gradient(135deg, var(--steel) 0%, var(--charcoal) 100%);
  padding: 2.5rem 1.5rem;
  position: relative;
  overflow: hidden;
}
.hero-strip::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    rgba(255,255,255,.015) 0px,
    rgba(255,255,255,.015) 1px,
    transparent 1px,
    transparent 20px
  );
}
.hero-inner {
  max-width: 1300px;
  margin: 0 auto;
  position: relative;
}
.hero-inner h1 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--white);
  letter-spacing: .03em;
  line-height: 1.1;
}
.hero-inner h1 span { color: var(--red); }
.hero-inner p {
  color: #9aa4b2;
  margin-top: .4rem;
  font-size: .95rem;
}

/* ── LAYOUT ──────────────────────────────────────────────── */
.layout {
  max-width: 1300px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.5rem;
  align-items: start;
}

/* ── SIDEBAR ─────────────────────────────────────────────── */
.sidebar {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  position: sticky;
  top: 72px;
}
.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: .75rem;
  border-bottom: 2px solid var(--charcoal);
}
.sidebar-header h2 {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.clear-btn {
  background: none;
  border: none;
  color: var(--red);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.clear-btn:hover { text-decoration: underline; }

.filter-group { margin-bottom: 1rem; }
.filter-label {
  display: block;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--mid);
  margin-bottom: .4rem;
}
.filter-group select {
  width: 100%;
  padding: .45rem .6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .85rem;
  font-family: var(--font-body);
  background: var(--white);
  cursor: pointer;
  color: var(--charcoal);
}
.filter-group select:focus { outline: none; border-color: var(--red); }

.radio-group { display: flex; flex-direction: column; gap: .3rem; }
.radio-group label {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .85rem;
  cursor: pointer;
}
.radio-group input[type="radio"] { accent-color: var(--red); }

.apply-btn {
  width: 100%;
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  padding: .6rem 1rem;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: .5rem;
  transition: background .15s;
}
.apply-btn:hover { background: var(--red-dk); }

.sidebar-links { margin-top: 1.5rem; }
.sidebar-links h3 {
  font-family: var(--font-head);
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--mid);
  margin-bottom: .5rem;
  padding-bottom: .35rem;
  border-bottom: 1px solid var(--border);
}
.sidebar-links ul { list-style: none; }
.sidebar-links li { padding: .25rem 0; }
.sidebar-links a {
  font-size: .82rem;
  display: flex;
  justify-content: space-between;
  transition: color .15s;
}
.sidebar-links a em {
  font-style: normal;
  color: var(--mid);
  font-size: .78rem;
}
.sidebar-links a:hover { color: var(--red); }

/* ── INVENTORY MAIN ──────────────────────────────────────── */
.inventory-main { min-width: 0; }

.inventory-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .6rem 1rem;
  margin-bottom: 1rem;
}
.result-count { font-size: .85rem; color: var(--mid); font-weight: 500; }
.toolbar-right { display: flex; align-items: center; gap: .75rem; }
.toolbar-right label { font-size: .85rem; font-weight: 500; }
.toolbar-right select {
  margin-left: .4rem;
  padding: .3rem .6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .85rem;
}
.filter-toggle {
  display: none;
  background: var(--charcoal);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  padding: .35rem .8rem;
  font-size: .82rem;
  cursor: pointer;
}

/* ── CAR GRID ────────────────────────────────────────────── */
.car-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

/* ── CAR CARD ────────────────────────────────────────────── */
.car-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.car-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.13);
}
.car-card.sold { opacity: .72; }

.card-img-wrap {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #eaecef;
}
.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s;
}
.car-card:hover .card-img-wrap img { transform: scale(1.04); }

.sold-badge {
  position: absolute;
  top: .65rem;
  right: .65rem;
  background: rgba(0,0,0,.75);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .2rem .55rem;
  border-radius: 3px;
}
.available-badge {
  position: absolute;
  top: .65rem;
  left: .65rem;
  background: #27ae60;
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .2rem .55rem;
  border-radius: 3px;
}

.card-body { padding: .85rem 1rem; flex: 1; display: flex; flex-direction: column; }

.card-title {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.2;
  color: var(--charcoal);
}
.card-sub {
  font-size: .78rem;
  color: var(--mid);
  margin-top: .15rem;
  margin-bottom: .65rem;
}

.card-price {
  font-family: var(--font-head);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--red);
  letter-spacing: .02em;
  margin-bottom: .6rem;
}
.card-price.sold-price { color: var(--mid); font-size: 1.1rem; }

.card-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .25rem .5rem;
  font-size: .78rem;
  color: var(--mid);
  margin-bottom: .75rem;
}
.card-specs span { display: flex; align-items: center; gap: .3rem; }
.spec-icon { font-size: .85rem; }

.card-actions {
  display: flex;
  gap: .5rem;
  margin-top: auto;
}
.btn-primary, .btn-secondary {
  flex: 1;
  padding: .45rem .5rem;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-align: center;
  cursor: pointer;
  transition: background .15s, color .15s;
  border: none;
}
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-dk); }
.btn-secondary { background: var(--light); color: var(--charcoal); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }

/* ── PAGINATION ──────────────────────────────────────────── */
.pagination {
  display: flex;
  gap: .4rem;
  justify-content: center;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}
.page-btn {
  padding: .4rem .75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  font-family: var(--font-body);
  font-size: .85rem;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.page-btn:hover, .page-btn.active {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}

/* ── MODAL ───────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--white);
  border-radius: 8px;
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}
.modal-close {
  position: absolute;
  top: .75rem;
  right: .75rem;
  background: var(--light);
  border: none;
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  font-size: 1rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { background: var(--border); }

.modal-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px 8px 0 0; }
.modal-body { padding: 1.5rem; }
.modal-title { font-family: var(--font-head); font-size: 1.8rem; font-weight: 800; margin-bottom: .25rem; }
.modal-price { font-family: var(--font-head); font-size: 2rem; font-weight: 800; color: var(--red); margin-bottom: 1rem; }
.modal-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem 1rem;
  margin-bottom: 1.25rem;
}
.modal-spec { font-size: .88rem; display: flex; justify-content: space-between; padding: .4rem 0; border-bottom: 1px solid var(--border); }
.modal-spec strong { font-weight: 600; }
.modal-spec span { color: var(--mid); }
.modal-ctas { display: flex; gap: .75rem; flex-wrap: wrap; }
.modal-ctas .btn-primary, .modal-ctas .btn-secondary { font-size: 1rem; padding: .6rem 1.25rem; flex: initial; }

/* ── FOOTER ──────────────────────────────────────────────── */
.footer {
  background: var(--charcoal);
  color: #9aa4b2;
  margin-top: 4rem;
  padding: 3rem 1.5rem 1.5rem;
}
.footer-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-bottom: 2.5rem;
}
.footer-col h4 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: .75rem;
}
.footer-col a { display: block; font-size: .85rem; margin-bottom: .35rem; transition: color .15s; }
.footer-col a:hover { color: var(--red); }
.footer-col p { font-size: .85rem; line-height: 1.6; }

.footer-bottom {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .78rem;
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 1rem;
  flex-wrap: wrap;
  gap: .5rem;
}
.footer-bottom a { color: #9aa4b2; }
.footer-bottom a:hover { color: var(--white); }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    overflow-y: auto;
    z-index: 300;
    transition: left .25s;
    border-radius: 0;
    box-shadow: 4px 0 20px rgba(0,0,0,.2);
  }
  .sidebar.open { left: 0; }
  .filter-toggle { display: inline-flex; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .nav { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); border-bottom: 3px solid var(--red); padding: 1rem; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav-dropdown:hover .dropdown-menu { position: static; box-shadow: none; border: none; background: var(--light); margin-top: .25rem; }
  .burger { display: block; }
  .footer-inner { grid-template-columns: 1fr; }
  .car-grid { grid-template-columns: 1fr; }
  .modal-specs { grid-template-columns: 1fr; }
}

/* ── SKELETON LOADER ─────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #eaecef 25%, #f4f5f7 50%, #eaecef 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: var(--radius);
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ── EMPTY STATE ─────────────────────────────────────────── */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 1rem;
  color: var(--mid);
}
.empty-state h3 { font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; margin-bottom: .5rem; color: var(--charcoal); }
.logo {
  width: 120px;   /* adjust size */
  height: auto;
}