/**
 * CarDecision site redesign — original visual system
 * Inspired by clear India-auto IA (search, budget, brands, compare)
 * NOT a clone of any third-party brand, assets, or layout.
 */

:root {
  --cw-ink: #071422;
  --cw-ember: #e85d04;
  --cw-ember-hot: #ff6b1a;
  --cw-steel: #1a6b8a;
  --cw-paper: #f6f8fa;
  --cw-line: #d7e0e8;
  --radius-xl: 22px;
}

/* ========== Header brand mark ========== */
.brand {
  flex-direction: row;
  align-items: center;
  gap: 0.7rem;
}
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--cw-ember) 0%, #c44d03 100%);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.04em;
  box-shadow: 0 6px 16px rgba(232, 93, 4, 0.28);
  flex-shrink: 0;
}
.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0;
  line-height: 1.15;
}
.brand-name {
  font-size: 1.15rem;
}
.site-header .header-inner {
  min-height: 68px;
}
.nav-desktop a {
  border-radius: 10px;
  font-size: 0.88rem;
}

/* ========== Full-bleed home hero ========== */
.cw-hero {
  position: relative;
  min-height: min(78vh, 640px);
  display: flex;
  align-items: flex-end;
  padding: 4.5rem 0 3rem;
  color: #fff;
  background:
    linear-gradient(105deg, rgba(7, 20, 34, 0.92) 0%, rgba(7, 20, 34, 0.72) 48%, rgba(7, 20, 34, 0.45) 100%),
    var(--cw-hero-img) center/cover no-repeat;
  overflow: hidden;
}
.cw-hero-shade {
  position: absolute;
  inset: auto 0 0 0;
  height: 40%;
  background: linear-gradient(transparent, rgba(7, 20, 34, 0.55));
  pointer-events: none;
}
.cw-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  padding-bottom: 0.5rem;
}
.cw-hero-brand {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #fff;
  line-height: 1.1;
}
.cw-hero h1 {
  margin: 0 0 0.75rem;
  max-width: 12ch;
  font-size: clamp(2.1rem, 5.5vw, 3.4rem);
  color: #fff;
  letter-spacing: -0.045em;
}
.cw-hero-lead {
  margin: 0 0 1.35rem;
  max-width: 38ch;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.5;
}
.cw-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  color: #fff !important;
  backdrop-filter: blur(6px);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff !important;
}
.cw-hero-search {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: stretch;
  gap: 0.55rem;
  max-width: 520px;
  width: 100%;
  padding: 0.55rem;
  border-radius: 16px;
  background: rgba(7, 20, 34, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(12px);
}
.cw-hero-search .input {
  border: 0;
  background: #fff;
  color: #0b1f33;
  min-height: 48px;
  height: 48px;
  border-radius: 12px;
  padding: 0 0.95rem;
}
.cw-hero-search .input::placeholder {
  color: #5B6B7A;
  opacity: 1;
}
.cw-hero-search .btn {
  border-radius: 12px;
  min-height: 48px;
  height: 48px;
}
@media (max-width: 560px) {
  .cw-hero {
    min-height: 70vh;
    align-items: flex-end;
    padding: 3.5rem 0 2rem;
  }
  .cw-hero-search {
    grid-template-columns: 1fr;
  }
}

/* Shortcut rail under hero */
.cw-rail {
  background: var(--surface, #fff);
  border-bottom: 1px solid var(--outline, var(--cw-line));
  position: sticky;
  top: var(--header-h, 72px);
  z-index: 40;
}
.cw-rail-inner {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  padding: 0.65rem 0;
  scrollbar-width: thin;
}
.cw-rail-inner a {
  flex: 0 0 auto;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--on-surface, var(--cw-ink));
  background: var(--surface-3, #e8eef3);
  white-space: nowrap;
}
.cw-rail-inner a:hover {
  background: color-mix(in srgb, var(--brand-accent) 16%, var(--surface-3, #e8eef3));
  color: var(--on-surface, var(--cw-ink));
}
html[data-theme="dark"] .cw-rail {
  background: var(--surface);
}
html[data-theme="dark"] .cw-hero-search .input {
  background: #152433;
  color: #eef3f7;
}

/* Home blocks */
.cw-home {
  gap: 2.25rem !important;
}
.cw-block-head {
  margin-bottom: 1rem;
}
.cw-block-head.row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
}
.cw-block-head h2 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.35rem, 2.5vw, 1.7rem);
  letter-spacing: -0.03em;
}
.cw-block-head p {
  margin: 0;
  max-width: 48ch;
}
.cw-link {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--brand-steel);
  white-space: nowrap;
}
.cw-link:hover { color: var(--brand-accent); }

.cw-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.cw-pill {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--outline, var(--cw-line));
  background: var(--surface, #fff);
  color: var(--on-surface, var(--cw-ink));
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: var(--elev-card, var(--shadow));
}
.cw-pill:hover {
  border-color: var(--brand-accent);
  color: var(--on-surface);
}

.cw-type-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
@media (min-width: 720px) {
  .cw-type-row { grid-template-columns: repeat(5, 1fr); }
}
.cw-type {
  display: grid;
  place-items: center;
  min-height: 88px;
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid var(--outline, var(--cw-line));
  background:
    linear-gradient(160deg, var(--surface, #fff), var(--surface-3, #eef3f7));
  color: var(--on-surface);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  box-shadow: var(--elev-card, var(--shadow));
}
.cw-type:hover {
  border-color: color-mix(in srgb, var(--brand-accent) 50%, var(--outline));
  transform: translateY(-2px);
  transition: transform .15s ease, border-color .15s ease;
}

/* Decision band */
.cw-decision {
  display: grid;
  gap: 1.5rem;
  padding: 1.75rem;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(600px 240px at 100% 0%, rgba(232, 93, 4, 0.18), transparent 60%),
    linear-gradient(135deg, #0b1f33 0%, #123a56 100%);
  color: #fff;
  box-shadow: var(--elev-3, var(--shadow-lg));
}
@media (min-width: 900px) {
  .cw-decision {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    padding: 2.25rem;
  }
}
.cw-eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}
.cw-decision-copy h2 {
  color: #fff;
  margin: 0 0 0.65rem;
  font-size: clamp(1.45rem, 2.8vw, 1.9rem);
}
.cw-decision-copy p {
  color: rgba(255, 255, 255, 0.86);
  max-width: 42ch;
}
.cw-decision .btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff !important;
}
.cw-decision .btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff !important;
}
.cw-decision-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.cw-tool {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.05rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  min-height: 88px;
}
.cw-tool:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.cw-tool strong {
  font-family: var(--font-display);
  font-size: 1.02rem;
  color: #fff;
}
.cw-tool span {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.75);
}

/* Brands */
.cw-brand-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}
@media (min-width: 640px) {
  .cw-brand-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 960px) {
  .cw-brand-grid { grid-template-columns: repeat(4, 1fr); }
}
.cw-brand {
  display: grid;
  place-items: center;
  min-height: 72px;
  padding: 0.85rem;
  border-radius: 14px;
  border: 1px solid var(--outline, var(--cw-line));
  background: var(--surface, #fff);
  color: var(--on-surface);
  font-weight: 800;
  font-family: var(--font-display);
  text-align: center;
  box-shadow: var(--elev-card, var(--shadow));
}
.cw-brand:hover {
  border-color: var(--brand-accent);
  color: var(--on-surface);
}

/* Compare tiles */
.cw-compare-grid {
  display: grid;
  gap: 0.85rem;
}
@media (min-width: 800px) {
  .cw-compare-grid { grid-template-columns: repeat(3, 1fr); }
}
.cw-compare {
  display: grid;
  gap: 0.55rem;
  padding: 1.2rem 1.15rem;
  border-radius: 16px;
  border: 1px solid var(--outline, var(--cw-line));
  background: var(--surface, #fff);
  color: var(--on-surface);
  box-shadow: var(--elev-card, var(--shadow));
}
.cw-compare:hover {
  border-color: color-mix(in srgb, var(--brand-accent) 45%, var(--outline));
  color: var(--on-surface);
}
.cw-compare-a,
.cw-compare-b {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.cw-compare-vs {
  display: inline-flex;
  width: fit-content;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--surface-3, #e8eef3);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--on-surface-muted, var(--brand-muted));
}
.cw-compare-go {
  margin-top: 0.35rem;
  font-weight: 700;
  color: var(--brand-accent);
  font-size: 0.9rem;
}

/* Lists */
.cw-split {
  display: grid;
  gap: 1.75rem;
}
@media (min-width: 960px) {
  .cw-split { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
}
.cw-list {
  display: grid;
  gap: 0.65rem;
}
.cw-list-item {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid var(--outline, var(--cw-line));
  background: var(--surface, #fff);
  color: var(--on-surface);
  box-shadow: var(--elev-card, var(--shadow));
}
.cw-list-item:hover { color: var(--on-surface); border-color: var(--brand-accent); }
.cw-list-item strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--on-surface);
}
.cw-list-item p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--on-surface-muted, var(--brand-muted));
}
.cw-list-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  flex-shrink: 0;
}

/* Car cards — more premium */
.car-card {
  border-radius: 18px !important;
  overflow: hidden;
  border: 1px solid var(--outline, var(--cw-line));
  background: var(--surface, #fff);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.car-card .card-media {
  aspect-ratio: 16 / 10;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #123a56, #1e5a7a);
}
.car-card .card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.car-card:hover .card-media img {
  transform: scale(1.04);
}
.car-card .card-body {
  padding: 1rem 1.05rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}
.car-card-title {
  font-size: 1.05rem !important;
  margin: 0 !important;
  letter-spacing: -0.02em;
}
.car-card .price {
  font-size: 1.2rem;
  margin-top: 0.15rem;
}
.car-card-cta {
  margin-top: auto;
  padding-top: 0.55rem;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--brand-accent);
}
.card-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2;
  background: rgba(7, 20, 34, 0.88);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
}

.cw-seo {
  padding: 0.25rem 0;
}
.cw-seo h2 { margin-top: 0; }

/* Inner page heroes — tighter, more editorial */
.hero:not(.hero-split) {
  padding: 2.1rem 0 1.85rem;
  background:
    linear-gradient(115deg, #071422 0%, #123a56 58%, #1e5a7a 100%);
}
.hero .breadcrumb,
.hero .breadcrumb a {
  color: rgba(255, 255, 255, 0.78);
}
.hero h1 {
  max-width: 18ch;
}

/* Motion */
@media (prefers-reduced-motion: reduce) {
  .car-card:hover .card-media img,
  .cw-type:hover {
    transform: none;
  }
}
