/* ===== The Green Arrow Company Ltd — design system ===== */
:root {
  --blue:      #1E88E5;
  --blue-dark: #0F62B0;
  --blue-ink:  #0A3D6E;
  --green:     #9CCC65;
  --green-dark:#7CB342;
  --ink:       #0B2545;
  --muted:     #5A6B82;
  --line:      #E4EAF2;
  --bg:        #F6F9FC;
  --card:      #FFFFFF;
  --warn:      #F59E0B;
  --good:      #16A34A;
  --bad:       #DC2626;
  --radius:    16px;
  --radius-sm: 10px;
  --shadow:    0 6px 24px rgba(15, 98, 176, .08);
  --shadow-lg: 0 18px 50px rgba(15, 98, 176, .14);
  --max:       1200px;
  --font:      'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease:      cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ===== Top contact bar ===== */
.topbar {
  background: var(--blue-ink);
  color: #DCE9F7;
  font-size: 14px;
}
.topbar .container {
  display: flex; gap: 20px; justify-content: space-between; align-items: center;
  padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap;
}
.topbar a { color: #fff; }
.topbar .links { display: flex; gap: 18px; flex-wrap: wrap; }
.topbar .links span { opacity: .8; }

/* ===== Header / Nav ===== */
.header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; gap: 16px;
  max-width: var(--max); margin: 0 auto;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo-mark { width: 46px; height: 46px; flex: 0 0 46px; }
.logo-text { line-height: 1.05; }
.logo-text .t1 { color: var(--blue); font-weight: 700; font-size: 11px; letter-spacing: 2px; }
.logo-text .t2 { color: var(--green-dark); font-weight: 900; font-size: 18px; }
.logo-text .t3 { color: var(--blue); font-weight: 900; font-size: 18px; margin-left: 4px; }
.logo-text .t4 { color: var(--blue); font-weight: 600; font-size: 10px; letter-spacing: 1.5px; }

.menu { display: flex; gap: 4px; align-items: center; }
.menu a {
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--ink);
  font-weight: 600;
  font-size: 14.5px;
  text-decoration: none;
  transition: background .2s ease, color .2s ease;
}
.menu a:hover { background: var(--bg); color: var(--blue-dark); }
.menu a.active { background: var(--bg); color: var(--blue-dark); }

.nav-cta { display: flex; gap: 8px; align-items: center; }
.menu-toggle {
  display: none; background: transparent; border: 0; padding: 8px;
  cursor: pointer;
}
.menu-toggle span {
  display: block; width: 26px; height: 3px; background: var(--ink); margin: 5px 0;
  border-radius: 2px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; border-radius: 12px; border: 0;
  font-weight: 700; font-size: 15px; cursor: pointer;
  text-decoration: none; transition: transform .15s var(--ease), box-shadow .2s ease, background .2s, color .2s;
  min-height: 44px;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-green { background: var(--green-dark); color: #fff; box-shadow: var(--shadow); }
.btn-green:hover { background: #5e9a2a; }
.btn-whatsapp { background: #25D366; color: #fff; box-shadow: var(--shadow); }
.btn-whatsapp:hover { background: #1FB458; }
.btn-outline { background: #fff; color: var(--blue-dark); border: 2px solid var(--blue); }
.btn-outline:hover { background: var(--blue); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--bg); }
.btn-lg { padding: 16px 24px; font-size: 17px; min-height: 54px; border-radius: 14px; }
.btn-block { width: 100%; }

/* ===== Hero ===== */
.hero {
  background:
    radial-gradient(1100px 500px at 80% -10%, rgba(156,204,101,.25), transparent 60%),
    linear-gradient(180deg, #EAF3FC 0%, #F6F9FC 80%);
  padding: 56px 0 32px;
}
.hero-grid {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center;
}
.hero h1 {
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.05; margin: 0 0 16px; color: var(--blue-ink);
  letter-spacing: -0.5px;
}
.hero h1 .accent { color: var(--green-dark); }
.hero p.lead { font-size: 18px; color: var(--muted); margin: 0 0 22px; max-width: 540px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.hero-badges { display: flex; gap: 18px; margin-top: 22px; flex-wrap: wrap; }
.hero-badge {
  display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; font-size: 14px;
}
.hero-badge svg { color: var(--green-dark); }

.hero-card {
  background: #fff; border-radius: 22px; padding: 22px;
  box-shadow: var(--shadow-lg); border: 1px solid var(--line);
}
.hero-card h3 { margin: 0 0 14px; font-size: 18px; }

/* ===== Quick search ===== */
.quick-search { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-search label { font-size: 12px; color: var(--muted); font-weight: 600; }
.quick-search .field { display: flex; flex-direction: column; gap: 4px; }
.quick-search select, .quick-search input {
  padding: 12px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; font: inherit; min-height: 44px;
}
.quick-search .full { grid-column: 1 / -1; }

/* ===== Sections ===== */
.section { padding: 64px 0; }
.section h2 {
  font-size: clamp(24px, 3vw, 34px); margin: 0 0 8px; color: var(--blue-ink);
  letter-spacing: -0.3px;
}
.section .eyebrow {
  text-transform: uppercase; letter-spacing: 2px; font-size: 12px;
  color: var(--green-dark); font-weight: 800; margin-bottom: 8px;
}
.section .lead { color: var(--muted); margin: 0 0 28px; max-width: 700px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }

/* ===== Vehicle grid / cards ===== */
.vehicle-grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.card {
  background: var(--card); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line);
  display: flex; flex-direction: column;
  transition: transform .25s var(--ease), box-shadow .3s ease, border-color .3s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: rgba(30,136,229,.35); }
.card-media {
  aspect-ratio: 16/10; background: linear-gradient(135deg, #cfe1f5, #eaf3fc);
  position: relative; overflow: hidden;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card-media img { transform: scale(1.06); }
.card-tag {
  position: absolute; top: 12px; left: 12px;
  background: var(--green-dark); color: #fff; font-weight: 700;
  font-size: 12px; letter-spacing: .5px;
  padding: 6px 10px; border-radius: 999px; text-transform: uppercase;
}
.card-tag.stock { background: var(--blue); }
.card-tag.transit { background: var(--warn); }
.card-tag.sold { background: var(--blue-ink); }
.card-sold .card-media img { opacity: .55; filter: saturate(.85); }
.card-sold .price { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 2px; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { font-size: 18px; font-weight: 800; color: var(--blue-ink); margin: 0; }
.card-meta { color: var(--muted); font-size: 14px; }
.card-price {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line);
}
.card-price .price { color: var(--blue-dark); font-weight: 900; font-size: 20px; }
.card-actions { display: flex; gap: 8px; padding: 0 18px 18px; }

.specs-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.chip {
  font-size: 12px; color: var(--blue-ink); background: #EAF3FC;
  padding: 4px 10px; border-radius: 999px; font-weight: 600;
}

/* ===== Filters ===== */
.filters {
  background: #fff; border-radius: var(--radius); padding: 18px;
  border: 1px solid var(--line); box-shadow: var(--shadow); margin-bottom: 22px;
}
.filters-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}
.filters .field { display: flex; flex-direction: column; gap: 4px; }
.filters label { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.filters select, .filters input {
  padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; font: inherit; min-height: 44px;
}
.filters-actions { display: flex; gap: 8px; margin-top: 12px; }
.results-info {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px; color: var(--muted); flex-wrap: wrap; gap: 10px;
}

/* ===== How it works ===== */
.steps {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.step {
  background: #fff; padding: 22px; border-radius: var(--radius);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  position: relative;
}
.step-num {
  display: inline-flex; width: 38px; height: 38px;
  align-items: center; justify-content: center;
  background: var(--green); color: var(--blue-ink); font-weight: 900;
  border-radius: 50%; margin-bottom: 10px; font-size: 18px;
}
.step h3 { margin: 6px 0; font-size: 18px; color: var(--blue-ink); }
.step p { margin: 0; color: var(--muted); font-size: 15px; }

/* ===== Value props ===== */
.props {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.prop {
  background: #fff; padding: 22px; border-radius: var(--radius);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  text-align: left;
}
.prop .icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: #EAF3FC; color: var(--blue); display: flex;
  align-items: center; justify-content: center; margin-bottom: 12px;
}
.prop h3 { font-size: 17px; margin: 8px 0; color: var(--blue-ink); }
.prop p { font-size: 14px; color: var(--muted); margin: 0; }

/* ===== Testimonials ===== */
.testimonials { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.testimonial {
  background: #fff; padding: 22px; border-radius: var(--radius);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.testimonial .stars { color: #F5A623; font-size: 18px; margin-bottom: 8px; }
.testimonial p { font-size: 15px; color: var(--ink); margin: 0 0 12px; }
.testimonial .who { font-weight: 700; color: var(--blue-ink); font-size: 14px; }
.testimonial .who span { color: var(--muted); font-weight: 500; }

/* ===== CTA banner ===== */
.cta {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  color: #fff; padding: 56px 0;
}
.cta .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta h2 { color: #fff; margin: 0 0 8px; }
.cta p { color: rgba(255,255,255,.85); margin: 0; max-width: 580px; }
.cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ===== Footer ===== */
.footer { background: #07223F; color: #B9CADB; padding: 50px 0 24px; margin-top: 60px; }
.footer-grid {
  display: grid; gap: 30px;
  grid-template-columns: 1.3fr 1fr 1fr 1.2fr;
}
.footer h4 { color: #fff; font-size: 15px; margin: 0 0 14px; text-transform: uppercase; letter-spacing: 1px; }
.footer a { color: #B9CADB; }
.footer a:hover { color: #fff; }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.footer .brand-text { font-size: 14px; line-height: 1.6; }
.footer-bottom {
  border-top: 1px solid #143657; margin-top: 30px; padding-top: 18px;
  text-align: center; font-size: 13px; color: #7E94AC;
}

/* ===== Vehicle detail page ===== */
.detail { padding: 32px 0; }
.detail-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 36px; }
.gallery .main-img {
  aspect-ratio: 16/10; background: #EAF3FC; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}
.gallery .main-img img { width: 100%; height: 100%; object-fit: cover; }
.gallery .thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 10px; }
.gallery .thumbs button {
  border: 2px solid transparent; border-radius: 10px; overflow: hidden;
  cursor: pointer; background: #EAF3FC; aspect-ratio: 4/3; padding: 0;
}
.gallery .thumbs button.active { border-color: var(--blue); }
.gallery .thumbs img { width: 100%; height: 100%; object-fit: cover; }

.detail-info h1 { font-size: clamp(26px, 3vw, 36px); margin: 0 0 6px; color: var(--blue-ink); }
.detail-info .sub { color: var(--muted); margin: 0 0 14px; font-size: 15px; }
.price-box {
  background: linear-gradient(135deg, #EAF3FC, #F4F9FF); border: 1px solid var(--line);
  padding: 18px; border-radius: var(--radius); margin: 14px 0 18px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
}
.price-box .price { font-size: 30px; font-weight: 900; color: var(--blue-dark); }
.price-box .status {
  background: var(--good); color: #fff; padding: 6px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 700; text-transform: uppercase;
}
.price-box .status.transit { background: var(--warn); }
.actions-stack { display: grid; gap: 10px; }

.specs-table {
  background: #fff; border-radius: var(--radius); padding: 6px 0;
  border: 1px solid var(--line); box-shadow: var(--shadow); margin-top: 24px;
}
.specs-table .row {
  display: grid; grid-template-columns: 1fr 1fr; padding: 12px 18px;
  border-bottom: 1px solid var(--line); font-size: 15px;
}
.specs-table .row:last-child { border-bottom: 0; }
.specs-table .row .k { color: var(--muted); font-weight: 600; }
.specs-table .row .v { color: var(--ink); font-weight: 700; text-align: right; }

.quote-form { background: #fff; border-radius: var(--radius); padding: 22px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.quote-form h3 { margin: 0 0 12px; color: var(--blue-ink); }
.quote-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.quote-form input, .quote-form select, .quote-form textarea {
  padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; font: inherit; width: 100%; min-height: 44px;
}
.quote-form textarea { min-height: 90px; resize: vertical; }

/* ===== Invoice checker ===== */
.invoice-card {
  background: #fff; border-radius: var(--radius); border: 1px solid var(--line);
  box-shadow: var(--shadow-lg); padding: 28px; max-width: 720px; margin: 0 auto;
}
.invoice-search { display: flex; gap: 10px; flex-wrap: wrap; }
.invoice-search input {
  flex: 1; min-width: 220px; padding: 14px 14px; border-radius: 12px;
  border: 1px solid var(--line); font: inherit; font-size: 16px; min-height: 54px;
}
.invoice-result { margin-top: 24px; display: none; }
.invoice-result.show { display: block; }
.invoice-result h3 { margin: 0 0 4px; color: var(--blue-ink); }
.status-bar {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 20px 0;
}
.status-step {
  text-align: center; padding: 14px 6px; border-radius: 10px;
  background: var(--bg); color: var(--muted); font-size: 13px; font-weight: 600;
  border: 2px solid transparent;
}
.status-step.done { background: var(--green); color: var(--blue-ink); }
.status-step.active { background: var(--blue); color: #fff; border-color: var(--blue-dark); }
.status-step .icon { display: block; font-size: 22px; margin-bottom: 4px; }
.invoice-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.invoice-table td { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.invoice-table td:first-child { color: var(--muted); font-weight: 600; }
.invoice-table td:last-child { text-align: right; font-weight: 700; color: var(--ink); }
.invoice-empty {
  text-align: center; padding: 30px 0; color: var(--muted);
}

/* ===== Page header (for inner pages) ===== */
.page-head {
  background: linear-gradient(135deg, var(--blue-ink) 0%, var(--blue-dark) 100%);
  color: #fff; padding: 50px 0 36px;
}
.page-head h1 { font-size: clamp(28px, 4vw, 42px); margin: 0 0 6px; color: #fff; letter-spacing: -.3px; }
.page-head p { margin: 0; color: rgba(255,255,255,.85); font-size: 16px; }
.crumbs { font-size: 13px; color: rgba(255,255,255,.7); margin-bottom: 10px; }
.crumbs a { color: rgba(255,255,255,.9); }

/* ===== Forms (contact) ===== */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-card { background: #fff; padding: 24px; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); }
.form-card label { font-size: 13px; color: var(--muted); font-weight: 700; }
.form-card input, .form-card select, .form-card textarea {
  width: 100%; padding: 12px; border-radius: 10px; border: 1px solid var(--line);
  font: inherit; background: #fff; margin-top: 4px; min-height: 44px;
}
.form-card textarea { min-height: 110px; resize: vertical; }

/* ===== Floating WhatsApp ===== */
.fab-whatsapp {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  background: #25D366; color: #fff; width: 60px; height: 60px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px rgba(37,211,102,.45);
  text-decoration: none;
  transition: transform .2s ease;
}
.fab-whatsapp:hover { transform: scale(1.08); text-decoration: none; }
.fab-whatsapp svg { width: 30px; height: 30px; }

/* ===== Finance calculator ===== */
.calc {
  background: #fff; padding: 22px; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.calc .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 10px; }
.calc input, .calc select {
  width: 100%; padding: 12px; border-radius: 10px; border: 1px solid var(--line);
  font: inherit; background: #fff; min-height: 44px;
}
.calc-result {
  margin-top: 16px; padding: 18px; background: linear-gradient(135deg, #EAF3FC, #F4F9FF);
  border-radius: 12px; text-align: center;
}
.calc-result .amount { font-size: 32px; color: var(--blue-dark); font-weight: 900; }
.calc-result .label { color: var(--muted); font-size: 14px; }

/* ===== Map ===== */
.map-embed { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.map-embed iframe { display: block; width: 100%; height: 360px; border: 0; }

/* ===== Tag pills (filter chips) ===== */
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 0; }
.pill {
  background: #fff; border: 1px solid var(--line); color: var(--ink);
  padding: 8px 14px; border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 600;
}
.pill.active { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .menu-toggle { display: block; }
  .menu {
    display: none; position: absolute; top: 70px; left: 0; right: 0;
    flex-direction: column; background: #fff;
    border-top: 1px solid var(--line); padding: 12px 16px; gap: 4px;
    box-shadow: var(--shadow-lg);
  }
  .menu.open { display: flex; }
  .menu a { padding: 14px; font-size: 16px; }
  .nav-cta .btn:not(.menu-toggle) { display: none; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  .status-bar { grid-template-columns: repeat(2, 1fr); }
  .specs-table .row { grid-template-columns: 1fr; gap: 4px; }
  .specs-table .row .v { text-align: left; }
  .form-grid { grid-template-columns: 1fr; }
  .quote-form .row { grid-template-columns: 1fr; }
  .calc .row { grid-template-columns: 1fr; }
  .gallery .thumbs { grid-template-columns: repeat(4, 1fr); }
}

/* ===========================================================================
   Theme toggle button (used in the header)
   ========================================================================= */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; padding: 0;
  background: var(--bg); color: var(--ink);
  border: 1px solid var(--line); border-radius: 999px;
  cursor: pointer; font-size: 18px;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.theme-toggle:hover { background: var(--card); border-color: var(--blue); }

/* ===========================================================================
   Dark mode — re-skin via [data-theme="dark"] on <html>.
   Strategy: redefine the design-token variables, then patch the handful of
   spots that hardcoded raw whites or pale blues.
   ========================================================================= */
[data-theme="dark"] {
  --blue:      #4DA3F0;
  --blue-dark: #6BB5F5;
  --blue-ink:  #DCE9F7;
  --green:     #B8DC85;
  --green-dark:#9CCC65;
  --ink:       #E8EEF7;
  --muted:     #8FA0B8;
  --line:      #1F3653;
  --bg:        #0A1929;
  --card:      #11243A;
  --warn:      #FBBF24;
  --good:      #4ADE80;
  --bad:       #F87171;
  --shadow:    0 6px 24px rgba(0, 0, 0, .35);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, .55);

  color-scheme: dark;
}
[data-theme="dark"] body { background: var(--bg); color: var(--ink); }

/* Header / nav */
[data-theme="dark"] .header { background: var(--card); border-bottom-color: var(--line); }
[data-theme="dark"] .menu a:hover,
[data-theme="dark"] .menu a.active { background: var(--bg); color: var(--blue-dark); }
[data-theme="dark"] .topbar { background: #061A2E; color: #B4C8E0; }

/* Hero gradient → deep blue */
[data-theme="dark"] .hero {
  background:
    radial-gradient(1100px 500px at 80% -10%, rgba(156,204,101,.12), transparent 60%),
    linear-gradient(180deg, #0E2541 0%, #0A1929 80%);
}
[data-theme="dark"] .hero-card { background: var(--card); border-color: var(--line); }

/* Buttons */
[data-theme="dark"] .btn-outline { background: var(--card); color: var(--blue-dark); border-color: var(--blue); }
[data-theme="dark"] .btn-outline:hover { background: var(--blue); color: var(--bg); }
[data-theme="dark"] .btn-ghost:hover { background: var(--card); }

/* Quick search + form inputs (all the spots that hardcoded #fff) */
[data-theme="dark"] .quick-search select,
[data-theme="dark"] .quick-search input,
[data-theme="dark"] .filters select,
[data-theme="dark"] .filters input,
[data-theme="dark"] .form-card input,
[data-theme="dark"] .form-card select,
[data-theme="dark"] .form-card textarea,
[data-theme="dark"] .quote-form input,
[data-theme="dark"] .quote-form select,
[data-theme="dark"] .quote-form textarea,
[data-theme="dark"] .calc input,
[data-theme="dark"] .calc select {
  background: var(--bg); color: var(--ink); border-color: var(--line);
}
[data-theme="dark"] .pill { background: var(--card); color: var(--ink); border-color: var(--line); }
[data-theme="dark"] .pill.active { background: var(--blue); color: var(--bg); border-color: var(--blue); }

/* Cards — every white-background panel gets a dark surface */
[data-theme="dark"] .card,
[data-theme="dark"] .filters,
[data-theme="dark"] .specs-table,
[data-theme="dark"] .quote-form,
[data-theme="dark"] .progress,
[data-theme="dark"] .form-card,
[data-theme="dark"] .calc,
[data-theme="dark"] .step,
[data-theme="dark"] .prop,
[data-theme="dark"] .testimonial,
[data-theme="dark"] .invoice-card { background: var(--card); border-color: var(--line); }
[data-theme="dark"] .card-media { background: linear-gradient(135deg, #143055, #0A1F38); }
[data-theme="dark"] .gallery .main-img,
[data-theme="dark"] .gallery .thumbs button { background: var(--bg); }

/* Gradient soft-blue panels */
[data-theme="dark"] .price-box {
  background: linear-gradient(135deg, rgba(77,163,240,0.10), rgba(77,163,240,0.04));
}
[data-theme="dark"] .calc-result {
  background: linear-gradient(135deg, rgba(77,163,240,0.12), rgba(77,163,240,0.04));
}

/* Chips / soft-blue accents (#EAF3FC family) */
[data-theme="dark"] .chip,
[data-theme="dark"] .prop .icon,
[data-theme="dark"] .status-step,
[data-theme="dark"] .topbar .links span {
  background: rgba(77, 163, 240, 0.12); color: var(--blue-dark);
}

/* Map / responsive menu */
[data-theme="dark"] .map-embed { background: var(--card); border-color: var(--line); }
@media (max-width: 960px) {
  [data-theme="dark"] .menu { background: var(--card); border-top-color: var(--line); }
}

/* Footer stays dark in both modes — but pull it from the same palette */
[data-theme="dark"] .footer { background: #04111F; color: #8AA1BB; }

/* Theme toggle itself */
[data-theme="dark"] .theme-toggle { background: var(--card); color: var(--ink); border-color: var(--line); }
[data-theme="dark"] .theme-toggle:hover { background: var(--bg); border-color: var(--blue); }

/* Subtle box-shadows feel heavier in dark mode — keep them softer */
[data-theme="dark"] .card,
[data-theme="dark"] .form-card,
[data-theme="dark"] .filters,
[data-theme="dark"] .quote-form,
[data-theme="dark"] .hero-card { box-shadow: 0 4px 18px rgba(0, 0, 0, .35); }

/* ===========================================================================
   Polish pass — smooth interactions, a11y focus, scroll effects
   ========================================================================= */

/* Keyboard focus — one consistent, visible ring everywhere */
:focus-visible {
  outline: 3px solid rgba(30, 136, 229, .55);
  outline-offset: 2px;
  border-radius: 8px;
}
[data-theme="dark"] :focus-visible { outline-color: rgba(109, 181, 245, .65); }

/* Inputs get a soft brand ring instead of the default outline */
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--blue) !important;
  box-shadow: 0 0 0 3px rgba(30, 136, 229, .16);
}

/* Hero content fades up on load */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
.hero-grid > * { animation: fadeUp .7s var(--ease) both; }
.hero-grid > *:nth-child(2) { animation-delay: .12s; }

/* Scroll-reveal (classes are added by JS only, so no-JS never hides content) */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .55s var(--ease), transform .55s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* Header lifts off the page once scrolled */
.header { transition: box-shadow .25s ease; }
.header.scrolled { box-shadow: 0 8px 30px rgba(15, 98, 176, .12); }
[data-theme="dark"] .header.scrolled { box-shadow: 0 8px 30px rgba(0, 0, 0, .45); }

/* Mobile menu slides in; hamburger morphs into an X */
.menu.open { animation: menuIn .22s var(--ease); }
@keyframes menuIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}
.menu-toggle span { transition: transform .25s var(--ease), opacity .2s ease; }
.menu-toggle.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Back to top */
.back-to-top {
  position: fixed; right: 25px; bottom: 92px; z-index: 60;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card); color: var(--blue-dark);
  font-size: 20px; font-weight: 800; cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transform: translateY(10px);
  transition: opacity .25s ease, transform .25s var(--ease), background .2s ease;
}
.back-to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.back-to-top:hover { background: var(--bg); }

/* Footer Instagram QR */
.footer-qr {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 16px;
  color: #B9CADB; text-decoration: none;
}
.footer-qr:hover { color: #fff; text-decoration: none; }
.footer-qr img { width: 86px; height: auto; border-radius: 10px; background: #fff; }
.footer-qr span { font-size: 13px; line-height: 1.45; }

/* ===========================================================================
   Invoice generator (quote.html)
   ========================================================================= */
.quote-layout { display: grid; grid-template-columns: 400px 1fr; gap: 26px; align-items: start; }
.quote-panel { position: sticky; top: 92px; }
.quote-panel .hint { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; }
@media (max-width: 1020px) {
  .quote-layout { grid-template-columns: 1fr; }
  .quote-panel { position: static; }
}

/* The invoice itself is a paper document — always white, even in dark mode */
.invoice-sheet {
  background: #fff; color: #1A2B42;
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 42px 46px; max-width: 860px;
  font-size: 15px; line-height: 1.55;
}
.invoice-sheet a { color: #0F62B0; }
.inv-top {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 24px;
  padding-bottom: 22px; border-bottom: 4px solid #9CCC65; flex-wrap: wrap;
}
.inv-logo { width: 168px; height: auto; }
.inv-title { text-align: right; }
.inv-title .doc { font-size: 24px; font-weight: 900; letter-spacing: 2px; color: #0A3D6E; text-transform: uppercase; }
.inv-title .meta { margin-top: 8px; font-size: 13.5px; color: #5A6B82; }
.inv-title .meta strong { color: #0B2545; }
.inv-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 22px 0; }
.inv-parties h4 {
  margin: 0 0 6px; font-size: 11.5px; letter-spacing: 1.5px; text-transform: uppercase;
  color: #7CB342; font-weight: 800;
}
.inv-parties p { margin: 0; font-size: 14.5px; color: #1A2B42; }
.inv-parties strong { font-size: 15.5px; color: #0A3D6E; }
.inv-items { width: 100%; border-collapse: collapse; margin-top: 4px; }
.inv-items th {
  text-align: left; font-size: 11.5px; letter-spacing: 1.2px; text-transform: uppercase;
  color: #fff; background: #0A3D6E; padding: 10px 12px; font-weight: 700;
}
.inv-items th:last-child, .inv-items td:last-child { text-align: right; }
.inv-items td { padding: 14px 12px; border-bottom: 1px solid #E4EAF2; vertical-align: top; }
.inv-items .item-name { font-weight: 800; color: #0A3D6E; font-size: 16px; }
.inv-items .item-sub { color: #5A6B82; font-size: 13px; margin-top: 3px; }
.inv-vehicle { display: flex; gap: 14px; align-items: flex-start; }
.inv-vehicle img { width: 130px; height: 82px; object-fit: cover; border-radius: 8px; flex: 0 0 130px; }
.inv-totals { margin-left: auto; margin-top: 14px; width: min(320px, 100%); }
.inv-totals .row { display: flex; justify-content: space-between; padding: 7px 12px; font-size: 14.5px; color: #1A2B42; }
.inv-totals .row.grand {
  background: #EAF6DC; border-radius: 10px; margin-top: 6px;
  font-weight: 900; font-size: 17px; color: #0A3D6E; padding: 12px;
}
.inv-notes { margin-top: 26px; padding: 14px 16px; background: #F6F9FC; border-radius: 10px; font-size: 13.5px; color: #40536B; }
.inv-notes strong { color: #0A3D6E; }
.inv-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 18px;
  margin-top: 28px; padding-top: 18px; border-top: 1px solid #E4EAF2; flex-wrap: wrap;
}
.inv-foot .thanks { font-weight: 800; color: #0A3D6E; }
.inv-foot .small { font-size: 12.5px; color: #5A6B82; max-width: 420px; }
.inv-foot .ig { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: #5A6B82; text-align: right; }
.inv-foot .ig img { width: 76px; height: auto; border-radius: 8px; }
@media (max-width: 640px) {
  .invoice-sheet { padding: 26px 20px; }
  .inv-parties { grid-template-columns: 1fr; gap: 16px; }
  .inv-title { text-align: left; }
  .inv-vehicle { flex-direction: column; }
}

/* ===========================================================================
   Print — hide the site chrome, print just the content (invoice prints
   as a clean A4 document; "Save as PDF" in the print dialog = download)
   ========================================================================= */
@media print {
  .topbar, .header, .footer, .fab-whatsapp, .back-to-top, .page-head,
  .quote-panel, .no-print { display: none !important; }
  body { background: #fff !important; }
  .section { padding: 0 !important; }
  .quote-layout { display: block !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .invoice-sheet {
    box-shadow: none !important; border: 0 !important; border-radius: 0;
    max-width: none; padding: 0; font-size: 14px;
  }
  .invoice-sheet, .inv-items th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ===========================================================================
   Reduced motion — honour the user's preference everywhere
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .hero-grid > * { animation: none; }
  .reveal { opacity: 1; transform: none; }
}
