/* Best Cars On Web - main stylesheet (luxury redesign) */
:root {
    --charcoal: #14100c;
    --charcoal-soft: #221a12;
    --charcoal-line: rgba(255,255,255,0.08);
    --orange: #c8622a;
    --orange-dark: #9c4a1e;
    --orange-light: #e98a4f;
    --gold: #cf9a4f;
    --gold-light: #e9c98a;
    --bg: #f8f3ec;
    --bg-alt: #ffffff;
    --ink: #1c140d;
    --ink-soft: #6d5d4f;
    --line: #e7dbca;
    --success: #2f9e4f;
    --radius: 18px;
    --radius-sm: 10px;
    --shadow: 0 20px 46px rgba(30, 18, 6, 0.10);
    --shadow-lg: 0 30px 70px rgba(20, 12, 4, 0.22);
    --serif: "Cormorant Garamond", Georgia, serif;
    --sans: "Manrope", "Segoe UI", Arial, sans-serif;
    font-size: 16px;
}

* { box-sizing: border-box; }

html {
    /* push content away from iOS notch / home bar on all sides */
    padding-left:  env(safe-area-inset-left,  0px);
    padding-right: env(safe-area-inset-right, 0px);
}

html, body {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    overflow-x: hidden; /* prevent any child from causing horizontal scroll */
}

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    line-height: 1.6;
}

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

.container {
    width: 100%;
    max-width: 1220px;
    margin: 0 auto;
    /* minimum 20px side-gutter; grows to fill safe-area-inset on notched phones */
    padding-left:  max(20px, env(safe-area-inset-left,  20px));
    padding-right: max(20px, env(safe-area-inset-right, 20px));
}

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
    line-height: 1.15;
    margin: 0 0 14px;
    font-weight: 700;
    font-family: var(--serif);
    letter-spacing: 0.01em;
}

p { margin: 0 0 14px; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--sans);
    font-weight: 700;
    font-size: 0.76rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
}
.eyebrow::before { content: ''; width: 22px; height: 1px; background: var(--gold); display: inline-block; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.94rem;
    font-family: var(--sans);
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
    background: linear-gradient(135deg, var(--orange-light), var(--orange));
    color: #fff;
    box-shadow: 0 12px 26px rgba(200, 98, 42, 0.38);
}
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }

.btn-outline {
    background: transparent;
    border-color: rgba(255,255,255,0.4);
    color: inherit;
}
.btn-outline:hover { background: rgba(255,255,255,0.1); }

.btn-call { background: var(--charcoal); color: #fff; }
.btn-call:hover { background: #2c2115; }

.btn-whatsapp { background: #25d366; color: #06341a; }
.btn-whatsapp:hover { background: #1ebd59; }

.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(248, 243, 236, 0.93);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    /* keep content out of notch / dynamic-island on iOS */
    padding-top: env(safe-area-inset-top, 0px);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img {
    height: 68px;
    /* makes white areas transparent — works because the header bg is light */
    mix-blend-mode: multiply;
}
.brand-word {
    font-family: var(--serif);
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: 0.04em;
    color: var(--ink);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
}
.nav-toggle span {
    display: block;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    flex-wrap: wrap;
}
.main-nav a {
    font-weight: 600;
    font-size: 0.93rem;
    color: var(--ink-soft);
    padding: 6px 2px;
    border-bottom: 2px solid transparent;
}
.main-nav a:hover, .main-nav a.active {
    color: var(--orange-dark);
    border-bottom-color: var(--gold);
}
.nav-cta { display: flex; gap: 10px; margin-left: 8px; }
.nav-cta .btn { padding: 10px 18px; font-size: 0.85rem; }

/* ---------- Hero (single cover image, luxury overlay) ---------- */
.hero-banner {
    position: relative;
    min-height: 640px;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center 30%;
    overflow: hidden;
    color: #fff;
}
.hero-banner::before {
    content: '';
    position: absolute; inset: 0;
    background:
        linear-gradient(180deg, rgba(10,7,4,0.55) 0%, rgba(10,7,4,0.62) 40%, rgba(10,7,4,0.92) 100%),
        linear-gradient(100deg, rgba(10,7,4,0.85) 0%, rgba(10,7,4,0.35) 55%, rgba(10,7,4,0.15) 100%);
    z-index: 1;
}
.hero-banner::after {
    content: '';
    position: absolute; inset: 0;
    box-shadow: inset 0 0 140px rgba(0,0,0,0.55);
    z-index: 1;
    pointer-events: none;
}
.hero-banner-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 90px 0 150px;
}
.hero-banner .hero-copy { max-width: 640px; }
.hero-banner .eyebrow { color: var(--gold-light); }
.hero-banner h1 {
    font-size: clamp(2.6rem, 5.4vw, 4.4rem);
    margin: 14px 0 10px;
    text-shadow: 0 6px 30px rgba(0,0,0,0.55);
    color: #fff;
}
.hero-banner .subtitle {
    font-size: 1.25rem;
    font-family: var(--serif);
    font-style: italic;
    color: var(--gold-light);
    font-weight: 600;
    margin-bottom: 16px;
    text-shadow: 0 3px 16px rgba(0,0,0,0.5);
}
.hero-banner .lead {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.88);
    max-width: 50ch;
    text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 32px;
}
.hero-badges span {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.25);
    backdrop-filter: blur(6px);
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
}

/* ---------- Car search widget ---------- */
.search-widget-wrap {
    position: relative;
    z-index: 3;
    margin-top: -90px;
    padding-bottom: 10px;
}
.search-widget {
    background: var(--bg-alt);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 28px;
    display: grid;
    grid-template-columns: repeat(3, 1fr) auto;
    gap: 16px;
    align-items: end;
    border: 1px solid var(--line);
}
.search-widget .field { display: flex; flex-direction: column; gap: 8px; }
.search-widget label {
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-soft);
}
.search-widget select {
    appearance: none;
    -webkit-appearance: none;
    padding: 13px 40px 13px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    font: inherit;
    font-weight: 600;
    background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%236d5d4f' stroke-width='2' fill='none' fill-rule='evenodd'/%3E%3C/svg%3E") no-repeat right 16px center;
    color: var(--ink);
    cursor: pointer;
}
.search-widget .btn { padding: 14px 30px; height: 50px; }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section-alt { background: var(--bg-alt); }
.section-dark {
    background: var(--charcoal);
    color: #f1e8dc;
}
.section-dark .section-head p { color: rgba(241,232,220,0.68); }
.section-dark h2 { color: #fff; }
.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
.section-head p { color: var(--ink-soft); font-size: 1.05rem; }
.section-head.align-left { margin-left: 0; text-align: left; }

/* Value / stats / process */
.value-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}
.value-card {
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px 26px;
    box-shadow: var(--shadow);
    position: relative;
}
.value-card::before {
    content: '';
    width: 44px; height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--orange));
    display: block;
    margin-bottom: 18px;
    border-radius: 3px;
}
.value-card h3 { color: var(--ink); font-size: 1.2rem; margin-bottom: 8px; }
.value-card p { color: var(--ink-soft); margin: 0; }

.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}
.stats-bar .stat strong {
    display: block;
    font-family: var(--serif);
    font-size: clamp(2rem, 3.6vw, 2.9rem);
    color: var(--gold-light);
    font-weight: 700;
}
.stats-bar .stat span { font-size: 0.85rem; color: rgba(241,232,220,0.7); text-transform: uppercase; letter-spacing: 0.06em; }

.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 28px;
    counter-reset: step;
}
.process-card {
    position: relative;
    padding: 32px 24px 26px;
    background: var(--bg-alt);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}
.process-card .step-no {
    font-family: var(--serif);
    font-size: 2.6rem;
    font-weight: 700;
    color: var(--line);
    -webkit-text-stroke: 1.5px var(--orange);
    -webkit-text-fill-color: transparent;
    display: block;
    margin-bottom: 8px;
}
.process-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.process-card p { color: var(--ink-soft); margin: 0; font-size: 0.95rem; }

/* Service icons */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}
.service-card {
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px 26px;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.service-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.service-icon {
    width: 56px; height: 56px;
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(207,154,79,0.18), rgba(200,98,42,0.18));
    color: var(--orange-dark);
    margin-bottom: 18px;
}
.service-icon svg { width: 28px; height: 28px; }
.service-card h3 { color: var(--ink); font-size: 1.15rem; }
.service-card p { color: var(--ink-soft); margin: 0; }

/* About page image */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 56px;
    align-items: center;
}
.about-photo {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/5; }
.about-photo::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(200deg, rgba(20,16,12,0.05), rgba(20,16,12,0.35) 100%);
}
.about-photo-badge {
    position: absolute;
    left: 22px; bottom: 22px;
    z-index: 2;
    background: rgba(20,16,12,0.75);
    backdrop-filter: blur(6px);
    color: #fff;
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-family: var(--serif);
    font-size: 1.05rem;
    font-style: italic;
    border: 1px solid rgba(255,255,255,0.2);
}
.about-body h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.about-body .lead-text { font-size: 1.1rem; color: var(--ink-soft); }

/* ---------- Car grid & cards ---------- */
.car-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
}
.car-card {
    background: var(--bg-alt);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.car-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.car-card .car-thumb { position: relative; aspect-ratio: 4/3; overflow: hidden; background: #1c1712; }
.car-card .car-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.car-card:hover .car-thumb img { transform: scale(1.06); }
.car-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.car-badge.sold { background: var(--charcoal); color: #fff; }
.car-badge.reduced { background: var(--orange); color: #fff; }
.car-card .car-body { padding: 22px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.car-card h3 { font-size: 1.25rem; margin: 0; }
.car-specs { display: flex; flex-wrap: wrap; gap: 8px; color: var(--ink-soft); font-size: 0.85rem; font-family: var(--sans); }
.car-specs span::after { content: '\2022'; margin-left: 8px; color: var(--line); }
.car-specs span:last-child::after { content: ''; }
.car-price { margin-top: auto; display: flex; align-items: baseline; gap: 10px; }
.car-price .price { font-size: 1.55rem; font-weight: 700; font-family: var(--serif); color: var(--orange-dark); }
.car-price .old-price { text-decoration: line-through; color: var(--ink-soft); font-size: 1rem; }
.car-card .btn { margin-top: 10px; }

.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.filters button {
    background: var(--bg-alt);
    border: 1px solid var(--line);
    padding: 9px 18px;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    color: var(--ink-soft);
}
.filters button.active, .filters button:hover { background: var(--orange); border-color: var(--orange); color: #fff; }

.search-panel {
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px 26px;
    margin-bottom: 30px;
    display: grid;
    grid-template-columns: repeat(3, 1fr) auto;
    gap: 14px;
    align-items: end;
}
.search-panel .field { display: flex; flex-direction: column; gap: 7px; }
.search-panel label { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-soft); }
.search-panel select {
    padding: 11px 36px 11px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    font: inherit;
    font-weight: 600;
    background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%236d5d4f' stroke-width='2' fill='none' fill-rule='evenodd'/%3E%3C/svg%3E") no-repeat right 14px center;
    appearance: none; -webkit-appearance: none;
}
.search-panel .btn { height: 46px; }
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.active-filters .chip {
    background: rgba(200,98,42,0.1);
    color: var(--orange-dark);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}
.active-filters .clear { color: var(--ink-soft); text-decoration: underline; font-size: 0.85rem; }

.empty-state {
    text-align: center;
    padding: 70px 20px;
    color: var(--ink-soft);
    background: var(--bg-alt);
    border-radius: var(--radius);
    border: 1px dashed var(--line);
}

/* ---------- Car detail ---------- */
.car-detail {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 44px;
    align-items: start;
}
/* prevent grid children from overflowing their column */
.car-detail > * { min-width: 0; }

.gallery { width: 100%; overflow: hidden; }
.gallery-main {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 4/3;
    background: #111;
    width: 100%;
}
.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.gallery-main .sold-overlay {
    position: absolute; inset: 0;
    background: rgba(20,15,10,0.6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-family: var(--serif);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.gallery-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 6px;
    /* prevent thumbs strip from expanding the column */
    width: 100%;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.gallery-thumbs img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    flex: 0 0 auto;
    opacity: 0.72;
    transition: opacity 0.2s, border-color 0.2s;
}
.gallery-thumbs img:hover { opacity: 1; }
.gallery-thumbs img.active { border-color: var(--orange); opacity: 1; }

.detail-panel {
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 96px;
}
.detail-panel h1 { font-size: 1.75rem; margin-bottom: 6px; }
.detail-panel .price-row { display: flex; align-items: baseline; gap: 12px; margin: 16px 0; }
.detail-panel .price { font-size: 2.2rem; font-weight: 700; font-family: var(--serif); color: var(--orange-dark); }
.detail-panel .old-price { text-decoration: line-through; color: var(--ink-soft); font-size: 1.2rem; }
.detail-actions { display: flex; flex-direction: column; gap: 10px; margin: 20px 0; }
.detail-actions .btn { padding: 15px; font-size: 1rem; }
.sold-note {
    background: #f4ede4;
    color: var(--ink-soft);
    padding: 16px;
    border-radius: var(--radius-sm);
    text-align: center;
    font-weight: 700;
}

.spec-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.spec-table tr { border-bottom: 1px solid var(--line); }
.spec-table td { padding: 10px 4px; font-size: 0.93rem; }
.spec-table td:first-child { color: var(--ink-soft); }
.spec-table td:last-child { font-weight: 700; text-align: right; }

.detail-sections { margin-top: 60px; display: grid; gap: 36px; }
.detail-sections h2 { font-size: 1.5rem; }
.highlight-list, .equipment-list, .condition-list {
    list-style: none;
    margin: 0; padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px 20px;
}
.highlight-list li, .equipment-list li, .condition-list li {
    padding-left: 28px;
    position: relative;
    color: var(--ink-soft);
}
.highlight-list li::before, .equipment-list li::before, .condition-list li::before {
    content: '\2713';
    position: absolute; left: 0; top: 0;
    color: var(--orange);
    font-weight: 900;
}

/* ---------- FAQ ---------- */
.faq-list { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq-item {
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.faq-item summary {
    padding: 18px 24px;
    cursor: pointer;
    font-weight: 700;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.4rem; color: var(--orange); }
.faq-item[open] summary::after { content: '\2212'; }
.faq-item .faq-answer { padding: 0 24px 22px; color: var(--ink-soft); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-card {
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 14px;
}
.contact-card .row { display: flex; gap: 12px; align-items: flex-start; }
.contact-card .row .label { font-weight: 700; min-width: 90px; color: var(--ink-soft); }
.contact-form { display: grid; gap: 12px; }
.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 13px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    font: inherit;
    background: #fff;
}
.contact-form textarea { min-height: 120px; resize: vertical; }
.map-frame { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.map-frame iframe { width: 100%; height: 320px; border: 0; display: block; }
.form-msg { padding: 12px 14px; border-radius: var(--radius-sm); font-weight: 600; }
.form-msg.ok { background: #e6f6ea; color: var(--success); }
.form-msg.err { background: #fdeae2; color: var(--orange-dark); }

/* ---------- CTA band ---------- */
.cta-band {
    background: linear-gradient(120deg, var(--charcoal) 0%, #2a1f14 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: 56px 48px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
}
.cta-band h2 { color: #fff; margin-bottom: 6px; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.cta-band p { color: rgba(255,255,255,0.7); margin: 0; }
.cta-band .hero-actions { margin-top: 0; }

/* ---------- Floating WhatsApp ---------- */
.floating-whatsapp {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 26px rgba(37, 211, 102, 0.45);
    z-index: 60;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--charcoal); color: #f2e9de; margin-top: 60px; }
.footer-inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 30px;
    padding: 56px 0 32px;
}
.footer-col { display: flex; flex-direction: column; gap: 9px; }
.footer-col h4 { color: #fff; margin-bottom: 6px; font-family: var(--sans); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; }
.footer-col a, .footer-col span { color: #c9b9a8; }
.footer-col a:hover { color: var(--gold-light); }
.footer-brand-name { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; color: #fff; }
.social-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--gold-light) !important; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 18px 0; font-size: 0.82rem; color: #a9998a; }

/* ---------- Admin ---------- */
.admin-body { background: #f3ede4; font-family: var(--sans); }
.admin-body h1, .admin-body h3, .admin-body h4 { font-family: var(--sans); }
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 240px;
    background: var(--charcoal);
    color: #f2e9de;
    padding: 24px 18px;
    flex-shrink: 0;
}
.admin-sidebar img { height: 40px; margin-bottom: 20px; background: #fff; border-radius: 8px; padding: 4px; }
.admin-sidebar a {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    color: #cbb9a7;
    font-weight: 600;
    margin-bottom: 4px;
}
.admin-sidebar a.active, .admin-sidebar a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.admin-main { flex: 1; padding: 30px; max-width: 1100px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.admin-topbar h1 { font-family: var(--sans); font-size: 1.5rem; }
.admin-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table th { color: var(--ink-soft); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; }
.admin-table img.thumb { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; }
.status-pill { padding: 4px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 800; text-transform: uppercase; }
.status-pill.available { background: #e6f6ea; color: var(--success); }
.status-pill.reduced { background: #fdeae2; color: var(--orange-dark); }
.status-pill.sold { background: #ece4da; color: #6b5a4c; }
.action-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.action-btns a, .action-btns button {
    font-size: 0.78rem;
    padding: 7px 12px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #fff;
    cursor: pointer;
    font-weight: 700;
    color: var(--ink);
    font-family: var(--sans);
}
.action-btns a.danger, .action-btns button.danger { color: #c0392b; border-color: #f2c9c1; }
.action-btns a:hover, .action-btns button:hover { background: var(--bg); }

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-field label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 0.88rem; }
.form-field input, .form-field select, .form-field textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--line);
    font: inherit;
}
.form-field textarea { min-height: 90px; resize: vertical; }
.form-actions { display: flex; gap: 12px; margin-top: 20px; }

.image-manager { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; margin-top: 16px; }
.image-manager .image-item {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px;
    text-align: center;
}
.image-manager .image-item img { width: 100%; height: 100px; object-fit: cover; border-radius: 8px; margin-bottom: 8px; }
.image-manager .image-item .cover-tag { font-size: 0.7rem; font-weight: 800; color: var(--orange-dark); margin-bottom: 6px; display: block; }
.image-controls { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; }
.image-controls button {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 6px;
    padding: 5px 8px;
    font-size: 0.85rem;
    cursor: pointer;
}
.image-controls button.danger { color: #c0392b; }

.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(120deg, var(--charcoal) 0%, #2a1f14 100%);
    padding: 20px;
}
.login-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 40px;
    max-width: 380px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    text-align: center;
    font-family: var(--sans);
}
.login-card img { height: 60px; margin: 0 auto 20px; }
.login-card input { width: 100%; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line); margin-bottom: 14px; font: inherit; }
.login-error { color: #c0392b; font-weight: 700; margin-bottom: 14px; }
.alert-success { background: #e6f6ea; color: var(--success); padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-weight: 700; }

/* ---------- Responsive ---------- */

/* ── Tablet (≤ 960 px) ─────────────────────────────── */
@media (max-width: 960px) {
    .section { padding: 60px 0; }

    /* Hero */
    .hero-banner { min-height: 500px; }
    .hero-banner-inner { padding: 72px 0 130px; }

    /* Search widget on home */
    .search-widget { grid-template-columns: 1fr 1fr; }
    .search-widget .btn { grid-column: 1 / -1; }
    .search-widget-wrap { margin-top: -60px; }

    /* Filter panel on listing page */
    .search-panel { grid-template-columns: 1fr 1fr; }
    .search-panel .btn { grid-column: 1 / -1; }

    /* Car detail — single column from 960 px down */
    .car-detail { grid-template-columns: 1fr; }
    .detail-panel { position: static; }

    /* About, contact */
    .contact-grid { grid-template-columns: 1fr; }
    .about-grid { grid-template-columns: 1fr; }
    .about-photo img { aspect-ratio: 16/9; }

    /* Stats & footer */
    .stats-bar { grid-template-columns: 1fr 1fr; gap: 24px; }
    .footer-inner { grid-template-columns: 1fr 1fr; }

    /* CTA band */
    .cta-band { flex-direction: column; align-items: flex-start; text-align: left; padding: 36px 28px; }

    /* Admin */
    .admin-shell { flex-direction: column; }
    .admin-sidebar {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 10px;
        overflow-x: auto;
        padding: 14px;
    }
    .admin-sidebar img { margin-bottom: 0; }
    .admin-sidebar a { white-space: nowrap; margin-bottom: 0; }
}

/* ── Mobile (≤ 720 px) ─────────────────────────────── */
@media (max-width: 720px) {
    /* hamburger */
    .nav-toggle { display: flex; }
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-alt);
        flex-direction: column;
        align-items: stretch;
        /* respect side safe-areas even in the dropdown */
        padding: 16px max(20px, env(safe-area-inset-right, 20px)) 24px
                      max(20px, env(safe-area-inset-left,  20px));
        display: none;
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow);
        gap: 14px;
        z-index: 49;
    }
    .main-nav.open { display: flex; }
    .nav-cta { flex-direction: column; margin-left: 0; margin-top: 10px; }

    /* Logo text hidden on tiny screens */
    .brand-word { display: none; }
    .brand img { height: 52px; }

    /* Hero */
    .hero-banner { min-height: 420px; }
    .hero-banner-inner { padding: 60px 0 160px; }
    .hero-banner h1 { font-size: 2.2rem; }
    .hero-badges { display: none; } /* saves space, not critical on mobile */

    /* Search widget stacked */
    .search-widget {
        grid-template-columns: 1fr;
        padding: 20px;
        border-radius: var(--radius-sm);
    }
    .search-widget-wrap { margin-top: -50px; }

    /* Filter panel stacked */
    .search-panel { grid-template-columns: 1fr; }

    /* Car grid — single column */
    .car-grid { grid-template-columns: 1fr; }

    /* Car detail gallery — critical overflow fixes */
    .gallery-main { border-radius: var(--radius-sm); }
    .gallery-thumbs img { width: 70px; height: 52px; border-radius: 6px; }

    /* Spec table readable on small screens */
    .spec-table td { padding: 9px 2px; font-size: 0.88rem; }

    /* Lists — single column on mobile */
    .highlight-list,
    .equipment-list,
    .condition-list { grid-template-columns: 1fr; }

    /* Misc */
    .form-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; }
    .stats-bar { grid-template-columns: 1fr 1fr; }
    .process-grid { grid-template-columns: 1fr; }
    .admin-main { padding: 16px; }
    .cta-band { padding: 28px 22px; }
}

/* ── Very small (≤ 420 px) ─────────────────────────── */
@media (max-width: 420px) {
    .hero-banner-inner { padding: 50px 0 150px; }
    .hero-banner h1 { font-size: 1.9rem; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; justify-content: center; }
    .stats-bar { grid-template-columns: 1fr; }
    .search-widget-wrap { margin-top: -40px; }
    .detail-panel { padding: 20px 16px; }
    .detail-panel h1 { font-size: 1.4rem; }
    .detail-panel .price { font-size: 1.8rem; }
}
