/* ============================================================
   CarObtain theme — colors sampled from the brand logo
   charcoal: #262C35 / #333A45   orange: #F58220 → #FBA919
   ============================================================ */
:root {
    --dark: #262c35;
    --dark-2: #333a45;
    --orange: #f58220;
    --orange-light: #fba919;
    --orange-dark: #e06b12;
    --text: #262c35;
    --muted: #64707f;
    --bg: #ffffff;
    --bg-soft: #f6f7f9;
    --border: #e6e9ee;
    --radius: 14px;
    --shadow: 0 8px 24px rgba(38, 44, 53, 0.08);
    --grad-orange: linear-gradient(135deg, #f58220 0%, #fba919 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

img { max-width: 100%; display: block; }

.container {
    max-width: 1150px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    border-radius: 999px;
    padding: 0.65rem 1.5rem;
    font-size: 0.92rem;
    font-family: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
    background: var(--grad-orange);
    color: #fff;
    box-shadow: 0 6px 18px rgba(245, 130, 32, 0.35);
}

.btn-primary:hover { box-shadow: 0 10px 24px rgba(245, 130, 32, 0.45); }

.btn-outline {
    border-color: var(--border);
    color: var(--dark);
    background: #fff;
}

.btn-outline:hover { border-color: var(--dark); }

.btn-ghost {
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff;
    background: transparent;
}

.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }

.btn-sm { padding: 0.45rem 1.1rem; font-size: 0.85rem; }

.accent { color: var(--orange); }

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    height: 72px;
}

.brand-logo { height: 68px; width: auto; }

.site-nav {
    display: flex;
    gap: 1.4rem;
    margin-left: auto;
}

.site-nav a {
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.92rem;
    position: relative;
}

.site-nav a::after {
    content: "";
    position: absolute;
    left: 0; bottom: -6px;
    width: 0; height: 3px;
    border-radius: 2px;
    background: var(--grad-orange);
    transition: width 0.2s ease;
}

.site-nav a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 0.6rem; }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 0;
    padding: 6px;
    cursor: pointer;
}

.nav-toggle span {
    width: 24px; height: 3px;
    border-radius: 2px;
    background: var(--dark);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero (compact) ---------- */
.hero {
    background:
        radial-gradient(700px 300px at 85% -20%, rgba(245, 130, 32, 0.22), transparent 60%),
        linear-gradient(160deg, var(--dark) 0%, var(--dark-2) 100%);
    color: #fff;
}

.hero-inner {
    padding-top: 3.2rem;
    padding-bottom: 3.2rem;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 0.6rem;
}

.hero-sub {
    color: #c3cad4;
    font-size: 1.02rem;
    margin-bottom: 1.4rem;
}

.hero-cta {
    display: flex;
    gap: 0.9rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.4rem;
}

.hero-trust {
    display: flex;
    gap: 0.6rem 1.6rem;
    justify-content: center;
    flex-wrap: wrap;
    list-style: none;
}

.hero-trust li {
    color: #dfe4ea;
    font-size: 0.88rem;
    font-weight: 500;
    position: relative;
    padding-left: 1.2rem;
}

.hero-trust li::before {
    content: "";
    position: absolute;
    left: 0; top: 0.42rem;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--grad-orange);
}

/* ---------- Cars section ---------- */
.cars { padding: 1.25rem 0 3.5rem; background: var(--bg-soft); }

.cars-head {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.2rem;
}

.cars-head h2 { font-size: 1.7rem; font-weight: 700; }

.cars-count { color: var(--muted); font-size: 0.92rem; }

/* ---------- Filter bar (horizontal, shopping-site style) ---------- */
.filter-bar {
    position: sticky;
    top: 78px;              /* stays visible under the sticky header */
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.4rem 0.6rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.6rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar { display: none; }

.filter-bar select {
    flex: 0 0 auto;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.4rem 0.65rem;
    outline: none;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.filter-bar select:hover { border-color: var(--dark); }

.filter-bar select:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(245, 130, 32, 0.15);
}

/* an applied filter lights up */
.filter-bar select.on {
    border-color: var(--orange);
    background: rgba(245, 130, 32, 0.08);
    color: var(--orange-dark);
    font-weight: 600;
}

.filter-bar .btn { flex: 0 0 auto; }

/* pill wrapper: hosts the per-filter clear (×) button */
.fpill {
    position: relative;
    flex: 0 0 auto;
    display: inline-flex;
}

.fpill.has-value select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 1.8rem;   /* room for the × where the arrow was */
}

.fclear {
    display: none;
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--orange-dark);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1;
    padding: 0 0.1rem;
    cursor: pointer;
}

.fpill.has-value .fclear { display: block; }

.filter-sort { margin-left: auto; }

/* ---------- Car grid ---------- */
.car-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.4rem;
}

.car-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.car-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(38, 44, 53, 0.14);
}

.car-photo {
    position: relative;
    aspect-ratio: 16 / 10;
    background: linear-gradient(160deg, var(--dark) 0%, var(--dark-2) 100%);
}

.car-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.car-photo-placeholder {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    color: #6b7686;
}

.car-photo-placeholder span { font-size: 0.75rem; }

.badge-verified {
    position: absolute;
    top: 0.7rem; left: 0.7rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--grad-orange);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
    box-shadow: 0 4px 12px rgba(245, 130, 32, 0.45);
}

.car-body { padding: 1rem 1.1rem 1.15rem; }

.car-title { font-size: 1.02rem; font-weight: 600; line-height: 1.35; }

.car-subtitle {
    color: var(--muted);
    font-size: 0.85rem;
    margin: 0.1rem 0 0.7rem;
    min-height: 1.2em;
}

.car-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.8rem;
}

.chip {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 999px;
    padding: 0.15rem 0.6rem;
}

.car-price-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
}

.car-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--dark);
}

.negotiable {
    color: var(--orange-dark);
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(245, 130, 32, 0.1);
    border-radius: 999px;
    padding: 0.15rem 0.6rem;
}

.cars-results { transition: opacity 0.15s ease; }

.cars-results.is-loading {
    opacity: 0.45;
    pointer-events: none;
}

/* ---------- Empty states ---------- */
.empty-state {
    background: #fff;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--muted);
}

.empty-state h3 { color: var(--dark); font-size: 1.15rem; margin-bottom: 0.4rem; }
.empty-state p { margin-bottom: 1rem; }
.empty-state a { color: var(--orange-dark); }

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    gap: 0.4rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.page-link {
    min-width: 38px;
    padding: 0.4rem 0.6rem;
    text-align: center;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.page-link:hover { border-color: var(--orange); color: var(--orange-dark); }

.page-link.current {
    background: var(--grad-orange);
    border-color: transparent;
    color: #fff;
}

/* ============================================================
   Car detail page
   ============================================================ */
.detail { background: var(--bg-soft); padding: 1.5rem 0 3.5rem; }

.back-link {
    display: inline-block;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.back-link:hover { color: var(--orange-dark); }

.owner-banner {
    background: rgba(245, 130, 32, 0.1);
    border: 1px solid rgba(245, 130, 32, 0.4);
    color: var(--orange-dark);
    border-radius: 12px;
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
    margin-bottom: 1.2rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 1.5rem;
    align-items: start;
}

.detail-main { display: flex; flex-direction: column; gap: 1.2rem; min-width: 0; }

/* ---------- Gallery ---------- */
.gallery {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.gallery-main {
    position: relative;
    aspect-ratio: 16 / 10;
    background: linear-gradient(160deg, var(--dark) 0%, var(--dark-2) 100%);
}

.gallery-main img { width: 100%; height: 100%; object-fit: cover; }

.badge-lg { font-size: 0.82rem; padding: 0.35rem 0.8rem; top: 1rem; left: 1rem; }

.gallery-thumbs {
    display: flex;
    gap: 0.5rem;
    padding: 0.7rem;
    overflow-x: auto;
    scrollbar-width: thin;
}

.thumb {
    flex: 0 0 auto;
    width: 84px;
    height: 60px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 9px;
    overflow: hidden;
    cursor: pointer;
    background: var(--bg-soft);
}

.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.active { border-color: var(--orange); }

.gallery-empty {
    aspect-ratio: 16 / 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #6b7686;
    background: linear-gradient(160deg, var(--dark) 0%, var(--dark-2) 100%);
}

/* ---------- Panels ---------- */
.panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.4rem 1.5rem;
}

.panel h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.panel h2 .count {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.05rem 0.55rem;
}

.spec-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem 1rem;
}

.spec-grid dt {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.spec-grid dd { font-size: 0.95rem; font-weight: 500; }

.owner-only {
    margin-top: 1.3rem;
    padding-top: 1.1rem;
    border-top: 1px dashed var(--border);
}

.owner-only h3 { font-size: 0.95rem; margin-bottom: 0.8rem; }
.owner-only h3 span { color: var(--muted); font-weight: 500; font-size: 0.82rem; }

.description { color: var(--muted); font-size: 0.95rem; line-height: 1.7; }

/* ---------- Service history timeline ---------- */
.timeline { list-style: none; }

.timeline li {
    position: relative;
    padding-left: 1.4rem;
    padding-bottom: 1.1rem;
    border-left: 2px solid var(--border);
}

.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }

.timeline li::before {
    content: "";
    position: absolute;
    left: -7px; top: 0.35rem;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--grad-orange);
}

.timeline-head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.timeline-date { font-weight: 600; font-size: 0.92rem; }
.timeline-center { color: var(--muted); font-size: 0.88rem; margin-top: 0.15rem; }
.timeline-desc { font-size: 0.9rem; margin-top: 0.3rem; }
.timeline-meta { display: flex; gap: 1rem; flex-wrap: wrap; color: var(--muted); font-size: 0.82rem; margin-top: 0.35rem; }

.chip-verified {
    background: rgba(245, 130, 32, 0.12);
    border-color: rgba(245, 130, 32, 0.4);
    color: var(--orange-dark);
    font-weight: 600;
}

/* ---------- Inspection report ---------- */
.report-head {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.score-ring {
    width: 86px; height: 86px;
    border-radius: 50%;
    background: var(--grad-orange);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(245, 130, 32, 0.35);
}

.score-value { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.score-max { font-size: 0.72rem; opacity: 0.9; }

.report-meta { display: flex; flex-direction: column; gap: 0.25rem; }

.report-result { font-weight: 700; font-size: 1rem; }
.report-verified { color: #1e7e34; }
.report-failed { color: #c0392b; }
.report-date { color: var(--muted); font-size: 0.85rem; }

.report-section { margin-top: 1.1rem; }
.report-section h3 { font-size: 0.95rem; margin-bottom: 0.5rem; color: var(--dark); }

.check-rows { list-style: none; }

.check-rows li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--bg-soft);
    font-size: 0.9rem;
}

.check-name { flex: 1; min-width: 140px; }
.check-remark { color: var(--muted); font-size: 0.84rem; width: 100%; }

.rating {
    font-size: 0.76rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 0.12rem 0.6rem;
}

.rating-good { background: #e4f4e9; color: #1e7e34; }
.rating-average { background: #fdf3e2; color: #b26a00; }
.rating-poor { background: #fdeaea; color: #c0392b; }
.rating-not_working { background: #fdeaea; color: #c0392b; }
.rating-not_applicable { background: var(--bg-soft); color: var(--muted); }

.issue-photos { display: flex; gap: 0.4rem; width: 100%; margin-top: 0.3rem; }
.issue-photos img { width: 72px; height: 54px; object-fit: cover; border-radius: 8px; }

/* ---------- Sidebar ---------- */
.detail-side { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 1rem; }

.price-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.4rem 1.4rem 1.5rem;
    box-shadow: var(--shadow);
}

.detail-title { font-size: 1.3rem; font-weight: 700; line-height: 1.3; }
.detail-sub { color: var(--muted); font-size: 0.9rem; margin-top: 0.15rem; }

.detail-price {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--dark);
    margin: 0.8rem 0 0.2rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.quick-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.9rem 0 1.1rem; }

.seller-box { border-top: 1px solid var(--border); padding-top: 1rem; }
.seller-name { font-size: 0.92rem; margin-bottom: 0.3rem; }
.no-brokerage { color: var(--muted); font-size: 0.83rem; margin-bottom: 0.9rem; }

.seller-phone {
    margin-top: 0.7rem;
    text-align: center;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--orange-dark);
    background: rgba(245, 130, 32, 0.1);
    border-radius: 12px;
    padding: 0.6rem;
}

.sold-note {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    color: var(--muted);
    font-size: 0.9rem;
    text-align: center;
}

.verify-card-side {
    background: linear-gradient(160deg, var(--dark) 0%, var(--dark-2) 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: 1.1rem 1.2rem;
}

.verify-card-side strong { color: var(--orange-light); display: block; margin-bottom: 0.3rem; }
.verify-card-side p { font-size: 0.86rem; color: #c3cad4; }
.verify-card-side.muted { background: #fff; border: 1px dashed var(--border); }
.verify-card-side.muted strong { color: var(--dark); }
.verify-card-side.muted p { color: var(--muted); }

/* ---------- Services ---------- */
.services { padding: 3.5rem 0; }

.section-head { text-align: center; margin-bottom: 2rem; }

.section-head h2 { font-size: 1.7rem; font-weight: 700; }

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.4rem;
}

/* while only the verification card is live (loan & insurance commented out) */
.services-grid.single-card {
    grid-template-columns: minmax(0, 560px);
    justify-content: center;
}

.service-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.7rem 1.5rem;
    box-shadow: var(--shadow);
}

.service-icon {
    width: 52px; height: 52px;
    border-radius: 13px;
    background: var(--grad-orange);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.service-card h3 { font-size: 1.08rem; margin-bottom: 0.4rem; }
.service-card p { color: var(--muted); font-size: 0.92rem; }

/* ---------- Footer ---------- */
.site-footer { background: #1d222a; color: #aeb6c0; }

.footer-grid {
    display: grid;
    /* 3 columns while the Services column (loan & insurance) is commented out;
       restore to: 1.4fr 1fr 1fr 1fr when it returns */
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 2rem;
    padding: 3rem 1.25rem 2rem;
}

.footer-logo {
    height: 96px;
    width: auto;
    background: #fff;
    border-radius: 12px;
    padding: 6px;
    margin-bottom: 1rem;
}

.footer-brand p { font-size: 0.9rem; }

.footer-col h4 {
    color: #fff;
    font-size: 0.95rem;
    margin-bottom: 0.9rem;
}

.footer-col a {
    display: block;
    color: #aeb6c0;
    text-decoration: none;
    font-size: 0.88rem;
    margin-bottom: 0.55rem;
}

.footer-col a:hover { color: var(--orange-light); }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.1rem 0;
    font-size: 0.85rem;
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer-slogan { color: var(--orange-light); font-weight: 600; }

/* ---------- Login modal ---------- */
.modal-overlay[hidden] { display: none; }

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(29, 34, 42, 0.65);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.18s ease;
}

.modal {
    position: relative;
    background: #fff;
    border-radius: 18px;
    width: 100%;
    max-width: 400px;
    padding: 2rem 1.8rem 1.6rem;
    text-align: center;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
    animation: slideUp 0.22s ease;
    max-height: 92vh;
    overflow-y: auto;
}

@keyframes fadeIn { from { opacity: 0; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } }

.modal-close {
    position: absolute;
    top: 0.8rem;
    right: 0.9rem;
    border: 0;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
    padding: 0.2rem 0.4rem;
}

.modal-close:hover { color: var(--dark); }

.modal-logo { height: 72px; width: auto; margin: 0 auto 0.6rem; }

.modal h2 { font-size: 1.35rem; font-weight: 700; }

.modal-sub { color: var(--muted); font-size: 0.9rem; margin: 0.2rem 0 1.4rem; }

.modal form { text-align: left; }

.field { display: block; margin-bottom: 1rem; }

.field > span {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 0.35rem;
}

.field input:not([type="checkbox"]) {
    width: 100%;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.65rem 0.85rem;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(245, 130, 32, 0.15);
}

.pw-wrap { position: relative; display: block; }

.pw-wrap input { padding-right: 2.6rem; }

.pw-toggle {
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    padding: 0.2rem;
    display: flex;
}

.pw-toggle:hover, .pw-toggle.showing { color: var(--orange-dark); }

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.remember { color: var(--muted); display: flex; gap: 0.4rem; align-items: center; cursor: pointer; }
.remember input { accent-color: var(--orange); }

.form-error {
    background: rgba(245, 130, 32, 0.1);
    border: 1px solid rgba(245, 130, 32, 0.4);
    color: var(--orange-dark);
    font-size: 0.85rem;
    border-radius: 10px;
    padding: 0.6rem 0.8rem;
    margin-bottom: 1rem;
}

.agree {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    font-size: 0.83rem;
    color: var(--muted);
    margin-bottom: 1rem;
    cursor: pointer;
}

.agree input { accent-color: var(--orange); margin-top: 0.2rem; flex-shrink: 0; }
.agree a { color: var(--orange-dark); font-weight: 600; }

.btn-block { display: block; width: 100%; }

.modal-alt { font-size: 0.88rem; color: var(--muted); margin-top: 1.2rem; }
.modal-alt a { color: var(--orange-dark); font-weight: 600; }

.field-err {
    display: block;
    color: #c0392b;
    font-size: 0.78rem;
    margin-top: 0.3rem;
}

/* OTP code input — big, centred, spaced digits */
.otp-input {
    text-align: center;
    font-size: 1.6rem !important;
    font-weight: 700;
    letter-spacing: 0.5rem;
    padding-left: 0.5rem !important;
}

.otp-cooldown { color: var(--muted); font-size: 0.85rem; }

/* sell-in-the-app modal */
.app-links { margin-top: 0.5rem; }

.store-row {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.7rem;
}

.store-btn {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.6rem 0.5rem;
    text-align: center;
    text-decoration: none;
    color: var(--dark);
    font-size: 0.85rem;
    font-weight: 600;
}

.store-btn:hover { border-color: var(--orange); color: var(--orange-dark); }

/* logged-in header */
.user-greet { font-weight: 600; color: var(--dark); font-size: 0.9rem; }
.logout-form { display: inline; margin: 0; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 980px) {
    .hero h1 { font-size: 2.1rem; }
    .car-grid { grid-template-columns: repeat(2, 1fr); }
    .services-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }

    /* detail page: sidebar drops under the gallery */
    .detail-grid { grid-template-columns: 1fr; }
    .detail-side { position: static; order: -1; }
    .spec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .site-nav {
        position: fixed;
        top: 72px;
        left: 0; right: 0;
        background: #fff;
        flex-direction: column;
        gap: 0;
        padding: 0.5rem 0;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 16px 30px rgba(38, 44, 53, 0.12);
        transform: translateY(-130%);
        transition: transform 0.25s ease;
    }

    .site-nav.open { transform: translateY(0); }

    .site-nav a { padding: 0.85rem 1.5rem; }
    .site-nav a::after { display: none; }

    .header-actions { margin-left: auto; }
    .header-actions .btn-outline { display: none; }
    .nav-toggle { display: flex; }

    .brand-logo { height: 60px; }

    .hero h1 { font-size: 1.8rem; }

    .filter-bar {
        top: 72px;
        border-radius: var(--radius);
    }
    .filter-sort { margin-left: 0; }

    .car-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }

    .spec-grid { grid-template-columns: 1fr 1fr; }
    .detail-title { font-size: 1.15rem; }
    .detail-price { font-size: 1.5rem; }
    .score-ring { width: 72px; height: 72px; }
    .score-value { font-size: 1.5rem; }
}
