/* Nova Auto Dealer - frontend styles */
.nad-inventory,
.nad-archive,
.nad-single,
.nad-comparison { margin: 0 0 2rem; }

/* ---------- Homepage funnel ---------- */
.nad-homepage-template { overflow-x: hidden; }
.nad-home-main { display: block; width: 100%; }
.nad-home {
	--nad-accent: #0d9488;
	--nad-accent-d: #0f766e;
	--nad-accent-soft: #e6f5f3;
	--nad-warm: #f59e0b;
	--nad-warm-d: #d97706;
	--nad-ink: #0e1b2c;
	--nad-muted: #5b6576;
	--nad-border: #e7e4dd;
	--nad-surface: #ffffff;
	--nad-alt: #eef7f5;
	--nad-mazda: #a30046;
	--nad-hyundai: #04285c;
	--nad-radius: 0px;
	color: var(--nad-ink);
	font-feature-settings: "ss01";
	line-height: 1.55;
}
.nad-home * { box-sizing: border-box; }
.nad-section { max-width: 1180px; margin: 0 auto; padding: clamp(1.75rem, 4vw, 3rem) 1.25rem; }
.nad-section-alt { background: var(--nad-alt); max-width: none; width: 100vw; margin-left: calc(50% - 50vw); padding-left: 1.25rem; padding-right: 1.25rem; }
.nad-section-alt > * { max-width: 1180px; margin-left: auto; margin-right: auto; }
.nad-section-title { font-size: clamp(1.5rem, 3.5vw, 2.25rem); line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 .4rem; color: var(--nad-ink); font-weight: 800; }
.nad-section-sub { color: var(--nad-muted); margin: 0 0 1.5rem; font-size: clamp(1rem, 2vw, 1.1rem); max-width: 60ch; }

/* Hero */
.nad-hero {
	position: relative; overflow: hidden;
	background:
		radial-gradient(1100px 480px at 82% -10%, rgba(13,148,136,.48), transparent 60%),
		radial-gradient(820px 460px at 6% 0%, rgba(245,158,11,.16), transparent 55%),
		linear-gradient(180deg, #0c1b30 0%, #0e2138 100%);
	color: #fff; padding: clamp(1.5rem, 3.5vw, 2.75rem) 1.25rem;
	text-align: center;
	width: 100vw; margin-left: calc(50% - 50vw);
}
.nad-hero-inner { max-width: 880px; margin: 0 auto; position: relative; z-index: 1; }
.nad-hero-eyebrow {
	display: inline-block; text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 700;
	color: #8fe3da; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
	padding: .35rem .8rem; border-radius: 999px; margin: 0 0 1.1rem;
}
.nad-hero-title { font-size: clamp(2.2rem, 6.5vw, 3.75rem); line-height: 1.04; letter-spacing: -0.02em; margin: 0 0 .9rem; font-weight: 850; }
.nad-hero-sub { color: #cfd8e6; font-size: clamp(1.05rem, 2.5vw, 1.3rem); margin: 0 auto 2rem; max-width: 46ch; }
.nad-hero-search {
	display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center;
	background: #fff; padding: .5rem; border-radius: 999px; max-width: 720px; margin: 0 auto;
	box-shadow: 0 20px 45px -20px rgba(2,12,32,.7);
}
.nad-hero-search input[type=text], .nad-hero-search select {
	flex: 1 1 200px; min-width: 0; padding: .85rem 1.1rem; border: 0; border-radius: 999px; font-size: 1rem; color: var(--nad-ink); background: transparent;
}
.nad-hero-search input[type=text]:focus, .nad-hero-search select:focus { outline: 2px solid var(--nad-accent); outline-offset: 1px; }
.nad-hero-search select { border-left: 1px solid var(--nad-border); border-radius: 0; max-width: 180px; }
.nad-button-lg { padding: .9rem 1.7rem; font-size: 1.05rem; border-radius: 999px; font-weight: 700; }
.nad-hero-search .nad-button-lg { flex: 0 0 auto; }
.nad-hero-trust { list-style: none; display: flex; flex-wrap: wrap; gap: .85rem 1.75rem; justify-content: center; padding: 0; margin: 1.75rem 0 0; color: #dbe4f1; font-size: .92rem; }
.nad-hero-trust li { display: inline-flex; align-items: center; }
.nad-hero-trust li::before { content: "✓"; color: #34d399; font-weight: 800; margin-right: .45rem; }

/* Two-column hero with featured deal */
.nad-hero-grid {
	position: relative; z-index: 1;
	max-width: 1180px; margin: 0 auto;
	display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center;
	text-align: left;
}
.nad-hero-copy { min-width: 0; }
.nad-hero-logo { display: block; height: auto; width: clamp(220px, 26vw, 300px); margin: 0 0 1.25rem; }
.nad-hero-copy .nad-hero-eyebrow { margin-bottom: 1rem; }
.nad-hero-copy .nad-hero-sub { margin-left: 0; margin-right: 0; }
.nad-hero-copy .nad-hero-search { margin: 0; max-width: 560px; }
.nad-hero-copy .nad-hero-trust { justify-content: flex-start; }

.nad-hero-feature {
	position: relative; display: block; background: #fff; border-radius: 18px; overflow: hidden;
	text-decoration: none; color: var(--nad-ink);
	box-shadow: 0 30px 60px -28px rgba(0,0,0,.65);
	transition: transform .18s ease;
}
.nad-hero-feature:hover { transform: translateY(-4px); }
.nad-hero-feature-badge {
	position: absolute; top: 1rem; left: 1rem; z-index: 2;
	background: #16a34a; color: #fff; font-weight: 800; font-size: .85rem;
	padding: .4rem .8rem; border-radius: 999px; letter-spacing: .01em;
}
.nad-hero-feature-img { width: 100%; height: clamp(220px, 30vw, 340px); object-fit: cover; display: block; }
.nad-hero-feature-body { display: block; padding: 1rem 1.25rem 1.25rem; }
.nad-hero-feature-title { display: block; font-size: 1.2rem; font-weight: 800; letter-spacing: -0.01em; margin-bottom: .35rem; }
.nad-hero-feature-meta { display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap; }
.nad-hero-feature-price { font-size: 1.4rem; font-weight: 850; color: var(--nad-ink); }
.nad-hero-feature-msrp { text-decoration: line-through; color: #9aa1ad; font-size: 1rem; }
.nad-hero-feature-miles { color: var(--nad-muted); font-size: .95rem; margin-left: auto; }

@media (max-width: 860px) {
	.nad-hero-grid { grid-template-columns: 1fr; }
	.nad-hero-feature { order: -1; max-width: 560px; margin: 0 auto; width: 100%; }
}

/* Head-to-Head hero */
.nad-hero-vs { text-align: center; }
.nad-hero-vs-inner { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; }
.nad-hero-vs-head { display: flex; flex-direction: column-reverse; align-items: center; gap: .35rem; }
.nad-hero-vs .nad-hero-title { font-size: clamp(1.5rem, 3.4vw, 2.25rem); margin: 0; line-height: 1.1; }
.nad-hero-vs .nad-hero-eyebrow { margin: 0; }
.nad-vs-tabs { margin-top: 1.1rem; }
.nad-vs-tablist { display: inline-flex; flex-wrap: wrap; gap: .3rem; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); padding: .3rem; border-radius: 999px; margin-bottom: 1.1rem; }
.nad-vs-tab { background: transparent; border: 0; color: #cfd8e6; font: inherit; font-weight: 700; padding: .55rem 1.15rem; border-radius: 999px; cursor: pointer; }
.nad-vs-tab.is-active { background: #fff; color: #0b1f3a; }
.nad-vs-panel { display: none; }
.nad-vs-panel.is-active { display: block; }
.nad-vs-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: stretch; }
.nad-vs-card { position: relative; display: flex; flex-direction: column; background: #fff; color: #0b1f3a; border-radius: 16px; overflow: hidden; text-decoration: none; text-align: left; box-shadow: 0 26px 54px -30px rgba(0,0,0,.65); transition: transform .15s ease; }
.nad-vs-card:hover { transform: translateY(-4px); }
.nad-vs-brand { position: absolute; top: .6rem; left: .6rem; background: rgba(11,31,58,.88); color: #fff; font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: .25rem .6rem; border-radius: 999px; }
.nad-vs-img { width: 100%; height: 200px; object-fit: cover; display: block; }
.nad-vs-title { padding: .85rem 1rem 0; font-weight: 800; font-size: 1.02rem; line-height: 1.25; }
.nad-vs-meta { padding: .35rem 1rem 0; display: flex; gap: .6rem; align-items: baseline; }
.nad-vs-price { font-weight: 850; font-size: 1.15rem; }
.nad-vs-miles { color: #5b6472; font-size: .88rem; }
.nad-vs-cta { margin: .85rem 1rem 1rem; background: var(--nad-accent-soft); color: var(--nad-accent-d); font-weight: 700; text-align: center; padding: .55rem; border-radius: 9px; font-size: .9rem; }
.nad-vs-divider { display: flex; align-items: center; justify-content: center; }
.nad-vs-divider span { display: flex; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 50%; background: #f59e0b; color: #0b1f3a; font-weight: 900; font-size: 1rem; box-shadow: 0 0 0 6px rgba(245,158,11,.18); }
.nad-hero-search-vs { margin: 1.1rem auto 0; max-width: 560px; }
@media (max-width: 720px) {
	.nad-vs-grid { grid-template-columns: 1fr; }
	.nad-vs-divider span { margin: .25rem auto; }
}

/* Segment shelves (horizontal scroll) */
.nad-shelf-track { display: flex; gap: 1.1rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: .25rem .25rem 1rem; margin: 0 -.25rem; -webkit-overflow-scrolling: touch; }
.nad-shelf-item { flex: 0 0 clamp(240px, 27vw, 290px); scroll-snap-align: start; display: flex; }
.nad-shelf-item .nad-card { width: 100%; }
.nad-shelf-track::-webkit-scrollbar { height: 8px; }
.nad-shelf-track::-webkit-scrollbar-thumb { background: #d4dae2; border-radius: 999px; }

/* Buttons (homepage scope refinements) */
.nad-home .nad-button { box-shadow: 0 8px 20px -12px rgba(37,99,235,.8); transition: transform .12s ease, background .15s ease, box-shadow .15s ease; }
.nad-home .nad-button:hover { transform: translateY(-1px); }
.nad-home .nad-button-secondary { box-shadow: none; }

/* Choice tiles */
.nad-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; }
.nad-tile {
	position: relative; display: flex; flex-direction: column; gap: .25rem; padding: 1.35rem 1.35rem 1.5rem;
	border: 1px solid var(--nad-border); border-radius: var(--nad-radius); text-decoration: none; background: var(--nad-surface);
	transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.nad-tile::after { content: "→"; position: absolute; right: 1.1rem; bottom: 1rem; color: var(--nad-accent); opacity: 0; transform: translateX(-4px); transition: .14s ease; }
.nad-tile:hover { transform: translateY(-3px); border-color: transparent; box-shadow: 0 18px 40px -24px rgba(11,18,32,.5); }
.nad-tile:hover::after { opacity: 1; transform: translateX(0); }
.nad-tile-label { font-weight: 750; color: var(--nad-ink); font-size: 1.1rem; }
.nad-tile-count { color: var(--nad-muted); font-size: .9rem; }

/* Brand spotlights */
.nad-brand-head { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; justify-content: space-between; margin-bottom: 1.5rem; }
.nad-brand-head .nad-section-title { margin-bottom: .35rem; position: relative; padding-bottom: .5rem; }
.nad-brand-head .nad-section-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 4px; border-radius: 2px; background: var(--nad-accent); }
.nad-brand-mazda .nad-section-title::after { background: var(--nad-mazda); }
.nad-brand-hyundai .nad-section-title::after { background: var(--nad-hyundai); }
.nad-brand-mazda .nad-button-secondary { background: var(--nad-mazda); }
.nad-brand-hyundai .nad-button-secondary { background: var(--nad-hyundai); }

/* Trust */
.nad-trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.25rem; }
.nad-trust-item { padding: 1.5rem; border-radius: var(--nad-radius); background: var(--nad-surface); border: 1px solid var(--nad-border); }
.nad-trust-item h3 { margin: 0 0 .45rem; font-size: 1.15rem; color: var(--nad-ink); font-weight: 750; }
.nad-trust-item p { margin: 0; color: var(--nad-muted); font-size: .96rem; }

/* Finance band */
.nad-finance {
	background: radial-gradient(900px 400px at 80% 0%, rgba(255,255,255,.14), transparent 60%), linear-gradient(135deg, var(--nad-accent) 0%, var(--nad-accent-d) 100%);
	color: #fff; text-align: center; padding: clamp(3rem, 7vw, 5rem) 1.25rem; width: 100vw; margin-left: calc(50% - 50vw);
}
.nad-finance-inner { max-width: 700px; margin: 0 auto; }
.nad-finance h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); margin: 0 0 .6rem; font-weight: 800; letter-spacing: -0.01em; }
.nad-finance p { margin: 0 0 1.75rem; color: #e4ecfb; font-size: 1.05rem; }
.nad-finance .nad-button { background: #fff; color: var(--nad-accent-d) !important; box-shadow: 0 16px 30px -16px rgba(0,0,0,.5); }
.nad-finance .nad-button:hover { background: #eef2ff; }

.nad-final { text-align: center; }
.nad-final .nad-section-title { margin-bottom: 1.1rem; }

/* Card polish on the homepage */
.nad-home .nad-card { border-radius: var(--nad-radius); border-color: var(--nad-border); overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; }
.nad-home .nad-card:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -28px rgba(11,18,32,.55); }
.nad-home .nad-card-thumb { overflow: hidden; }
.nad-home .nad-card-thumb img { transition: transform .35s ease; }
.nad-home .nad-card:hover .nad-card-thumb img { transform: scale(1.05); }
.nad-home .nad-card-price { color: var(--nad-ink); font-size: 1.15rem; }
/* Quieter card CTA so 28 photos lead, not 28 blue buttons. */
.nad-home .nad-card-cta { background: transparent; color: var(--nad-accent) !important; border: 1px solid var(--nad-border); box-shadow: none; font-weight: 650; }
.nad-home .nad-card-cta:hover { background: var(--nad-accent); color: #fff !important; border-color: var(--nad-accent); }
.nad-home .nad-card-title { font-size: 1.02rem; font-weight: 750; letter-spacing: -0.01em; }
.nad-home .nad-card-title a { color: var(--nad-ink); }

@media (max-width: 600px) {
	.nad-hero-search { flex-direction: column; border-radius: var(--nad-radius); }
	.nad-hero-search input[type=text], .nad-hero-search select { border: 1px solid var(--nad-border); border-radius: 10px; max-width: none; }
	.nad-hero-search .nad-button-lg { width: 100%; }
	.nad-brand-head { flex-direction: column; align-items: flex-start; }
}

.nad-search-form {
	display: flex;
	flex-wrap: wrap;
	gap: .75rem;
	align-items: flex-end;
	padding: 1rem;
	background: #f6f7f9;
	border: 1px solid #e2e5ea;
	border-radius: 8px;
	margin-bottom: 1.5rem;
}
.nad-field { display: flex; flex-direction: column; font-size: .85rem; }
.nad-field label { font-weight: 600; margin-bottom: .25rem; }
.nad-field input, .nad-field select {
	padding: .45rem .6rem;
	border: 1px solid #c9ced6;
	border-radius: 6px;
	min-width: 140px;
}
.nad-range input { min-width: 80px; width: 90px; display: inline-block; margin-right: .25rem; }
.nad-actions { align-self: flex-end; }

.nad-button {
	display: inline-block;
	background: var(--nad-accent, #0d9488);
	color: #fff !important;
	padding: .6rem 1.15rem;
	border: none;
	border-radius: 0;
	cursor: pointer;
	text-decoration: none;
	font-weight: 700;
	text-align: center;
}
.nad-button:hover { background: var(--nad-accent-d, #0f766e); }
.nad-button-secondary { background: var(--nad-ink, #0e1b2c); }
.nad-button-secondary:hover { background: #1b2c44; }
.nad-button-link { background: transparent; color: var(--nad-accent, #0d9488) !important; padding-left: 0; padding-right: 0; }

.nad-inventory-meta { margin: .5rem 0 1rem; font-weight: 600; }

.nad-grid { display: grid; gap: 1.25rem; }
.nad-cols-1 { grid-template-columns: 1fr; }
.nad-cols-2 { grid-template-columns: repeat(2, 1fr); }
.nad-cols-3 { grid-template-columns: repeat(3, 1fr); }
.nad-cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .nad-cols-3, .nad-cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .nad-grid { grid-template-columns: 1fr; } }

.nad-card {
	border: 1px solid #e2e5ea;
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
	display: flex;
	flex-direction: column;
}
.nad-card-thumb { position: relative; display: block; aspect-ratio: 4 / 3; background: #eef0f3; }
.nad-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nad-card-noimage { position: absolute; inset: 0; display: flex; flex-direction: column; gap: .35rem; align-items: center; justify-content: center; color: #aab2c0; background: repeating-linear-gradient(45deg, #f1f3f6, #f1f3f6 12px, #eceff3 12px, #eceff3 24px); font-size: .8rem; }
.nad-card-body { padding: .85rem 1rem 1rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.nad-card-title { font-size: 1rem; margin: 0; line-height: 1.3; }
.nad-card-meta { display: flex; justify-content: space-between; font-size: .95rem; }
.nad-card-price { font-weight: 700; color: #111827; }
.nad-card-mileage { color: #6b7280; }
.nad-card-cta { margin-top: auto; }
.nad-card-actions { margin-top: auto; display: flex; align-items: center; gap: .5rem; }
.nad-card-actions .nad-card-cta { flex: 1; }

/* Thumbs up / down */
.nad-thumbs { display: inline-flex; gap: .35rem; }
.nad-thumb {
	display: inline-flex; align-items: center; gap: .3rem; cursor: pointer;
	background: #f4f6f9; border: 1px solid #e6e8ec; color: #5b6472;
	border-radius: 999px; padding: .4rem .6rem; font: inherit; font-size: .82rem; line-height: 1;
	transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.nad-thumb:hover { background: var(--nad-accent-soft, #e6f5f3); color: var(--nad-accent-d, #0f766e); border-color: #bfe3de; }
.nad-thumb svg { display: block; }
.nad-thumb-up.is-active { background: #e7f6ec; border-color: #b7e3c4; color: #15803d; }
.nad-thumb-down.is-active { background: #fde8e8; border-color: #f5b5b5; color: #b42318; }
.nad-thumb[disabled] { opacity: .6; cursor: default; }
.nad-single-thumbs { display: flex; align-items: center; gap: .75rem; margin: 0 0 1rem; }
.nad-thumbs-label { font-weight: 600; color: #5b6472; font-size: .95rem; }

.nad-badge {
	position: absolute;
	top: .6rem;
	left: .6rem;
	background: #dc2626;
	color: #fff;
	font-weight: 700;
	font-size: .75rem;
	letter-spacing: .05em;
	padding: .25rem .6rem;
	border-radius: 4px;
}
.nad-badge-pending { background: #d97706; }
.nad-badge-large { font-size: 1.1rem; padding: .5rem 1rem; }

.nad-status-sold .nad-card-thumb img { filter: grayscale(60%); opacity: .85; }

.nad-pagination { margin: 1.5rem 0; display: flex; gap: .35rem; flex-wrap: wrap; }
.nad-pagination .page-numbers {
	padding: .4rem .7rem; border: 1px solid #d1d5db; border-radius: 6px; text-decoration: none;
}
.nad-pagination .current { background: #1a56db; color: #fff; border-color: #1a56db; }

/* Single vehicle */
.nad-single-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; }
@media (max-width: 800px) { .nad-single-layout { grid-template-columns: 1fr; } }
.nad-sold-banner { background: #dc2626; color: #fff; padding: .6rem 1rem; border-radius: 6px; font-weight: 700; display: inline-block; margin-top: .5rem; }
.nad-gallery-featured { position: relative; }
.nad-gallery-featured img { width: 100%; border-radius: 10px; }
.nad-gallery-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; margin-top: .5rem; }
.nad-gallery-thumbs img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 6px; }
.nad-price-box { border: 1px solid #e2e5ea; border-radius: 10px; padding: 1rem; margin-bottom: 1rem; }
.nad-price { font-size: 1.8rem; font-weight: 800; color: #111827; }
.nad-msrp { text-decoration: line-through; color: #9aa1ad; }
.nad-cta-box { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1.25rem; }
.nad-specs { width: 100%; border-collapse: collapse; }
.nad-specs th, .nad-specs td { text-align: left; padding: .45rem .5rem; border-bottom: 1px solid #eef0f3; font-size: .92rem; }
.nad-specs th { color: #6b7280; font-weight: 600; width: 45%; }

.nad-similar-title, .nad-comparison-label { margin-top: 2rem; }
.nad-comparison-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: start; }
.nad-comparison-vs { align-self: center; font-weight: 800; font-size: 1.5rem; color: #6b7280; }
@media (max-width: 700px) { .nad-comparison-grid { grid-template-columns: 1fr; } .nad-comparison-vs { text-align: center; } }
.nad-no-results { padding: 1.5rem; background: #f6f7f9; border-radius: 8px; text-align: center; color: #6b7280; }
