/* ===========================================================
   Top Notch Auto Sales — shared stylesheet
   =========================================================== */

:root {
  --red: #BD1423;
  --red-dark: #9A0F1C;
  --green: #1CB342;
  --green-dark: #159938;
  --ink: #16191F;
  --ink-soft: #4B5259;
  --grey-bg: #F3F5F6;
  --grey-line: #E4E7EA;
  --white: #FFFFFF;
  --star: #F5A623;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 2px 10px rgba(15, 20, 25, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 20, 25, 0.10);
  --container: 1180px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* Safety net: grid/flex children default to min-width:auto which can force
   horizontal overflow on narrow viewports when content (images, long text)
   doesn't shrink. This makes every direct grid/flex child shrinkable. */
.container > *, [class*="-layout"] > *, [class*="-grid"] > *, .story-grid > * {
  min-width: 0;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }

/* Default inline-icon sizing so any bare <svg> never renders at native size */
svg { width: 1em; height: 1em; vertical-align: -0.125em; flex-shrink: 0; }
.view-all-link svg,
.section-head svg,
a:not(.btn) > svg { width: 16px; height: 16px; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); box-shadow: 0 6px 16px rgba(189,20,35,0.30); }

.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-dark); box-shadow: 0 6px 16px rgba(28,179,66,0.30); }

.btn-outline-dark {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.6);
}
.btn-outline-dark:hover { background: rgba(255,255,255,0.12); }

.btn-outline {
  background: #fff;
  color: var(--ink);
  border: 1.5px solid var(--grey-line);
}
.btn-outline:hover { border-color: var(--ink); }

.btn-block { width: 100%; }
.btn-lg { padding: 15px 26px; font-size: 1rem; }
.btn-sm { padding: 9px 16px; font-size: 0.85rem; }

.btn-two-line { flex-direction: row; text-align: left; }
.btn-two-line .btn-lines { display: flex; flex-direction: column; line-height: 1.25; }
.btn-two-line .btn-lines small { font-weight: 500; font-size: 0.72rem; opacity: 0.85; }
.btn-two-line .btn-lines strong { font-size: 0.95rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--grey-line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 14px;
  padding-bottom: 14px;
  flex-wrap: wrap;
}
.logo { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.logo svg { width: 34px; height: 34px; }

.main-nav { display: flex; gap: 28px; }
.main-nav a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover { color: var(--red); }
.main-nav a.active { color: var(--red); border-bottom-color: var(--red); }

.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.header-actions .btn { padding: 9px 16px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 6px;
}
.nav-toggle svg { width: 26px; height: 26px; }

.mobile-panel {
  display: none;
  flex-direction: column;
  padding: 10px 24px 18px;
  border-top: 1px solid var(--grey-line);
  background: #fff;
}
.mobile-panel a {
  padding: 12px 0;
  font-weight: 600;
  border-bottom: 1px solid var(--grey-line);
}
.mobile-panel .header-actions { flex-direction: column; margin-top: 14px; }
.mobile-panel .btn { width: 100%; }

@media (max-width: 900px) {
  .main-nav { display: none; }
  .header-actions { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .mobile-panel.open { display: flex; }
}

/* ---------- Hero band (photo background) ---------- */
.hero {
  position: relative;
  color: #fff;
  background-size: cover;
  background-position: center right;
  background-color: var(--ink);
  background-repeat: no-repeat;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #0A0C10 0%, rgba(10,12,16,0.94) 30%, rgba(10,12,16,0.65) 55%, rgba(10,12,16,0.25) 78%, rgba(10,12,16,0.45) 100%);
}
.hero-tall::before { background: linear-gradient(90deg, #0A0C10 0%, rgba(10,12,16,0.95) 32%, rgba(10,12,16,0.6) 58%, rgba(10,12,16,0.2) 80%, rgba(10,12,16,0.4) 100%); }
.hero-inner {
  position: relative;
  z-index: 2;
  padding: 56px 0 44px;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-tall .hero-inner { min-height: 380px; padding: 64px 0 52px; }
.hero-short .hero-inner { min-height: 150px; padding: 34px 0; }

.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  margin: 0 0 10px;
}
.hero h1 {
  font-size: 2.5rem;
  line-height: 1.25;
  margin: 0 0 16px;
  font-weight: 800;
  max-width: 600px;
  letter-spacing: -0.5px;
}
.hero h1 .accent { color: var(--red); }
.hero p.lead {
  max-width: 520px;
  font-size: 1.02rem;
  color: rgba(255,255,255,0.9);
  margin: 0 0 22px;
  line-height: 1.5;
}
.hero-ctas { display: flex; gap: 14px; margin-bottom: 26px; flex-wrap: wrap; }
.hero-badges {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  font-size: 0.83rem;
  color: rgba(255,255,255,0.92);
}
.hero-badges span { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.hero-badges svg { width: 18px; height: 18px; flex-shrink: 0; }

.hero-tagline {
  position: absolute;
  top: 26px;
  right: 5%;
  z-index: 2;
  font-family: 'Caveat', cursive;
  font-size: 1.5rem;
  color: #fff;
  text-align: right;
  line-height: 1.15;
  transform: rotate(-3deg);
}
.hero-tagline .underline { display: block; position: relative; }
.hero-tagline .underline::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--red);
  transform: scaleX(0.9);
}
.hero-corner-note {
  position: absolute;
  bottom: 22px;
  right: 5%;
  z-index: 2;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  text-align: right;
}
.hero-breadcrumb {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}
.hero-breadcrumb .crumbs { font-size: 0.85rem; color: rgba(255,255,255,0.75); }
.hero-breadcrumb .crumbs a:hover { color: #fff; }
.hero-breadcrumb .crumbs .sep { margin: 0 6px; opacity: 0.6; }

@media (max-width: 720px) {
  .hero h1 { font-size: 1.9rem; }
  .hero-tagline { display: none; }
  .hero-corner-note { display: none; }
}

/* ---------- Section basics ---------- */
section { padding: 64px 0; }
.section-grey { background: var(--grey-bg); }
.section-dark { background: var(--ink); color: #fff; }
.section-tight { padding: 40px 0; }

.section-head { margin-bottom: 34px; }
.section-head.row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
}
.section-head h2 {
  font-size: 1.9rem;
  margin: 0 0 8px;
  font-weight: 800;
}
.section-head h2 .accent { color: var(--red); }
.section-head p { color: var(--ink-soft); margin: 0; }
.section-head.center { text-align: center; }
.section-head.center p { max-width: 520px; margin: 0 auto; }
.eyebrow-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--red);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.eyebrow-line::before { content: ""; width: 22px; height: 3px; background: var(--red); display: inline-block; }

.view-all-link { font-weight: 700; color: var(--red); font-size: 0.92rem; }
.view-all-link:hover { text-decoration: underline; }

/* ---------- Vehicle Card ---------- */
.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.vehicle-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--grey-line);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.vehicle-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.vehicle-card .thumb { position: relative; height: 168px; overflow: hidden; background: #eee; }
.vehicle-card .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.vehicle-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--red);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
}
.vehicle-badge.sold { background: #6B7280; }
.vehicle-card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.vehicle-card h3 { font-size: 1.08rem; margin: 0 0 2px; }
.vehicle-card .trim { color: var(--ink-soft); font-size: 0.83rem; margin: 0 0 8px; }
.vehicle-card .price { color: var(--red); font-weight: 800; font-size: 1.2rem; margin: 0 0 10px; }
.vehicle-card .price.was { color: var(--ink-soft); font-weight: 600; font-size: 0.85rem; }
.vehicle-card .price-red { color: var(--red); font-weight: 800; font-size: 1.1rem; }
.vehicle-card .specs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--grey-line);
  padding-top: 10px;
  margin-bottom: 14px;
}
.vehicle-card .specs span { display: flex; align-items: center; gap: 8px; }
.vehicle-card .specs svg { width: 15px; height: 15px; opacity: 0.7; flex-shrink: 0; }
.vehicle-card .btn { margin-top: auto; }
.vehicle-card .btn[disabled], .btn.is-sold {
  background: var(--grey-line);
  color: #9AA1A8;
  pointer-events: none;
}

@media (max-width: 980px) {
  .vehicle-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .vehicle-grid { grid-template-columns: 1fr; }
}

/* ---------- Feature / value columns ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
  text-align: center;
}
.feature-grid.divided .feature-item:not(:last-child) { border-right: 1px solid var(--grey-line); }
.feature-item { padding: 0 14px; }
.feature-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(189,20,35,0.1);
  color: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}
.feature-icon svg { width: 26px; height: 26px; }
.feature-item h3 { font-size: 1.02rem; margin: 0 0 6px; }
.feature-item p { font-size: 0.87rem; color: var(--ink-soft); margin: 0; line-height: 1.45; }

.feature-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 26px 20px;
  text-align: center;
  box-shadow: var(--shadow);
}
.feature-card .feature-icon.round-fill {
  background: var(--red);
  color: #fff;
}

@media (max-width: 900px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid.divided .feature-item { border-right: none !important; }
}
@media (max-width: 560px) {
  .feature-grid { grid-template-columns: 1fr; }
}

/* ---------- Split promo banner ---------- */
.promo-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.promo-split .photo { position: relative; min-height: 220px; background-size: cover; background-position: center; }
.promo-split .copy {
  background: var(--ink);
  color: #fff;
  padding: 34px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.promo-split .copy .rule { width: 46px; height: 3px; background: var(--red); margin-bottom: 14px; }
.promo-split .copy h3 { font-size: 1.5rem; margin: 0 0 10px; }
.promo-split .copy p { color: rgba(255,255,255,0.78); margin: 0 0 18px; font-size: 0.92rem; }
.promo-split .copy .btn { align-self: flex-start; }

@media (max-width: 820px) {
  .promo-split { grid-template-columns: 1fr; }
  .promo-split .photo { min-height: 180px; }
}

/* ---------- How it works (numbered steps) ---------- */
.steps-list { display: flex; flex-direction: column; gap: 20px; }
.step-row { display: flex; gap: 16px; align-items: flex-start; }
.step-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-row h4 { margin: 0 0 4px; font-size: 0.98rem; }
.step-row p { margin: 0; color: var(--ink-soft); font-size: 0.87rem; line-height: 1.45; }

.steps-horizontal {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  position: relative;
}
.steps-horizontal .step-h {
  text-align: center;
  position: relative;
}
.steps-horizontal .step-circle-wrap { position: relative; display: inline-flex; margin-bottom: 16px; }
.steps-horizontal .step-num-dot {
  position: absolute;
  top: -6px;
  left: -6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.steps-horizontal .step-circle {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 2px solid var(--red);
  color: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
}
.steps-horizontal .step-circle svg { width: 26px; height: 26px; }
.steps-horizontal .step-h h4 { margin: 0 0 6px; font-size: 0.98rem; }
.steps-horizontal .step-h p { margin: 0; font-size: 0.85rem; color: var(--ink-soft); line-height: 1.4; }
.steps-horizontal::before {
  content: "";
  position: absolute;
  top: 31px;
  left: 12%;
  right: 12%;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--grey-line) 0 8px, transparent 8px 14px);
  z-index: 0;
}

@media (max-width: 900px) {
  .steps-horizontal { grid-template-columns: repeat(2, 1fr); gap: 30px 20px; }
  .steps-horizontal::before { display: none; }
}
@media (max-width: 560px) {
  .steps-horizontal { grid-template-columns: 1fr; }
}
.how-it-works-row { display: grid; grid-template-columns: 280px 1fr; gap: 40px; align-items: start; }
@media (max-width: 720px) {
  .how-it-works-row { grid-template-columns: 1fr; gap: 18px; }
}

/* ---------- Testimonials ---------- */
.testi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.testi-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
}
.testi-card p { margin: 0 0 14px; font-size: 0.92rem; color: var(--ink); line-height: 1.55; font-style: italic; }
.testi-stars { color: var(--star); font-size: 0.85rem; margin-bottom: 8px; letter-spacing: 2px; }
.testi-name { font-weight: 700; font-size: 0.88rem; }

@media (max-width: 900px) { .testi-grid { grid-template-columns: 1fr; } }

/* ---------- CTA bar ---------- */
.cta-bar {
  background: linear-gradient(120deg, #7A0F19, var(--red));
  color: #fff;
  padding: 30px 0;
}
.cta-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.cta-bar h3 { margin: 0 0 4px; font-size: 1.3rem; }
.cta-bar p { margin: 0; color: rgba(255,255,255,0.85); font-size: 0.9rem; }
.cta-bar .cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.cta-bar .btn-outline-dark.envelope { color: #fff; border-color: rgba(255,255,255,0.5); background: rgba(0,0,0,0.18); }

.cta-bar-photo {
  position: relative;
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 40px 0;
}
.cta-bar-photo::before { content:""; position:absolute; inset:0; background: linear-gradient(90deg, rgba(10,12,16,0.92), rgba(10,12,16,0.55)); }
.cta-bar-photo .container { position: relative; z-index: 2; }

/* ---------- Footer ---------- */
.site-footer { background: #fff; padding: 56px 0 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr 1fr;
  gap: 30px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--grey-line);
}
.footer-brand p { color: var(--ink-soft); font-size: 0.85rem; margin: 12px 0 0; max-width: 240px; }
.footer-col h4 { font-size: 0.95rem; margin: 0 0 14px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: var(--ink-soft); font-size: 0.9rem; }
.footer-col ul li a:hover { color: var(--red); }
.footer-col .contact-line { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; font-size: 0.9rem; color: var(--ink-soft); }
.footer-col .contact-line svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; color: var(--red); }
.footer-col .contact-line small { display: block; color: #9AA1A8; }
.social-row { display: flex; gap: 12px; margin-bottom: 10px; }
.social-row a {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.social-row a.fb { background: #1877F2; }
.social-row a.wa { background: var(--green); }
.social-row svg { width: 18px; height: 18px; }
.footer-col p.muted { font-size: 0.82rem; color: var(--ink-soft); margin: 0; }
.footer-bottom { background: var(--ink); color: rgba(255,255,255,0.65); padding: 16px 0; margin-top: 0; }
.footer-bottom .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 0.8rem; }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 0.87rem; font-weight: 600; }
.form-field label .req { color: var(--red); }
.form-field input,
.form-field select,
.form-field textarea {
  border: 1.5px solid var(--grey-line);
  border-radius: 8px;
  padding: 11px 13px;
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  width: 100%;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(189,20,35,0.12);
}
.form-field textarea { resize: vertical; min-height: 100px; }
.form-note { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--ink-soft); margin-top: 12px; }
.form-note svg { width: 15px; height: 15px; flex-shrink: 0; }
.char-count { text-align: right; font-size: 0.75rem; color: #9AA1A8; margin-top: 4px; }

@media (max-width: 700px) {
  .form-grid, .form-grid.cols-3 { grid-template-columns: 1fr; }
}

/* ---------- Panels / cards ---------- */
.panel {
  background: #fff;
  border: 1px solid var(--grey-line);
  border-radius: var(--radius-lg);
  padding: 30px 32px;
  box-shadow: var(--shadow);
}
.panel-grey { background: var(--grey-bg); border-color: transparent; box-shadow: none; }

/* ---------- Toast (form submission feedback) ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--ink);
  color: #fff;
  padding: 14px 20px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 999;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast svg { width: 20px; height: 20px; color: var(--green); flex-shrink: 0; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Utility ---------- */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.hide-mobile { display: initial; }
.show-mobile { display: none; }
@media (max-width: 720px) {
  .hide-mobile { display: none; }
  .show-mobile { display: initial; }
}
