/* ================================================================
   Classic4you — motyw „Route 66 / vintage Americana"
   Jeden plik, bez buildu. Krój nagłówków (Oswald) self-hosted.
   ================================================================ */

@font-face {
    font-family: 'Oswald';
    src: url('/assets/fonts/oswald-500.woff2') format('woff2');
    font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Oswald';
    src: url('/assets/fonts/oswald-600.woff2') format('woff2');
    font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Oswald';
    src: url('/assets/fonts/oswald-700.woff2') format('woff2');
    font-weight: 700; font-style: normal; font-display: swap;
}

:root {
    --bg: #f2e9da;            /* ciepły kremowy papier */
    --bg-2: #ece1cd;
    --surface: #fffdf7;
    --ink: #211812;           /* ciepła czerń */
    --muted: #756a58;
    --line: #ddd0ba;
    --accent: #b0271f;        /* vintage red */
    --accent-dark: #871a13;
    --teal: #1f6b73;          /* diner / petrol akcent */
    --teal-dark: #164e54;
    --road: #e7b53f;          /* żółta linia szosy */
    --dark: #1b1712;          /* asfalt (header/footer) */
    --dark-2: #262019;
    --chrome: #d9d2c4;
    --ok-bg: #e6f2e6; --ok-ink: #256b32;
    --err-bg: #fbe7e5; --err-ink: #9a1c1c;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(60,40,20,.08), 0 10px 30px rgba(60,40,20,.10);
    --wrap: 1180px;
    --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --head: 'Oswald', 'Arial Narrow', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background-color: var(--bg);
    background-image:
        radial-gradient(1200px 500px at 100% -10%, rgba(31,107,115,.06), transparent 60%),
        radial-gradient(900px 400px at -10% 0, rgba(176,39,31,.05), transparent 55%);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 {
    font-family: var(--head);
    line-height: 1.08;
    font-weight: 700;
    letter-spacing: .01em;
    text-transform: uppercase;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.section { padding: 48px 20px; }
.center { text-align: center; }
.empty, .hint { color: var(--muted); }
.hint { font-size: .92rem; }

/* Separator „autostrada": pas asfaltu z rzadką, długą przerywaną linią środkową */
.road-divider {
    height: 34px; position: relative; overflow: hidden;
    background: linear-gradient(180deg, #2a2520, #17130f 55%, #221d18);
}
.road-divider::before {
    content: ""; position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%);
    height: 9px; border-radius: 2px;
    background: repeating-linear-gradient(90deg, #f2eee4 0 62px, transparent 62px 158px);
}

/* --------------------------- Header/Nav --------------------------- */
.site-header { position: sticky; top: 0; z-index: 40; box-shadow: 0 3px 18px rgba(0,0,0,.30); }

/* Górny pasek: telefon + social */
.topbar { background: #100c09; color: #b9af9f; border-bottom: 1px solid rgba(255,255,255,.07); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 36px; }
.topbar-tag { font-family: var(--head); text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; color: #9a9082; }
.topbar-right { display: flex; align-items: center; gap: 20px; }
.topbar-right a { color: #c9bfae; font-family: var(--head); text-transform: uppercase; letter-spacing: .04em; font-size: .8rem; }
.topbar-right a:hover { color: var(--road); text-decoration: none; }
.topbar-phone { color: var(--road); }
.topbar-socials { display: inline-flex; align-items: center; gap: 14px; }
.topbar-social { display: inline-flex; color: #c9bfae; }
.topbar-social svg { width: 17px; height: 17px; }
.topbar-social:hover { color: var(--road); text-decoration: none; }

/* Główny pasek nawigacji */
.navbar { background: linear-gradient(180deg, #221d17, var(--dark)); border-bottom: 3px solid var(--accent); position: relative; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 10px; background: #fff; padding: 5px 16px 5px 8px; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,.3); }
.brand:hover { text-decoration: none; }
.brand-logo { height: 46px; width: auto; display: block; }
.brand-text { font-family: var(--head); font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: var(--ink); font-size: 1.4rem; line-height: 1; }
.brand:hover .brand-text { color: var(--accent); }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav > a { position: relative; color: #ece4d7; padding: 10px 6px; margin: 0 10px; font-family: var(--head); font-weight: 500; text-transform: uppercase; letter-spacing: .05em; font-size: 1.04rem; }
.site-nav > a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 3px; background: var(--road); border-radius: 2px; transform: scaleX(0); transform-origin: left; transition: transform .22s ease; }
.site-nav > a:hover { color: #fff; text-decoration: none; }
.site-nav > a:hover::after, .site-nav > a.active::after { transform: scaleX(1); }
.site-nav > a.active { color: #fff; }
.nav-cta { background: var(--accent); color: #fff; padding: 10px 22px; border-radius: 8px; margin-left: 14px; box-shadow: 0 3px 10px rgba(176,39,31,.4); }
.nav-cta::after { display: none !important; }
.nav-cta:hover { background: var(--accent-dark); color: #fff; text-decoration: none; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 26px; height: 2px; background: #fff; border-radius: 2px; }

/* ------------------------------ Hero ------------------------------ */
.hero {
    position: relative;
    background:
        linear-gradient(90deg, rgba(12,9,6,.92) 0%, rgba(12,9,6,.72) 38%, rgba(12,9,6,.32) 68%, rgba(12,9,6,.12) 100%),
        url('/assets/hero.jpg?v=4') center top / cover no-repeat;
    background-color: #14110d;
    color: #fff; padding: 96px 20px 104px;
}
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; }
.hero .wrap { position: relative; z-index: 1; }
.hero-badge {
    position: absolute; right: 3%; top: 50%; transform: translateY(-50%);
    width: min(340px, 30vw); opacity: .16; pointer-events: none; z-index: 0;
    filter: drop-shadow(0 6px 20px rgba(0,0,0,.4));
}
.hero h1 {
    font-size: clamp(2.1rem, 5.2vw, 4rem); margin: 0 0 18px; max-width: 18ch;
    text-shadow: 0 2px 12px rgba(0,0,0,.35);
}
.hero-body { font-size: 1.14rem; color: #e6ddd0; max-width: 60ch; }

/* --------------------------- Sekcja intro -------------------------- */
.intro-band {
    background:
        radial-gradient(1200px 300px at 50% -40%, rgba(31,107,115,.06), transparent 70%),
        linear-gradient(180deg, #ece0c9, #e6d7bd);
    border-top: 1px solid #d9cbb2;
    border-bottom: 1px solid #d9cbb2;
    box-shadow: inset 0 10px 26px rgba(90,60,30,.06), inset 0 -10px 26px rgba(90,60,30,.06);
    margin: 8px 0;
}
.intro { text-align: center; padding: 48px 20px; }
.intro-inner { max-width: 820px; margin: 0 auto; }
.intro h2 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); margin: 0 0 14px; }
.intro-body p { font-size: 1rem; line-height: 1.55; color: #5a4f40; margin: 0 0 8px; }
.intro-body p:first-child { font-size: 1.18rem; line-height: 1.4; color: var(--ink); font-weight: 600; margin-bottom: 12px; }
.intro-body p:last-child { color: var(--accent-dark); font-weight: 600; }
.intro .btn { margin-top: 16px; }

/* --------------------------- Section head -------------------------- */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.section-head h1, .section-head h2 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.1rem); position: relative; padding-bottom: 10px; }
.section-head h1::after, .section-head h2::after {
    content: ""; position: absolute; left: 0; bottom: 0; width: 64px; height: 4px;
    background: var(--accent); border-radius: 2px;
}
.filter-input {
    padding: 11px 16px; border: 2px solid var(--line); border-radius: 999px;
    min-width: 280px; font-size: 1rem; background: var(--surface); color: var(--ink);
}
.filter-input:focus { outline: none; border-color: var(--teal); }
.filter-empty { text-align: center; color: var(--muted); padding: 30px; }

/* ----------------------------- Car grid --------------------------- */
.car-grid { display: grid; gap: 26px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.car-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; color: var(--ink); display: flex; flex-direction: column;
    box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease;
}
.car-card:hover { text-decoration: none; transform: translateY(-4px); box-shadow: 0 14px 36px rgba(60,40,20,.20); }
.car-card-media { position: relative; aspect-ratio: 4/3; background: #e6ddcd; overflow: hidden; }
.car-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.car-card:hover .car-card-media img { transform: scale(1.06); }
.car-card-noimg { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--muted); font-size: .9rem; }
.ribbon {
    position: absolute; top: 12px; left: 12px; padding: 6px 13px; border-radius: 4px;
    font-family: var(--head); font-size: .8rem; font-weight: 600; color: #fff;
    letter-spacing: .06em; text-transform: uppercase; box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.ribbon-badge { background: var(--teal); }
.ribbon-sold { background: var(--accent); border: 2px solid #fff; }
.ribbon-featured { left: auto; right: 12px; background: #caa53a; color: #20180f; }
.ribbon-sold.static { position: static; display: inline-block; }
.car-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.car-card-title { font-size: 1.18rem; margin: 0; line-height: 1.15; }
.car-card-count { position: absolute; bottom: 10px; right: 10px; background: rgba(20,17,13,.78); color: #fff; font-family: var(--head); font-size: .76rem; letter-spacing: .03em; padding: 3px 10px; border-radius: 999px; }
.car-card-specs { display: flex; flex-wrap: wrap; gap: 6px; }
.car-card-specs span { background: var(--bg-2); color: #5a4f40; font-size: .8rem; padding: 3px 10px; border-radius: 6px; white-space: nowrap; }
.car-card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.car-card-price { font-family: var(--head); font-weight: 600; font-size: 1.05rem; color: var(--accent-dark); letter-spacing: .02em; text-transform: uppercase; }
.car-card-price-sold { color: var(--muted); }
.car-card-more { font-family: var(--head); text-transform: uppercase; letter-spacing: .04em; font-size: .82rem; color: var(--muted); transition: color .15s ease, transform .15s ease; white-space: nowrap; }
.car-card:hover .car-card-more { color: var(--accent); transform: translateX(3px); }

/* ---------------------------- Car detail -------------------------- */
.back-link {
    display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px;
    color: var(--ink); background: var(--surface); border: 1px solid var(--line);
    padding: 8px 18px; border-radius: 999px; box-shadow: var(--shadow);
    font-family: var(--head); text-transform: uppercase; letter-spacing: .05em; font-size: .88rem;
    transition: background .15s ease, color .15s ease, transform .15s ease;
}
.back-link:hover { background: var(--accent); color: #fff; border-color: var(--accent); text-decoration: none; transform: translateX(-2px); }

/* Biały panel z całą ofertą auta */
.car-sheet { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 30px; box-shadow: var(--shadow); }
.car-sheet .car-header { padding-bottom: 18px; border-bottom: 2px solid var(--line); }
.car-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.car-header h1 { font-size: clamp(1.8rem, 3.4vw, 2.8rem); margin: 0; }
.car-price-lg { font-family: var(--head); font-size: 1.7rem; font-weight: 600; color: #fff; background: var(--accent);
    padding: 8px 18px; border-radius: 6px; white-space: nowrap; letter-spacing: .02em; text-transform: uppercase;
    box-shadow: 0 3px 10px rgba(176,39,31,.35); }

.gallery { display: grid; gap: 10px; grid-template-columns: repeat(4, 1fr); margin-bottom: 34px; }
.gallery-item { border-radius: 8px; overflow: hidden; aspect-ratio: 4/3; background: #e6ddcd; cursor: zoom-in; box-shadow: var(--shadow); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-main { grid-column: span 4; aspect-ratio: 16/9; }

.car-columns { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 34px; align-items: start; }
.car-main { min-width: 0; }
.spec-table { width: 100%; border-collapse: collapse; margin-bottom: 26px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.spec-table th { background: rgba(33,24,18,.04); }
.spec-table th, .spec-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
.spec-table th { width: 38%; color: var(--muted); font-family: var(--head); font-weight: 500; text-transform: uppercase; letter-spacing: .03em; font-size: .95rem; }

.video-embed { position: relative; aspect-ratio: 16/9; margin-top: 24px; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.car-aside { position: sticky; top: 92px; min-width: 0; }
.inquiry-box { background: var(--bg); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: var(--radius); padding: 22px; }
.inquiry-box .form input, .inquiry-box .form textarea { background: var(--surface); }
.inquiry-box h2 { margin-top: 0; font-size: 1.4rem; }

/* --------------------------- O nas / mapa -------------------------- */
.about-hero { width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 28px; border: 1px solid var(--line); }
.about-prose { max-width: 760px; }
.section-sub { font-size: 1.4rem; margin: 0 0 18px; }
.contact-map-section { padding-top: 8px; }
.contact-map { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); aspect-ratio: 16/7; }
.contact-map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ------------------------------ Prose ----------------------------- */
.prose { max-width: 72ch; }
.prose h1 { font-size: 2.1rem; margin-bottom: 18px; }
.car-description { max-width: none; margin-bottom: 8px; line-height: 1.7; }

/* ---------------------------- Lightbox ---------------------------- */
.lightbox { position: fixed; inset: 0; background: rgba(15,12,9,.94); z-index: 100; display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.6); }
.lightbox button { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; width: 54px; height: 54px; border-radius: 50%; font-size: 1.9rem; cursor: pointer; }
.lightbox button:hover { background: var(--accent); }
.lightbox-close { top: 18px; right: 18px; }
.lightbox-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 14px; top: 50%; transform: translateY(-50%); }

/* ---------------------------- Forms/btns -------------------------- */
.form label { display: block; margin-bottom: 15px; font-weight: 600; }
.form label small { font-weight: 400; color: var(--muted); margin-left: 6px; }
.form input, .form textarea, .form select {
    width: 100%; min-width: 0; margin-top: 6px; padding: 12px 14px; border: 2px solid var(--line);
    border-radius: 8px; font-size: 1rem; font-family: inherit; background: var(--surface); color: var(--ink);
}
.form input:focus, .form textarea:focus, .form select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(31,107,115,.14); }
.form textarea { resize: vertical; }
.hp { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.btn {
    display: inline-block; padding: 12px 24px; border-radius: 8px; border: 2px solid transparent;
    font-family: var(--head); font-size: 1.02rem; font-weight: 600; cursor: pointer; text-align: center;
    text-transform: uppercase; letter-spacing: .04em;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: #efe6d6; }
.btn-danger { background: #fff; border-color: #e0b0ac; color: var(--accent-dark); }
.btn-danger:hover { background: var(--err-bg); }
.btn-block { display: block; width: 100%; }
.btn-sm { padding: 8px 14px; font-size: .9rem; }

.form-status { min-height: 1.2em; margin: 10px 0 0; font-weight: 600; }
.form-status.ok { color: var(--ok-ink); }
.form-status.err { color: var(--err-ink); }

.alert { padding: 13px 18px; border-radius: 8px; margin: 16px 0; font-weight: 500; border-left: 4px solid; }
.alert-success { background: var(--ok-bg); color: var(--ok-ink); border-color: var(--ok-ink); }
.alert-error { background: var(--err-bg); color: var(--err-ink); border-color: var(--err-ink); }

/* ---------------------------- Contact ----------------------------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.contact-info { min-width: 0; }
.contact-list { list-style: none; padding: 0; margin: 22px 0 0; }
.contact-list li { display: flex; gap: 14px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line); }
.contact-list li span { flex: none; width: 100px; color: var(--muted); font-family: var(--head); font-weight: 500; text-transform: uppercase; letter-spacing: .03em; font-size: .92rem; }
.contact-form-wrap { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--teal); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.contact-form-wrap h2 { margin-top: 0; }

/* ----------------------------- Footer ----------------------------- */
.site-footer { background: linear-gradient(180deg, #1b1712, #13100c); color: #d7cdbd; margin-top: 72px; border-top: 3px solid var(--accent); }
.footer-top { display: grid; grid-template-columns: 1.7fr 1fr 1.3fr auto; gap: 40px; padding: 50px 20px 38px; align-items: start; }
.footer-about { max-width: 360px; }
.footer-brand-lockup { margin-bottom: 16px; }
.footer-tag { color: #b3a998; margin: 0 0 18px; line-height: 1.6; }
.footer-phone { display: inline-block; font-family: var(--head); font-size: 1.6rem; font-weight: 600; color: var(--road); letter-spacing: .02em; }
.footer-phone:hover { color: #fff; text-decoration: none; }
.footer-col h4 { font-family: var(--head); text-transform: uppercase; letter-spacing: .05em; color: #fff; font-size: 1.05rem; margin: 0 0 16px; position: relative; padding-bottom: 8px; }
.footer-col h4::after { content: ""; position: absolute; left: 0; bottom: 0; width: 34px; height: 3px; background: var(--accent); border-radius: 2px; }
.footer-links { display: flex; flex-direction: column; gap: 9px; }
.footer-links a { color: #cfc5b5; }
.footer-links a:hover { color: var(--road); text-decoration: none; }
.footer-muted { color: #9d9384; font-size: .92rem; line-height: 1.5; }
.footer-socials { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.footer-socials a { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); color: #d7cdbd; transition: background .15s ease, color .15s ease, transform .15s ease; }
.footer-socials a:hover { color: var(--dark); background: var(--road); border-color: var(--road); text-decoration: none; transform: translateY(-2px); }
.footer-shield-col { display: flex; justify-content: flex-end; align-items: flex-start; }
.footer-route66 { width: 150px; height: auto; filter: drop-shadow(0 8px 18px rgba(0,0,0,.55)); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); }
.footer-bottom .wrap { padding: 18px 20px; font-size: .85rem; color: #8b8171; text-align: center; }

@media (max-width: 920px) {
    .footer-top { grid-template-columns: 1fr 1fr; }
    .footer-shield-col { grid-column: 1 / -1; justify-content: center; margin-top: 8px; }
}
@media (max-width: 560px) {
    .footer-top { grid-template-columns: 1fr; gap: 28px; }
}

/* ================================================================
   PANEL ADMINA (spójne akcenty, czytelny i mobilny)
   ================================================================ */
body.admin { background: #efe7d8; }
.admin-header { background: var(--dark); color: #fff; position: sticky; top: 0; z-index: 40; border-bottom: 3px solid var(--accent); }
.admin-header-inner { display: flex; align-items: center; gap: 14px; height: 60px; padding: 0 16px; }
.admin-brand { color: #fff; font-family: var(--head); font-size: 1.3rem; text-transform: uppercase; letter-spacing: .04em; }
.admin-brand:hover { color: var(--road); text-decoration: none; }
.admin-view-site { margin-left: auto; color: #cfc5b5; font-size: .9rem; }

.admin-shell { display: grid; grid-template-columns: 220px 1fr; max-width: 1400px; margin: 0 auto; }
.admin-nav { background: var(--surface); border-right: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; min-height: calc(100vh - 60px); }
.admin-nav a { color: var(--ink); padding: 11px 14px; border-radius: 7px; font-family: var(--head); font-weight: 500; text-transform: uppercase; letter-spacing: .03em; display: flex; align-items: center; gap: 8px; }
.admin-nav a:hover { background: #efe6d6; text-decoration: none; }
.admin-nav a.active { background: var(--accent); color: #fff; }
.pill { background: var(--accent); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: .75rem; font-weight: 700; }
.admin-nav a.active .pill { background: #fff; color: var(--accent); }
.admin-logout { margin-top: auto; }
.admin-logout button { width: 100%; padding: 10px; background: none; border: 1px solid var(--line); border-radius: 7px; cursor: pointer; color: var(--muted); font-family: var(--head); text-transform: uppercase; letter-spacing: .03em; }

.admin-main { padding: 28px 32px; max-width: 900px; }
.admin-main h1 { font-size: 1.8rem; margin-top: 0; }
.admin-page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.admin-actions { margin: 20px 0; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-align: center; color: var(--ink); display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow); }
.stat:hover { text-decoration: none; transform: translateY(-2px); }
.stat-num { font-size: 2.2rem; font-weight: 700; font-family: var(--head); }
.stat-alert .stat-num { color: var(--accent); }

.car-group-head { display: flex; align-items: center; gap: 12px; margin: 26px 0 12px; }
.car-group-head:first-of-type { margin-top: 8px; }
.car-group-head h2 { margin: 0; font-size: 1.2rem; color: var(--ink); white-space: nowrap; }
.car-group-head::after { content: ""; flex: 1; height: 3px; border-radius: 2px;
    background: repeating-linear-gradient(90deg, var(--accent) 0 14px, transparent 14px 24px); }
.car-group-sold h2 { color: var(--muted); }
.car-group-sold::after { background: repeating-linear-gradient(90deg, var(--chrome) 0 14px, transparent 14px 24px); }
.car-group-hidden h2 { color: #9a9082; }
.car-group-hidden::after { background: repeating-linear-gradient(90deg, #cfc6b6 0 14px, transparent 14px 24px); }
.car-group-head .count { font-family: var(--head); font-weight: 600; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0 10px; font-size: .85rem; }

.car-admin-list { display: flex; flex-direction: column; gap: 10px; }
.car-admin-row { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; color: var(--ink); box-shadow: var(--shadow); }
.car-admin-reorder { display: flex; flex-direction: column; gap: 3px; flex: none; }
.car-admin-reorder form { margin: 0; }
.car-admin-reorder button { width: 32px; height: 24px; border: 1px solid var(--line); background: var(--bg); border-radius: 5px; cursor: pointer; line-height: 1; color: var(--muted); font-size: .9rem; }
.car-admin-reorder button:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.car-admin-link { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; color: var(--ink); }
.car-admin-link:hover { text-decoration: none; }
.car-admin-info .star { color: #d9932b; }
.checkbox-label { display: flex; align-items: center; gap: 10px; font-weight: 600; margin-bottom: 15px; }
.checkbox-label input { width: auto; margin: 0; }
.car-admin-thumb { width: 74px; height: 56px; border-radius: 7px; overflow: hidden; background: #e6ddcd; flex: none; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.car-admin-thumb img { width: 100%; height: 100%; object-fit: cover; }
.car-admin-info { flex: 1; min-width: 0; }
.car-admin-info strong { font-family: var(--head); font-size: 1.05rem; letter-spacing: .01em; }
.car-admin-meta { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: .88rem; margin-top: 4px; }
.car-admin-edit { color: var(--accent); font-family: var(--head); text-transform: uppercase; font-size: .9rem; white-space: nowrap; }
.tag { padding: 2px 10px; border-radius: 999px; font-size: .76rem; font-weight: 700; font-family: var(--head); text-transform: uppercase; letter-spacing: .03em; }
.tag-avail { background: var(--ok-bg); color: var(--ok-ink); }
.tag-sold { background: #ece4d5; color: #6b5e48; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-row-3 { grid-template-columns: 1fr 1fr 1fr; }
.form fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 0 0 20px; background: var(--surface); }
.form legend { font-family: var(--head); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; padding: 0 8px; }
.sticky-actions { position: sticky; bottom: 0; background: rgba(239,231,216,.96); backdrop-filter: blur(4px); padding: 14px 0; display: flex; gap: 12px; border-top: 2px solid var(--line); margin-top: 20px; z-index: 10; }
.form-actions { display: flex; gap: 12px; }

.gallery-admin { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 24px 0; }
.upload-drop { display: flex; align-items: center; justify-content: center; padding: 24px; border: 2px dashed var(--line); border-radius: var(--radius); cursor: pointer; color: var(--accent); font-family: var(--head); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; margin: 12px 0; }
.upload-drop input { display: none; }
.upload-drop:hover { border-color: var(--accent); background: #fbf3f2; }
.upload-progress { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.upload-progress .up-item { font-size: .85rem; color: var(--muted); display: flex; justify-content: space-between; gap: 10px; }
.upload-progress .up-item.err { color: var(--err-ink); }
.upload-progress .up-item.ok { color: var(--ok-ink); }

.gallery-admin-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.ga-item { position: relative; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #e6ddcd; }
.ga-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.ga-cover-badge { position: absolute; top: 6px; left: 6px; background: var(--accent); color: #fff; font-family: var(--head); font-size: .72rem; font-weight: 600; text-transform: uppercase; padding: 2px 8px; border-radius: 4px; }
.ga-buttons { display: flex; }
.ga-btn { flex: 1; border: 0; border-top: 1px solid var(--line); border-right: 1px solid var(--line); background: #fff; padding: 11px 0; cursor: pointer; font-size: 1.05rem; line-height: 1; }
.ga-btn:last-child { border-right: 0; }
.ga-btn:hover { background: #efe6d6; }
.ga-btn[data-action="delete"]:hover { background: var(--err-bg); }

.danger-zone { margin: 30px 0; padding-top: 20px; border-top: 1px solid var(--line); }

/* Pola linków YouTube (dodawaj/usuwaj) */
.yt-field { margin-bottom: 15px; }
.yt-row { display: flex; gap: 8px; margin-bottom: 8px; }
.yt-row input { flex: 1; margin-top: 0; }
.yt-row .btn { flex: none; }

.inq-cards { display: flex; flex-direction: column; gap: 14px; }
.inq-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.inq-card.unread { border-left: 4px solid var(--accent); }
.inq-card-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.inq-card-head strong { font-family: var(--head); font-size: 1.1rem; }
.inq-date { color: var(--muted); font-size: .82rem; }
.inq-contact { display: flex; gap: 14px; margin: 6px 0; flex-wrap: wrap; }
.inq-car { font-size: .9rem; color: var(--muted); margin: 4px 0; }
.inq-body { margin: 10px 0; white-space: pre-line; }
.inq-card-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.inq-card-actions form { margin: 0; }
.inq-list { list-style: none; padding: 0; }
.inq-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.inq-list li.unread strong::before { content: "● "; color: var(--accent); }
.inq-msg { color: var(--muted); font-size: .9rem; }

.admin-bare { background: var(--dark);
    background-image: repeating-linear-gradient(90deg, rgba(231,181,63,.10) 0 26px, transparent 26px 48px);
    background-position: center 60%; background-size: 100% 8px; background-repeat: no-repeat;
    display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.admin-bare-main { width: 100%; max-width: 420px; padding: 20px; }
.login-card { background: var(--surface); border-radius: var(--radius); padding: 34px; box-shadow: 0 20px 50px rgba(0,0,0,.4); border-top: 5px solid var(--accent); }
.login-card h1 { text-align: center; margin: 0; font-size: 1.8rem; }
.login-sub { text-align: center; color: var(--muted); margin: 4px 0 24px; font-family: var(--head); text-transform: uppercase; letter-spacing: .05em; font-size: .9rem; }

/* ================================================================
   RESPONSYWNOŚĆ
   ================================================================ */
@media (max-width: 900px) {
    .car-columns { grid-template-columns: minmax(0, 1fr); }
    .car-aside { position: static; }
    .contact-grid { grid-template-columns: minmax(0, 1fr); }
    .gallery-main { aspect-ratio: 4/3; }
}
@media (max-width: 720px) {
    .nav-toggle { display: flex; }
    .site-nav, .admin-nav { display: none; }
    .site-nav.open { display: flex; flex-direction: column; align-items: stretch; position: absolute; top: 100%; left: 0; right: 0; background: var(--dark); padding: 10px; gap: 2px; box-shadow: var(--shadow); border-bottom: 3px solid var(--accent); }
    .site-nav.open > a { margin: 0; padding: 13px 14px; border-radius: 6px; }
    .site-nav.open > a::after { display: none; }
    .site-nav.open > a:hover, .site-nav.open > a.active { background: rgba(255,255,255,.08); color: #fff; }
    .nav-cta { margin: 8px 0 2px; text-align: center; }
    .topbar-tag { display: none; }
    .topbar-inner { justify-content: center; }
    .admin-shell { grid-template-columns: 1fr; }
    .admin-nav.open { display: flex; position: absolute; top: 60px; left: 0; right: 0; z-index: 30; min-height: auto; box-shadow: var(--shadow); }
    .admin-nav { min-height: auto; }
    .admin-main { padding: 20px 16px; }
    .stat-row { grid-template-columns: 1fr; }
    .field-row, .field-row-3 { grid-template-columns: 1fr; gap: 0; }
    .gallery { grid-template-columns: repeat(2, 1fr); }
    .gallery-main { grid-column: span 2; }
    .filter-input { min-width: 0; width: 100%; }
    .section-head { flex-direction: column; align-items: stretch; }
    .hero-badge { width: 150px; opacity: .10; right: -10px; }
}
