/* ==========================================================================
   Motor-Szerelő.HU — design tokens
   Irány: műhely / szerelőcsarnok — aszfalt, acél, figyelmeztető sárga.
   ========================================================================== */
:root {
    --asphalt-900: #1B1D1F;
    --asphalt-700: #2A2D30;
    --asphalt-600: #3B3F43;
    --steel-400:   #7C8790;
    --steel-200:   #C9D0D5;
    --paper-100:   #EEEBE3;
    --paper-50:    #F8F7F3;
    --amber-500:   #E8A33D;
    --amber-600:   #C9871F;
    --rust-600:    #B3502D;
    --ink:         #1B1D1F;
    --ok-600:      #3E7D4C;

    --font-display: 'Roboto Condensed', 'Arial Narrow', sans-serif;
    --font-body:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono:    ui-monospace, 'SF Mono', 'Consolas', 'Courier New', monospace;

    --radius: 3px;
    --shadow-card: 0 1px 2px rgba(27,29,31,.08), 0 4px 14px rgba(27,29,31,.06);
    --container: 1180px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--paper-50);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: var(--rust-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 .5em;
    letter-spacing: .2px;
}
h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); text-transform: uppercase; }
h2 { font-size: clamp(1.3rem, 2.6vw, 1.8rem); }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
:focus-visible { outline: 3px solid var(--amber-500); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- Eyebrow / plate label (aláírás elem: "bélyegzett fémlap" stílusú címke) ---------- */
.plate {
    display: inline-flex;
    gap: .5em;
    align-items: center;
    font-family: var(--font-mono);
    font-size: .72rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--asphalt-700);
    background: var(--paper-100);
    border: 1px solid var(--steel-200);
    border-radius: var(--radius);
    padding: .3em .6em;
}
.plate--dark { background: var(--asphalt-700); color: var(--paper-100); border-color: var(--asphalt-600); }
.plate--amber { background: var(--amber-500); color: var(--asphalt-900); border-color: var(--amber-600); }

/* ---------- Header ---------- */
.site-header {
    background: var(--asphalt-900);
    color: var(--paper-100);
    border-bottom: 4px solid var(--amber-500);
}
.site-header__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    gap: 16px;
}
.site-header__brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.35rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.site-header__brand span { color: var(--amber-500); }
.site-header__brand:hover { text-decoration: none; opacity: .9; }

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--steel-400);
    color: #fff;
    border-radius: var(--radius);
    padding: 8px 10px;
    font-size: 1.1rem;
    cursor: pointer;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}
.site-nav a {
    color: var(--paper-100);
    font-family: var(--font-display);
    font-size: .95rem;
    letter-spacing: .03em;
    text-transform: uppercase;
}
.site-nav a:hover { color: var(--amber-500); text-decoration: none; }
.site-nav select {
    font-family: var(--font-body);
    font-size: .85rem;
    background: var(--asphalt-700);
    color: #fff;
    border: 1px solid var(--steel-400);
    border-radius: var(--radius);
    padding: 7px 8px;
}

/* ---------- Hazard divider (aláírás elem, csak egyszer, a hero alján) ---------- */
.hazard-divider {
    height: 10px;
    background: repeating-linear-gradient(
        135deg,
        var(--amber-500) 0 18px,
        var(--asphalt-900) 18px 36px
    );
}

/* ---------- Hero ---------- */
.hero {
    background: var(--asphalt-700);
    color: var(--paper-100);
    padding: 48px 0 40px;
}
.hero h1 { color: #fff; }
.hero p.lead {
    font-size: 1.1rem;
    max-width: 640px;
    color: var(--steel-200);
}
.hero .btn { margin-top: 8px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .5em;
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: .95rem;
    padding: 12px 22px;
    border-radius: var(--radius);
    border: 2px solid transparent;
    cursor: pointer;
    background: var(--amber-500);
    color: var(--asphalt-900);
}
.btn:hover { background: var(--amber-600); text-decoration: none; }
.btn--ghost { background: transparent; border-color: var(--steel-400); color: inherit; }
.btn--ghost:hover { border-color: var(--amber-500); background: transparent; color: inherit; }
.btn--dark { background: var(--asphalt-900); color: #fff; }
.btn--dark:hover { background: var(--asphalt-700); }
.btn--small { padding: 7px 14px; font-size: .8rem; }
.btn--danger { background: var(--rust-600); color: #fff; }
.btn--danger:hover { background: #963f22; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Layout: content + sidebar ---------- */
.layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 36px 0 56px;
}
@media (min-width: 900px) {
    .layout--with-sidebar { grid-template-columns: 2.1fr 1fr; }
}

/* ---------- County chip grid (homepage) ---------- */
.county-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 10px;
    margin: 20px 0 8px;
}
.county-chip {
    background: #fff;
    border: 1px solid var(--steel-200);
    border-radius: var(--radius);
    padding: 12px 14px;
    font-family: var(--font-display);
    text-transform: uppercase;
    font-size: .9rem;
    color: var(--asphalt-900);
    box-shadow: var(--shadow-card);
}
.county-chip:hover { border-color: var(--amber-500); text-decoration: none; }

/* ---------- Listing card (spec-plate stílusú) ---------- */
.listing-card {
    display: flex;
    gap: 16px;
    background: #fff;
    border: 1px solid var(--steel-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 16px;
    margin-bottom: 16px;
}
.listing-card__photo {
    width: 96px;
    height: 96px;
    flex: none;
    border-radius: var(--radius);
    object-fit: cover;
    background: var(--paper-100);
    border: 1px solid var(--steel-200);
}
.listing-card__body { min-width: 0; }
.listing-card__name { font-family: var(--font-display); font-size: 1.15rem; margin: 0 0 .2em; text-transform: uppercase; }
.listing-card__meta { font-family: var(--font-mono); font-size: .75rem; color: var(--steel-400); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .4em; }
.listing-card__desc { font-size: .92rem; color: var(--asphalt-700); margin-bottom: .5em; }
@media (max-width: 480px) {
    .listing-card { flex-direction: column; }
    .listing-card__photo { width: 100%; height: 160px; }
}

/* ---------- Sidebar ---------- */
.sidebar-box {
    background: #fff;
    border: 1px solid var(--steel-200);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-card);
}
.sidebar-box h2 { font-size: 1rem; text-transform: uppercase; border-bottom: 3px solid var(--amber-500); padding-bottom: .4em; }
.sidebar-box .featured-item { display: block; padding: 8px 0; border-bottom: 1px dashed var(--steel-200); font-family: var(--font-display); text-transform: uppercase; font-size: .92rem; }
.sidebar-box .featured-item:last-child { border-bottom: none; }
.sidebar-box .featured-item small { display: block; font-family: var(--font-mono); text-transform: none; color: var(--steel-400); font-size: .72rem; }

/* ---------- Profile page ---------- */
.profile-head { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 20px; flex-wrap: wrap; }
.profile-head img { width: 130px; height: 130px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--steel-200); }
.profile-contact { list-style: none; margin: 0; padding: 0; font-size: .95rem; }
.profile-contact li { padding: 3px 0; }
.profile-contact strong { display: inline-block; min-width: 90px; font-family: var(--font-mono); font-size: .78rem; text-transform: uppercase; color: var(--steel-400); }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
    margin-top: 16px;
}
.gallery-grid a { display: block; }
.gallery-grid img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--steel-200);
}

/* Egyszerű lightbox (JS kapcsolja be az .is-open osztályt) */
.lightbox {
    position: fixed; inset: 0; background: rgba(27,29,31,.92);
    display: none; align-items: center; justify-content: center;
    z-index: 1000; padding: 24px;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 100%; max-height: 88vh; border-radius: var(--radius); }
.lightbox__close {
    position: absolute; top: 18px; right: 22px; background: none; border: none;
    color: #fff; font-size: 2rem; cursor: pointer; line-height: 1;
}

/* ---------- Forms ---------- */
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-family: var(--font-display); text-transform: uppercase; font-size: .82rem; letter-spacing: .03em; margin-bottom: 5px; }
.form-field input[type=text],
.form-field input[type=email],
.form-field input[type=tel],
.form-field input[type=password],
.form-field input[type=file],
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--steel-200);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: .96rem;
    background: #fff;
    color: var(--ink);
}
.form-field textarea { resize: vertical; min-height: 110px; }
.form-field .hint { font-size: .8rem; color: var(--steel-400); margin-top: 4px; }
.form-check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; margin-bottom: 18px; }
.form-check input { margin-top: 4px; }

.notice {
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 18px;
    font-size: .92rem;
    border: 1px solid transparent;
}
.notice--success { background: #EAF3EC; border-color: #BEDBC4; color: var(--ok-600); }
.notice--error   { background: #FBEAE4; border-color: #EFC3B2; color: var(--rust-600); }
.notice--info    { background: var(--paper-100); border-color: var(--steel-200); color: var(--asphalt-700); }

table.price-table { width: 100%; border-collapse: collapse; background: #fff; box-shadow: var(--shadow-card); border-radius: var(--radius); overflow: hidden; }
table.price-table th, table.price-table td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--steel-200); }
table.price-table th { font-family: var(--font-display); text-transform: uppercase; background: var(--paper-100); }
table.price-table tr:last-child td { border-bottom: none; }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--asphalt-900);
    color: var(--steel-200);
    padding: 32px 0;
    margin-top: 40px;
    font-size: .88rem;
}
.site-footer a { color: var(--paper-100); }
.site-footer .partners { margin-top: 10px; font-size: .8rem; color: var(--steel-400); }

/* ---------- Mobile nav ---------- */
@media (max-width: 780px) {
    .nav-toggle { display: inline-block; }
    .site-nav {
        display: none;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        padding-top: 14px;
        gap: 14px;
    }
    .site-nav.is-open { display: flex; }
    .site-header__bar { flex-wrap: wrap; }
}

/* ==========================================================================
   Admin / partner (belső felület) — világosabb, adattábla-központú felület
   ========================================================================== */
.app-shell { display: flex; min-height: 100vh; }
.app-sidebar {
    width: 220px;
    flex: none;
    background: var(--asphalt-900);
    color: var(--paper-100);
    padding: 20px 0;
}
.app-sidebar__brand { font-family: var(--font-display); text-transform: uppercase; font-weight: 700; padding: 0 20px 18px; border-bottom: 1px solid var(--asphalt-600); margin-bottom: 10px; }
.app-sidebar__brand span { color: var(--amber-500); }
.app-sidebar a { display: block; color: var(--steel-200); padding: 11px 20px; font-size: .92rem; }
.app-sidebar a:hover, .app-sidebar a.is-active { background: var(--asphalt-700); color: #fff; text-decoration: none; }
.app-main { flex: 1; min-width: 0; padding: 28px 30px 60px; }
.app-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; flex-wrap: wrap; gap: 12px; }
.app-topbar h1 { margin: 0; text-transform: none; font-size: 1.5rem; }

@media (max-width: 860px) {
    .app-shell { flex-direction: column; }
    .app-sidebar { width: 100%; display: flex; overflow-x: auto; padding: 10px 0; }
    .app-sidebar__brand { display: none; }
    .app-sidebar a { padding: 10px 14px; white-space: nowrap; }
    .app-main { padding: 20px 16px 50px; }
}

.data-table { width: 100%; border-collapse: collapse; background: #fff; box-shadow: var(--shadow-card); border-radius: var(--radius); overflow: hidden; }
.data-table th, .data-table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--steel-200); font-size: .9rem; vertical-align: middle; }
.data-table th { background: var(--paper-100); font-family: var(--font-display); text-transform: uppercase; font-size: .78rem; letter-spacing: .04em; }
.data-table tr:last-child td { border-bottom: none; }
.data-table-wrap { overflow-x: auto; }

.badge { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: .72rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .04em; }
.badge--green  { background: #EAF3EC; color: var(--ok-600); }
.badge--amber  { background: #FBF1DD; color: var(--amber-600); }
.badge--rust   { background: #FBEAE4; color: var(--rust-600); }
.badge--grey   { background: var(--paper-100); color: var(--steel-400); }

.card { background: #fff; border: 1px solid var(--steel-200); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 20px; margin-bottom: 20px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-box { background: #fff; border: 1px solid var(--steel-200); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-card); }
.stat-box .num { font-family: var(--font-display); font-size: 2rem; }
.stat-box .label { font-size: .8rem; color: var(--steel-400); text-transform: uppercase; letter-spacing: .04em; }

.gallery-manage { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin: 16px 0; }
.gallery-manage figure { margin: 0; background: #fff; border: 1px solid var(--steel-200); border-radius: var(--radius); overflow: hidden; }
.gallery-manage img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.gallery-manage figcaption { display: flex; justify-content: space-between; padding: 6px 8px; }
.gallery-manage form { display: inline; }
.gallery-manage button { background: none; border: none; cursor: pointer; font-size: .95rem; }

.preview-banner {
    background: var(--amber-500);
    color: var(--asphalt-900);
    text-align: center;
    padding: 10px;
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: .04em;
    position: sticky;
    top: 0;
    z-index: 50;
}
