/* ─── EV Display — ev-display.css ─────────────────────────────────────────── */

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

:root {
  --evd-accent:      #3b82f6;
  --evd-accent-dk:   #2563eb;
  --evd-dark:        #0f172a;
  --evd-dark-2:      #1e293b;
  --evd-text:        #1e293b;
  --evd-muted:       #64748b;
  --evd-border:      #e2e8f0;
  --evd-bg:          #f8fafc;
  --evd-card:        #ffffff;
  --evd-yes:         #16a34a;
  --evd-no:          #dc2626;
  --evd-radius:      12px;
  --evd-font:        'Inter', system-ui, -apple-system, sans-serif;
  --evd-max-width:   1140px;
}

/* ── Reset Divi interference on vehicle pages ────────────────────────────── */

.evd-single,
.evd-archive {
  font-family: var(--evd-font) !important;
  color: var(--evd-text);
  line-height: 1.6;
}

/* Remove Divi's default page padding when our templates take over */
.single-vehicle #main-content,
.post-type-archive-vehicle #main-content {
  padding: 0 !important;
}

.single-vehicle .et_pb_section,
.post-type-archive-vehicle .et_pb_section {
  padding: 0 !important;
}

/* ── Hero ────────────────────────────────────────────────────────────────── */

.evd-hero {
  position: relative;
  min-height: 500px;
  background-color: var(--evd-dark);
  background-size: cover;
  background-position: center 30%;
  display: flex;
  align-items: flex-end;
}

.evd-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(15, 23, 42, 0.96) 0%,
    rgba(15, 23, 42, 0.55) 55%,
    rgba(15, 23, 42, 0.25) 100%
  );
}

.evd-hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--evd-max-width);
  margin: 0 auto;
  padding: 52px 32px;
}

.evd-breadcrumb {
  font-family: var(--evd-font);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 14px;
}

.evd-breadcrumb a {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  transition: color 0.15s;
}
.evd-breadcrumb a:hover { color: #fff; }

.evd-title {
  font-family: var(--evd-font) !important;
  font-size: clamp(26px, 5vw, 48px);
  font-weight: 700;
  color: #fff !important;
  line-height: 1.15;
  margin: 0 0 8px !important;
  letter-spacing: -0.02em;
}

.evd-variant {
  display: block;
  font-size: 0.52em;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 6px;
  letter-spacing: 0;
}

.evd-hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.evd-pill {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 10px;
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 90px;
}

.evd-pill-label {
  font-family: var(--evd-font);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.55);
}

.evd-pill-value {
  font-family: var(--evd-font);
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.evd-pill-unit {
  font-size: 13px;
  font-weight: 400;
  opacity: 0.7;
}

.evd-pill--price .evd-pill-value { color: #86efac; }

.evd-pill--body {
  background: var(--evd-accent);
  border-color: var(--evd-accent);
  font-family: var(--evd-font);
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  flex-direction: row;
  align-items: center;
  padding: 12px 20px;
  min-width: auto;
  align-self: flex-end;
}

/* ── Sticky tab nav ──────────────────────────────────────────────────────── */

.evd-tabs-wrap {
  background: var(--evd-dark-2);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.07);
}

.evd-tabs-nav {
  max-width: var(--evd-max-width);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.evd-tabs-nav::-webkit-scrollbar { display: none; }

.evd-tab-btn {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 17px 22px;
  font-family: var(--evd-font);
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
  outline: none;
}

.evd-tab-btn:hover  { color: rgba(255, 255, 255, 0.85); }

.evd-tab-btn.active {
  color: #fff;
  border-bottom-color: var(--evd-accent);
}

/* ── Tab panels ──────────────────────────────────────────────────────────── */

.evd-tabs-content {
  max-width: var(--evd-max-width);
  margin: 0 auto;
  padding: 44px 32px 80px;
  background: var(--evd-bg);
  min-height: 320px;
}

.evd-tab-panel          { display: none; }
.evd-tab-panel.active   { display: block; }

.evd-summary {
  background: var(--evd-card);
  border-left: 4px solid var(--evd-accent);
  border-radius: 0 var(--evd-radius) var(--evd-radius) 0;
  padding: 20px 24px;
  margin-bottom: 32px;
  font-family: var(--evd-font);
  font-size: 15px;
  line-height: 1.75;
  color: var(--evd-text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

/* ── Section headings inside tabs ───────────────────────────────────────── */

.evd-section-heading {
  font-family: var(--evd-font) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--evd-muted) !important;
  margin: 36px 0 10px !important;
}

.evd-section-heading:first-child { margin-top: 0 !important; }

/* ── Spec tables ─────────────────────────────────────────────────────────── */

.evd-spec-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--evd-card);
  border-radius: var(--evd-radius);
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.07);
  margin-bottom: 4px;
}

.evd-spec-table th,
.evd-spec-table td {
  padding: 14px 20px;
  font-family: var(--evd-font);
  font-size: 14px;
  border-bottom: 1px solid var(--evd-border);
  text-align: left;
  vertical-align: middle;
}

.evd-spec-table tr:last-child th,
.evd-spec-table tr:last-child td {
  border-bottom: none;
}

.evd-spec-table th {
  font-weight: 500;
  color: var(--evd-muted);
  width: 46%;
}

.evd-spec-table td {
  font-weight: 500;
  color: var(--evd-text);
}

.evd-unit {
  font-size: 11px;
  font-weight: 400;
  color: var(--evd-muted);
  margin-left: 3px;
}

.evd-yes  { color: var(--evd-yes); font-weight: 600; }
.evd-no   { color: var(--evd-no);  font-weight: 500; }

.evd-no-data {
  color: var(--evd-muted);
  font-size: 13px;
  font-style: italic;
  padding: 16px 20px;
}

/* ── Archive header ──────────────────────────────────────────────────────── */

.evd-archive-header {
  background: var(--evd-dark);
  padding: 72px 32px 56px;
}

.evd-archive-header-inner {
  max-width: var(--evd-max-width);
  margin: 0 auto;
}

.evd-archive-header h1 {
  font-family: var(--evd-font) !important;
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 700;
  color: #fff !important;
  margin: 0 0 10px !important;
  letter-spacing: -0.02em;
}

.evd-archive-header p {
  font-family: var(--evd-font);
  color: rgba(255, 255, 255, 0.6);
  font-size: 16px;
  margin: 0;
}

/* ── Filter bar ──────────────────────────────────────────────────────────── */

.evd-archive-inner {
  max-width: var(--evd-max-width);
  margin: 0 auto;
  padding: 36px 32px 80px;
}

.evd-filter-bar {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
  padding: 20px 24px;
  background: var(--evd-card);
  border-radius: var(--evd-radius);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.07);
}

.evd-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.evd-filter-group label {
  font-family: var(--evd-font);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--evd-muted);
}

.evd-filter-group select {
  font-family: var(--evd-font);
  font-size: 14px;
  font-weight: 500;
  color: var(--evd-text);
  border: 1.5px solid var(--evd-border);
  border-radius: 8px;
  padding: 9px 14px;
  background: var(--evd-bg);
  cursor: pointer;
  transition: border-color 0.15s;
  appearance: auto;
}

.evd-filter-group select:focus {
  outline: none;
  border-color: var(--evd-accent);
}

.evd-filter-count {
  margin-left: auto;
  font-family: var(--evd-font);
  font-size: 13px;
  color: var(--evd-muted);
  align-self: flex-end;
  padding-bottom: 4px;
}

/* ── Vehicle grid ────────────────────────────────────────────────────────── */

.evd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

/* ── Vehicle card ────────────────────────────────────────────────────────── */

.evd-card {
  background: var(--evd-card);
  border-radius: var(--evd-radius);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.evd-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.13);
}

.evd-card-link {
  display: block;
  text-decoration: none !important;
  color: inherit;
}

.evd-card-image {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--evd-bg);
  overflow: hidden;
}

.evd-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.evd-card:hover .evd-card-image img {
  transform: scale(1.05);
}

.evd-card-no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 52px;
  opacity: 0.2;
}

.evd-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
  color: #fff;
  font-family: var(--evd-font);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 4px 10px;
  border-radius: 6px;
}

.evd-card-body {
  padding: 20px 22px;
}

.evd-card-title {
  font-family: var(--evd-font) !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  color: var(--evd-text) !important;
  margin: 0 0 3px !important;
  line-height: 1.25 !important;
}

.evd-card-variant {
  font-family: var(--evd-font);
  font-size: 13px;
  color: var(--evd-muted);
  margin: 0 0 16px !important;
}

.evd-card-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 18px;
}

.evd-card-pill {
  font-family: var(--evd-font);
  font-size: 12px;
  font-weight: 500;
  color: var(--evd-text);
  background: var(--evd-bg);
  border: 1px solid var(--evd-border);
  border-radius: 20px;
  padding: 4px 11px;
}

.evd-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--evd-border);
}

.evd-card-price {
  font-family: var(--evd-font);
  font-size: 17px;
  font-weight: 700;
  color: var(--evd-text);
}

.evd-card-cta {
  font-family: var(--evd-font);
  font-size: 13px;
  font-weight: 600;
  color: var(--evd-accent);
  transition: color 0.15s;
}

.evd-card:hover .evd-card-cta { color: var(--evd-accent-dk); }

.evd-no-results {
  text-align: center;
  padding: 56px 24px;
  font-family: var(--evd-font);
  color: var(--evd-muted);
  font-size: 15px;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .evd-hero           { min-height: 400px; }
  .evd-hero-inner     { padding: 36px 20px; }
  .evd-tabs-nav       { padding: 0 20px; }
  .evd-tabs-content   { padding: 32px 20px 60px; }
  .evd-archive-header { padding: 48px 20px 36px; }
  .evd-archive-inner  { padding: 24px 20px 60px; }
  .evd-spec-table th  { width: 50%; }
  .evd-pill-value     { font-size: 18px; }
  .evd-filter-bar     { padding: 16px; }
}

@media (max-width: 480px) {
  .evd-grid                   { grid-template-columns: 1fr; }
  .evd-hero-pills .evd-pill   { min-width: 70px; }
  .evd-pill-value             { font-size: 16px; }
  .evd-tab-btn                { padding: 15px 14px; font-size: 13px; }
}
