/* ============================================================
   EV CANDIES — Main Stylesheet
   Brand colors: Orange #F2A01C / Green #61AE1E
============================================================ */

:root {
  --orange: #F2A01C;
  --orange-dark: #D98A0F;
  --green: #61AE1E;
  --green-dark: #4F8F18;
  --ink: #16241B;
  --ink-soft: #3C4B41;
  --paper: #FBFAF6;
  --card: #FFFFFF;
  --line: #E7E4DA;
  --muted: #7B8478;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(22, 36, 27, 0.08);
  --shadow-lg: 0 12px 40px rgba(22, 36, 27, 0.14);
  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
}

.icon { display: inline-block; vertical-align: -4px; flex-shrink: 0; }
.icon-bolt { color: var(--orange); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
p { margin: 0 0 1em; color: var(--ink-soft); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--orange);
  color: #1B1300;
}
.btn-primary:hover { background: var(--orange-dark); transform: translateY(-1px); }
.btn-secondary {
  background: var(--green);
  color: #fff;
}
.btn-secondary:hover { background: var(--green-dark); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn-outline:hover { border-color: var(--green); color: var(--green-dark); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 18px; font-size: 13px; }

/* --- Top utility bar --- */
.topbar {
  background: var(--ink);
  color: #cfd8d1;
  font-size: 13px;
}
.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  padding-bottom: 8px;
}
.topbar a { color: #cfd8d1; display: inline-flex; align-items: center; gap: 6px; }
.topbar a:hover { color: var(--orange); }
.topbar-links { display: flex; gap: 20px; align-items: center; }
.topbar-links .divider { opacity: 0.3; }

/* --- Header --- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 24px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo img { height: 48px; width: auto; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav > ul { display: flex; align-items: center; gap: 2px; }
.nav-item { position: relative; }
.nav-item > a, .nav-item > button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--ink);
  background: none;
  border: none;
  border-radius: var(--radius-sm);
}
.nav-item > a:hover, .nav-item > button:hover, .nav-item.active > a { color: var(--green-dark); background: #F3F7EE; }
.nav-item .caret { font-size: 10px; transition: transform 0.2s; opacity: 0.6; }
.nav-item:hover .caret { transform: rotate(180deg); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  position: relative;
}
.icon-btn:hover { border-color: var(--green); color: var(--green-dark); }
.badge-count {
  position: absolute; top: -4px; right: -4px;
  background: var(--orange); color: #1B1300;
  font-size: 10px; font-weight: 700;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.mobile-toggle { display: none; }

/* --- Mega menu --- */
.mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
  padding: 22px;
  display: none;
  min-width: 620px;
  z-index: 200;
}
.nav-item:hover .mega-menu,
.nav-item.menu-open .mega-menu { display: block; }
.mega-menu-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 12px;
}
.mega-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.mega-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
}
.mega-link:hover { background: #FFF7E9; color: var(--orange-dark); }
.mega-link .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.mega-foot {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mega-foot a { font-weight: 700; color: var(--green-dark); font-size: 13.5px; }

/* --- Hero --- */
.hero {
  background: linear-gradient(135deg, #F3F7EE 0%, #FDF6E7 100%);
  padding: 64px 0 56px;
  overflow: hidden;
  position: relative;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 18px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
.hero h1 {
  font-size: 48px;
  margin-bottom: 18px;
}
.hero h1 .accent { color: var(--orange); }
.hero h1 .accent2 { color: var(--green); }
.hero-sub { font-size: 17px; max-width: 480px; margin-bottom: 28px; }
.hero-cta { display: flex; gap: 14px; margin-bottom: 34px; }
.hero-stats { display: flex; gap: 32px; }
.hero-stat .num { font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--ink); }
.hero-stat .lbl { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.hero-visual {
  position: relative;
  background: #fff;
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--shadow-lg);
}
.hero-visual img { border-radius: 16px; width: 100%; }
.hero-badge {
  position: absolute;
  bottom: -18px; left: -18px;
  background: var(--green);
  color: #fff;
  padding: 14px 18px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-weight: 700;
  font-size: 14px;
}

/* --- Quick Finder (type -> speed -> brand steps) --- */
.finder {
  margin-top: -34px;
  position: relative;
  z-index: 5;
}
.finder-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 26px 28px;
  border: 1px solid var(--line);
}
.finder-tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.finder-tab {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  font-weight: 600;
  font-size: 13.5px;
  background: #fff;
}
.finder-tab.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.finder-grid { display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 12px; align-items: end; }
.finder-field label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.04em; }
.finder-field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  font-size: 14.5px;
  font-weight: 600;
  background: #FAFAF7;
}

/* --- Section headers --- */
.section { padding: 64px 0; }
.section-alt { background: #fff; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 32px; gap: 20px; }
.section-head h2 { font-size: 30px; }
.section-head .sub { color: var(--muted); font-size: 15px; margin: 6px 0 0; }
.section-head .view-all { font-weight: 700; color: var(--green-dark); white-space: nowrap; }

/* --- Vehicle type grid (icons) --- */
.type-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.type-card {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 16px;
  text-align: center;
  transition: all 0.2s;
}
.type-card:hover { border-color: var(--green); transform: translateY(-3px); box-shadow: var(--shadow); }
.type-card .icon {
  width: 56px; height: 56px; margin: 0 auto 12px;
  border-radius: 50%;
  background: #F3F7EE;
  display: flex; align-items: center; justify-content: center;
  color: var(--green-dark);
}
.type-card:hover .icon { background: var(--green); color: #fff; }
.type-card .icon svg { vertical-align: middle; }
.type-card .name { font-weight: 700; font-size: 14.5px; }
.type-card .count { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* --- Product Cards --- */
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.product-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
}
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); border-color: transparent; }
.product-card .thumb { aspect-ratio: 4/3; background: #F3F4EF; position: relative; overflow: hidden; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .thumb .tag {
  position: absolute; top: 12px; left: 12px;
  background: var(--orange); color: #1B1300;
  font-size: 11px; font-weight: 800; letter-spacing: 0.03em;
  padding: 5px 10px; border-radius: 999px; text-transform: uppercase;
}
.product-card .thumb .compare-add {
  position: absolute; top: 12px; right: 12px;
  width: 34px; height: 34px; border-radius: 50%;
  background: #fff; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.product-card .body { padding: 16px 18px 18px; flex: 1; display: flex; flex-direction: column; }
.product-card .brand-tag { font-size: 12px; font-weight: 700; color: var(--green-dark); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 4px; }
.product-card h3 { font-size: 17px; margin-bottom: 8px; }
.product-card .specs-row { display: flex; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.product-card .spec { font-size: 12.5px; color: var(--ink-soft); display: flex; align-items: center; gap: 5px; }
.product-card .spec b { color: var(--ink); font-weight: 700; }
.product-card .price-row { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px dashed var(--line); }
.product-card .price { font-weight: 800; font-size: 16px; color: var(--ink); font-family: var(--font-display); }
.product-card .price small { font-weight: 500; font-size: 11px; color: var(--muted); display: block; }

/* --- Step Filter Flow (Vehicles / Parts) --- */
.filter-hero {
  background: var(--ink);
  color: #fff;
  padding: 40px 0 34px;
}
.filter-hero .breadcrumb { font-size: 13px; color: #9fb0a4; margin-bottom: 12px; }
.filter-hero .breadcrumb a { color: #cfe0d3; }
.filter-hero .breadcrumb a:hover { color: var(--orange); }
.filter-hero h1 { color: #fff; font-size: 30px; margin-bottom: 6px; }
.filter-hero p { color: #b7c2ba; margin: 0; }

.steps-bar { display: flex; align-items: center; gap: 0; margin: 26px 0 0; flex-wrap: wrap; }
.step-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 16px 9px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  font-size: 13px; font-weight: 600; color: #cfd8d1;
}
.step-pill .n { width: 20px; height: 20px; border-radius: 50%; background: rgba(255,255,255,0.18); display: flex; align-items: center; justify-content: center; font-size: 11px; }
.step-pill.done { background: rgba(97,174,30,0.22); color: #B7E39B; }
.step-pill.done .n { background: var(--green); color: #fff; }
.step-arrow { color: #667169; margin: 0 6px; font-size: 14px; }

.option-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 28px; }
.option-card {
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 24px 18px; text-align: center; transition: all 0.2s;
}
.option-card:hover { border-color: var(--orange); transform: translateY(-3px); box-shadow: var(--shadow); }
.option-card .icon { display: flex; align-items: center; justify-content: center; margin-bottom: 10px; color: var(--green-dark); }
.option-card .name { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.option-card .meta { font-size: 12px; color: var(--muted); }
.option-card.view-all-card { background: #F3F7EE; border-style: dashed; border-color: var(--green); }
.option-card.view-all-card .name { color: var(--green-dark); }

.brand-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-top: 28px; }
.brand-card {
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 20px; text-align: center; transition: all 0.2s;
}
.brand-card:hover { border-color: var(--orange); box-shadow: var(--shadow); transform: translateY(-3px); }
.brand-card .logo-wrap { height: 44px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; font-weight: 800; font-family: var(--font-display); font-size: 15px; color: var(--ink); }
.brand-card .count { font-size: 12px; color: var(--muted); }

/* --- Filter sidebar + results layout --- */
.results-layout { display: grid; grid-template-columns: 260px 1fr; gap: 28px; margin-top: 28px; }
.filters-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; align-self: start; position: sticky; top: 90px; }
.filters-panel h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 14px; }
.filter-group { margin-bottom: 22px; }
.filter-group .group-title { font-weight: 700; font-size: 14px; margin-bottom: 10px; }
.filter-check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; padding: 6px 0; color: var(--ink-soft); }
.filter-check input { accent-color: var(--green); }
.results-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.results-toolbar .count { font-size: 14px; color: var(--muted); }
.results-toolbar select { padding: 8px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--line); font-weight: 600; font-size: 13.5px; }

/* --- Steps info banner --- */
.steps-note {
  background: #FFF7E9; border: 1px dashed var(--orange);
  border-radius: var(--radius-sm); padding: 12px 16px;
  font-size: 13.5px; color: #7A5306; margin-top: 20px;
  display: flex; align-items: center; gap: 10px;
}

/* --- Brand strip --- */
.brand-strip { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 30px 0; }
.brand-strip .b-logo { font-weight: 800; font-family: var(--font-display); font-size: 17px; color: var(--muted); opacity: 0.7; transition: opacity 0.2s; }
.brand-strip .b-logo:hover { opacity: 1; color: var(--ink); }

/* --- Footer --- */
.site-footer { background: var(--ink); color: #cfd8d1; padding: 56px 0 0; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-brand .logo img { height: 44px; }
.footer-brand p { color: #93a297; font-size: 13.5px; margin-top: 14px; max-width: 260px; }
.footer-col h5 { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 16px; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: #a9b5ac; font-size: 14px; }
.footer-col a:hover { color: var(--orange); }
.footer-social { display: flex; gap: 10px; margin-top: 18px; }
.footer-social a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.06); display: flex; align-items: center; justify-content: center; }
.footer-social a:hover { background: var(--green); }
.footer-bottom { display: flex; justify-content: space-between; padding: 20px 0; font-size: 13px; color: #7c887f; flex-wrap: wrap; gap: 10px; }
.footer-bottom a { color: #a9b5ac; }

/* --- Forms (auth, contact, admin) --- */
.form-shell { max-width: 440px; margin: 60px auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow); }
.form-shell h1 { font-size: 24px; margin-bottom: 6px; }
.form-shell .sub { color: var(--muted); font-size: 14px; margin-bottom: 26px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: 13.5px; margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); font-size: 14.5px; font-family: inherit; background: #FAFAF7;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--green); background: #fff; }
.form-foot { text-align: center; margin-top: 18px; font-size: 14px; color: var(--muted); }
.form-foot a { font-weight: 700; color: var(--green-dark); }
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 18px; }
.alert-success { background: #EEF8E5; color: var(--green-dark); border: 1px solid #C9E7B4; }
.alert-error { background: #FDECEC; color: #B23434; border: 1px solid #F4C6C6; }

/* --- Compare table --- */
.compare-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.compare-table th, .compare-table td { padding: 14px 18px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; }
.compare-table th { background: #F8F7F2; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); width: 180px; }
.compare-table .prod-col img { width: 100%; border-radius: var(--radius-sm); margin-bottom: 10px; }
.compare-table .prod-col .name { font-weight: 700; font-size: 15px; }

/* --- Detail page --- */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; margin-top: 30px; }
.detail-gallery .main-img { border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; aspect-ratio: 4/3; background: #F3F4EF; }
.detail-gallery .main-img img { width: 100%; height: 100%; object-fit: cover; }
.thumb-row { display: flex; gap: 10px; }
.thumb-row .t { width: 70px; height: 70px; border-radius: 10px; overflow: hidden; border: 2px solid var(--line); cursor: pointer; }
.detail-info .brand-tag { color: var(--green-dark); font-weight: 700; font-size: 13px; text-transform: uppercase; }
.detail-info h1 { font-size: 30px; margin: 6px 0 14px; }
.detail-price { font-family: var(--font-display); font-size: 26px; font-weight: 800; margin-bottom: 20px; }
.detail-specs-mini { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 26px; }
.mini-spec { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; }
.mini-spec .lbl { font-size: 11.5px; color: var(--muted); text-transform: uppercase; font-weight: 700; margin-bottom: 4px; }
.mini-spec .val { font-weight: 700; font-size: 16px; }
.detail-cta { display: flex; gap: 12px; margin-bottom: 10px; }
.spec-table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.spec-table tr td { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.spec-table tr td:first-child { color: var(--muted); font-weight: 600; width: 40%; }
.spec-table tr td:last-child { font-weight: 700; }
.tab-nav { display: flex; gap: 6px; border-bottom: 2px solid var(--line); margin: 40px 0 24px; }
.tab-nav button { padding: 12px 20px; font-weight: 700; font-size: 14.5px; color: var(--muted); background: none; border: none; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tab-nav button.active { color: var(--ink); border-color: var(--orange); }

/* --- Blog --- */
.blog-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: all 0.2s; }
.blog-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.blog-card .thumb { aspect-ratio: 16/10; background: #F3F4EF; }
.blog-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.blog-card .body { padding: 18px 20px 22px; }
.blog-card .meta { font-size: 12px; color: var(--muted); margin-bottom: 8px; font-weight: 600; }
.blog-card h3 { font-size: 17px; margin-bottom: 8px; }
.blog-card p { font-size: 13.5px; }

/* --- CTA band --- */
.cta-band {
  background: linear-gradient(120deg, var(--green) 0%, var(--green-dark) 100%);
  border-radius: 24px;
  padding: 48px 56px;
  color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 30px;
  flex-wrap: wrap;
}
.cta-band h2 { color: #fff; font-size: 28px; margin-bottom: 8px; }
.cta-band p { color: #E1F2D2; margin: 0; }
.cta-band .btn-primary { background: #fff; color: var(--green-dark); }
.cta-band .btn-primary:hover { background: #FFF7E9; }

/* --- Admin --- */
.admin-body { background: #F3F3EF; min-height: 100vh; }
.admin-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.admin-sidebar { background: var(--ink); color: #cfd8d1; padding: 22px 16px; }
.admin-sidebar .logo { padding: 0 8px 22px; }
.admin-sidebar .logo img { height: 36px; }
.admin-sidebar a { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.admin-sidebar a:hover, .admin-sidebar a.active { background: rgba(255,255,255,0.08); color: #fff; }
.admin-sidebar a.active { color: var(--orange); }
.admin-main { padding: 26px 32px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.admin-topbar h1 { font-size: 22px; }
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 28px; }
.stat-card { background: #fff; border-radius: var(--radius); padding: 20px 22px; border: 1px solid var(--line); }
.stat-card .num { font-family: var(--font-display); font-size: 28px; font-weight: 800; }
.stat-card .lbl { font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 4px; }
.admin-table-wrap { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { background: #FAFAF7; text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); }
.admin-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.admin-table tr:last-child td { border-bottom: none; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.pill-green { background: #EAF6E0; color: var(--green-dark); }
.pill-orange { background: #FEF1DB; color: var(--orange-dark); }
.pill-gray { background: #EFEFEA; color: var(--muted); }
.admin-form-card { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); padding: 26px 28px; max-width: 720px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* --- Utility --- */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state .icon { display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; color: var(--line); }

/* --- Responsive --- */
@media (max-width: 1100px) {
  .hero-inner { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .type-grid { grid-template-columns: repeat(3, 1fr); }
  .option-grid { grid-template-columns: repeat(3, 1fr); }
  .brand-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
  .finder-grid { grid-template-columns: repeat(2, 1fr); }
  .results-layout { grid-template-columns: 220px 1fr; gap: 20px; }
}

@media (max-width: 900px) {
  .results-layout { grid-template-columns: 1fr; }
  .filters-panel { position: static; }
}

@media (max-width: 780px) {
  .main-nav, .topbar-links { display: none; }
  .mobile-toggle { display: flex; }
  .card-grid, .type-grid, .option-grid, .brand-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .card-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .header-inner { gap: 12px; }
  .logo img { height: 38px; }
  .header-actions { gap: 6px; }
  .header-actions .btn-sm { padding: 8px 12px; font-size: 13px; }

  /* Hero */
  .hero { padding: 32px 0; }
  .hero h1 { font-size: 30px; }
  .hero-sub { font-size: 15px; max-width: 100%; }
  .hero-cta { flex-wrap: wrap; gap: 10px; }
  .hero-stats { gap: 20px; flex-wrap: wrap; }
  .hero-badge { position: static; margin-top: 14px; display: inline-block; }

  /* Finder */
  .finder-card { padding: 18px 16px; }
  .finder-grid { grid-template-columns: repeat(2, 1fr); }
  .finder-grid .btn-block { grid-column: 1 / -1; }

  /* Section headers */
  .section { padding: 40px 0; }
  .section-head { flex-wrap: wrap; }
  .section-head h2 { font-size: 22px; }

  /* Filter hero / steps */
  .filter-hero h1 { font-size: 24px; }
  .steps-bar { gap: 6px; }
  .step-pill { padding: 7px 12px 7px 10px; font-size: 12px; }

  /* Results toolbar */
  .results-toolbar { flex-wrap: wrap; gap: 10px; }

  /* Compare table: allow horizontal scroll (already wrapped in overflow-x:auto in compare.php) */
  .compare-table { min-width: 560px; }
  .compare-table th { width: auto; min-width: 90px; }
  /* Spec table: key/value pairs, just needs to breathe */
  .spec-table td { padding: 8px 4px; font-size: 13.5px; }
  .spec-table tr td:first-child { width: 46%; }
  .admin-shell { grid-template-columns: 1fr; }

  /* Detail gallery */
  .thumb-row { flex-wrap: wrap; }

  /* Footer */
  .footer-brand { grid-column: 1 / -1; }
  .footer-brand p { max-width: 100%; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 14px; }
  .card-grid, .type-grid, .option-grid, .brand-grid, .card-grid.cols-3 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .hero h1 { font-size: 25px; }
  .hero-stats { gap: 14px; }
  .hero-stat .num { font-size: 20px; }
  .finder-grid { grid-template-columns: 1fr; }
  .type-card { padding: 14px 8px; }
  .type-card .name { font-size: 12.5px; }
  .type-card .icon { width: 42px; height: 42px; margin-bottom: 8px; }
  .option-card, .brand-card { padding: 14px 10px; }
  .product-card h3 { font-size: 15px; }
  .product-card .body { padding: 12px 12px 14px; }
  .product-card .specs-row { gap: 8px; }
  .topbar-links a { font-size: 12px; }
  .topbar .container { flex-wrap: wrap; gap: 6px; row-gap: 4px; }
}

/* --- Mobile nav drawer --- */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(22, 36, 27, 0.45);
  z-index: 300;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.mobile-nav-overlay.open {
  display: block;
  opacity: 1;
}
.mobile-nav {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(340px, 86vw);
  background: #fff;
  z-index: 301;
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform 0.28s ease;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.mobile-nav.open {
  transform: translateX(0);
}
body.mobile-nav-locked {
  overflow: hidden;
}
.mobile-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.mobile-nav-head .logo img { height: 36px; }
.mobile-nav-list {
  padding: 8px 10px;
  flex: 1;
}
.mobile-nav-list > li > a {
  display: block;
  padding: 14px 12px;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.mobile-nav-group { border-bottom: 1px solid var(--line); }
.mobile-nav-group-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 12px;
  background: none;
  border: none;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  text-align: left;
}
.mobile-nav-group .caret { transition: transform 0.2s; opacity: 0.6; }
.mobile-nav-group.open .caret { transform: rotate(180deg); }
.mobile-submenu {
  display: none;
  flex-direction: column;
  padding: 0 12px 12px 22px;
}
.mobile-nav-group.open .mobile-submenu { display: flex; }
.mobile-submenu a {
  padding: 10px 8px;
  font-size: 14px;
  color: var(--ink-soft);
}
.mobile-submenu-viewall {
  color: var(--green-dark) !important;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.mobile-nav-foot {
  padding: 16px 18px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
}
.mobile-nav-foot .btn { flex: 1; justify-content: center; }
