/* =====================================================================
   HOME v2 - search-first hero, popular brands, newest listings.
   Replaces the old marketing hero + filler stats block.
   ===================================================================== */

.background-slideshow,
.background-overlay { display: none !important; }
body { background: var(--card-bg); }

.home-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px;
  align-items: start; margin-bottom: 40px;
}
.home-hero.no-aside { grid-template-columns: minmax(0, 1fr); }

.home-title {
  margin: 8px 0 8px; font-size: 40px; line-height: 1.1; font-weight: 800;
  letter-spacing: -.03em; color: var(--text);
}
.home-lead { margin: 0 0 22px; color: var(--muted); font-size: 17px; }
.home-lead strong { color: var(--text); }

/* ---- Search panel ---- */
.home-search {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 12px;
  align-items: end; padding: 18px;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}
.hs-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hs-field label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.hs-field select,
.hs-field input {
  width: 100%; height: 46px; padding: 0 12px; box-sizing: border-box;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--card-bg); color: var(--text); font-size: 15px; font-family: inherit;
}
.hs-field select:disabled { opacity: .6; cursor: not-allowed; }
.hs-field select:focus,
.hs-field input:focus { outline: none; border-color: var(--accent, #0ea5e9); box-shadow: 0 0 0 3px rgba(14, 165, 233, .2); }

.hs-submit {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 28px; border: 0; border-radius: 10px;
  background: var(--accent-strong, #0369a1); color: #fff; font-size: 16px; font-weight: 700; cursor: pointer;
}
.hs-submit:hover { background: #0284c7; }

.home-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.home-quick a {
  padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px;
  color: var(--text); font-size: 14px; font-weight: 600; text-decoration: none; background: var(--card-bg);
}
.home-quick a:hover { border-color: var(--accent, #0ea5e9); color: var(--accent, #0ea5e9); }
.home-quick .quick-sell { background: var(--accent-strong, #0369a1); border-color: var(--accent, #0ea5e9); color: #fff; }
.home-quick .quick-sell:hover { background: #075985; color: #fff; }

/* ---- Car of the day ---- */
.cod-card {
  position: relative; display: block; overflow: hidden; text-decoration: none; color: inherit;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}
.cod-card:hover { border-color: var(--accent, #0ea5e9); }
.cod-label {
  position: absolute; top: 12px; left: 12px; z-index: 2; padding: 4px 10px; border-radius: 6px;
  background: #f59e0b; color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
}
.cod-image { aspect-ratio: 4 / 3; background: var(--hover); }
.cod-image img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 0; box-shadow: none; }
.cod-noimage { height: 100%; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.cod-body { padding: 14px 16px 16px; }
.cod-title { font-size: 18px; font-weight: 800; color: var(--text); }
.cod-meta { margin-top: 4px; font-size: 14px; color: var(--muted); }
.cod-price { margin-top: 10px; font-size: 24px; font-weight: 800; color: var(--text); }

/* ---- Sections ---- */
.home-section { margin-bottom: 44px; }
.home-section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 16px; }
.home-section-head h2 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.home-link { color: var(--accent, #0ea5e9); font-weight: 700; font-size: 14px; text-decoration: none; white-space: nowrap; }
.home-link:hover { text-decoration: underline; }

/* ---- Popular brands ---- */
.brand-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.brand-tile {
  display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 12px;
  align-items: center; padding: 14px; text-decoration: none; color: inherit;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px;
}
.brand-tile:hover { border-color: var(--accent, #0ea5e9); box-shadow: 0 6px 20px rgba(0, 0, 0, .12); }
.bt-badge {
  grid-row: 1 / 3; width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(14, 165, 233, .14); color: var(--accent, #0ea5e9); font-size: 20px; font-weight: 800;
}
.bt-name { font-weight: 700; color: var(--text); }
.bt-count { font-size: 13px; color: var(--muted); }

/* ---- Budget tiles ---- */
.budget-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.budget-tile {
  display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; text-decoration: none; color: inherit;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px;
  border-left: 4px solid var(--accent, #0ea5e9);
}
.budget-tile:hover { border-color: var(--accent, #0ea5e9); box-shadow: 0 6px 20px rgba(0, 0, 0, .12); }
.bu-label { font-size: 18px; font-weight: 800; color: var(--text); }
.bu-count { font-size: 13px; color: var(--muted); }

/* ---- Fuel tiles ---- */
.fuel-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.fuel-tile {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; text-decoration: none; color: inherit;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px;
}
.fuel-tile:hover { border-color: var(--accent, #0ea5e9); box-shadow: 0 6px 20px rgba(0, 0, 0, .12); }
.ft-icon {
  width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(14, 165, 233, .14); color: var(--accent, #0ea5e9);
}
.fuel-diesel .ft-icon { background: rgba(245, 158, 11, .16); color: #f59e0b; }
.fuel-hybrid .ft-icon { background: rgba(34, 197, 94, .16); color: #22c55e; }
.fuel-ev .ft-icon { background: rgba(139, 92, 246, .18); color: #8b5cf6; }
.ft-text { display: flex; flex-direction: column; }
.ft-name { font-weight: 800; font-size: 17px; color: var(--text); }
.ft-count { font-size: 13px; color: var(--muted); }

/* ---- Why Vehero ---- */
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.why-card { padding: 20px; background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; }
.why-icon {
  display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center;
  border-radius: 10px; margin-bottom: 12px; background: rgba(14, 165, 233, .14); color: var(--accent, #0ea5e9);
}
.why-card h3 { margin: 0 0 6px; font-size: 17px; font-weight: 800; color: var(--text); }
.why-card p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--muted); }
.why-card a { color: var(--accent, #0ea5e9); font-weight: 700; text-decoration: none; white-space: nowrap; }
.why-card a:hover { text-decoration: underline; }

/* ---- Blog ---- */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 16px; }
.blog-card {
  display: flex; flex-direction: column; overflow: hidden; text-decoration: none; color: inherit;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px;
}
.blog-card:hover { border-color: var(--accent, #0ea5e9); box-shadow: 0 6px 20px rgba(0, 0, 0, .12); }
.bc-image { aspect-ratio: 16 / 9; background: var(--hover); overflow: hidden; }
.bc-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bc-placeholder {
  height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 44px; font-weight: 900; color: #fff; background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
}
.bc-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.bc-date { font-size: 12px; color: var(--muted); }
.bc-title { font-size: 17px; font-weight: 800; line-height: 1.3; color: var(--text); }
.bc-excerpt { font-size: 14px; line-height: 1.5; color: var(--muted); }

/* ---- Sell CTA ---- */
.sell-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: 28px 32px; margin-bottom: 8px; border-radius: 14px;
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%); color: #fff;
}
.sell-cta h2 { margin: 0 0 4px; font-size: 24px; font-weight: 800; }
.sell-cta p { margin: 0; opacity: .92; }
.sell-btn {
  padding: 13px 26px; border-radius: 10px; background: #fff; color: #0284c7;
  font-weight: 800; text-decoration: none; white-space: nowrap;
}
.sell-btn:hover { background: #f0f9ff; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .budget-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .home-hero { grid-template-columns: minmax(0, 1fr); }
  .home-hero-aside { max-width: 420px; }
  .home-search { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hs-submit { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .home-title { font-size: 28px; }
  .home-search { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .home-section-head h2 { font-size: 20px; }
  .brand-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bu-label { font-size: 15px; }
  .budget-tile { padding: 14px; }
  .sell-cta { padding: 22px 20px; }
}
