/* ==========================================================================
   Bazar Yall – hlavní stylesheet
   Mobile-first, bez externích fontů a knihoven.
   ========================================================================== */

:root {
    --ink: #14231f;
    --ink-soft: #3c4d47;
    --muted: #61736c;
    --line: #dce6e2;
    --line-strong: #c3d3cd;
    --bg: #f5f8f6;
    --surface: #ffffff;
    --primary: #0f766e;
    --primary-dark: #0b5a54;
    --primary-soft: #e5f4f1;
    --accent: #ea580c;
    --accent-dark: #c2410c;
    --danger: #b91c1c;
    --danger-soft: #fdecec;
    --warning-soft: #fff6e5;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgba(16, 40, 33, .06), 0 8px 24px rgba(16, 40, 33, .06);
    --shadow-sm: 0 1px 2px rgba(16, 40, 33, .08);
    --max: 1200px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--bg);
}

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

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover,
a:focus-visible {
    text-decoration: underline;
}

h1, h2, h3 {
    line-height: 1.2;
    margin: 0 0 .5em;
    letter-spacing: -.015em;
}

h1 { font-size: clamp(1.6rem, 1.25rem + 1.4vw, 2.25rem); }
h2 { font-size: clamp(1.2rem, 1.05rem + .6vw, 1.5rem); }
h3 { font-size: 1.05rem; }

p { margin: 0 0 1rem; }

ul, ol { margin: 0 0 1rem; padding-left: 1.2rem; }

code {
    font-size: .9em;
    background: #eef3f1;
    padding: .1em .35em;
    border-radius: 4px;
}

.container {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 16px;
}

main.container {
    padding-top: 20px;
    padding-bottom: 48px;
    min-height: 55vh;
}

.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 8px;
    z-index: 100;
    background: var(--surface);
    color: var(--ink);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
}

.skip-link:focus {
    left: 8px;
}

/* --------------------------------------------------------------------------
   Tlačítka a odkazy
   -------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 42px;
    padding: 9px 18px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
    white-space: nowrap;
}

.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

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

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

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

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

.btn-ghost {
    background: transparent;
    border-color: var(--line-strong);
    color: var(--ink);
}

.btn-ghost:hover { background: #eef4f2; }

.btn-danger {
    background: transparent;
    border-color: #e9b4b4;
    color: var(--danger);
}

.btn-danger:hover { background: var(--danger-soft); }

.btn-lg {
    min-height: 50px;
    padding: 12px 26px;
    font-size: 1.02rem;
}

.btn-small {
    min-height: 32px;
    padding: 5px 12px;
    font-size: .84rem;
}

.btn-block { width: 100%; }

.link-button {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: var(--primary);
    cursor: pointer;
    text-decoration: underline;
}

.link-danger { color: var(--danger); }

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 16px 0 0;
}

.inline-form { display: inline; margin: 0; }

/* --------------------------------------------------------------------------
   Hlavička
   -------------------------------------------------------------------------- */

.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 40;
}

.header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding-top: 12px;
    padding-bottom: 12px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--ink);
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -.02em;
}

.brand:hover { text-decoration: none; }

.brand-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    font-size: 1.1rem;
}

.brand-text span { color: var(--primary); }

.header-search {
    display: flex;
    flex: 1 1 260px;
    gap: 8px;
    order: 3;
    width: 100%;
}

.header-search input {
    flex: 1;
    min-width: 0;
    min-height: 42px;
    padding: 8px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    font: inherit;
    background: #fbfdfc;
}

.header-search input:focus {
    outline: 2px solid var(--primary);
    outline-offset: 1px;
    border-color: var(--primary);
}

.header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    margin-left: auto;
    font-size: .9rem;
}

.header-link { color: var(--ink-soft); font-weight: 500; }
.header-link:hover { color: var(--primary); }
.header-link-admin { color: var(--accent); }

.header-cta { font-size: .9rem; }

.cat-nav {
    background: var(--surface);
    border-top: 1px solid #eef3f1;
    border-bottom: 1px solid var(--line);
}

.cat-nav-inner {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding-top: 10px;
    padding-bottom: 10px;
    font-size: .9rem;
    scrollbar-width: none;
}

.cat-nav-inner::-webkit-scrollbar { display: none; }

.cat-nav-inner a {
    color: var(--ink-soft);
    white-space: nowrap;
    font-weight: 500;
}

.cat-nav-inner a:hover { color: var(--primary); }
.cat-nav-all { color: var(--primary) !important; margin-left: auto; }

/* --------------------------------------------------------------------------
   Flash zprávy a oznámení
   -------------------------------------------------------------------------- */

.flash,
.notice {
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin: 0 0 16px;
    border: 1px solid transparent;
    font-size: .95rem;
}

.flash-success { background: #e8f7ef; border-color: #b8e6cc; color: #14532d; }
.flash-error { background: var(--danger-soft); border-color: #f3c1c1; color: #7f1d1d; }
.flash-info { background: var(--primary-soft); border-color: #bfe3dc; color: #0c4a44; }

.notice-warning { background: var(--warning-soft); border-color: #f3d9a4; color: #78350f; }
.notice-danger { background: var(--danger-soft); border-color: #f3c1c1; color: #7f1d1d; }
.notice-info { background: var(--primary-soft); border-color: #bfe3dc; color: #0c4a44; }

.notice p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   Formuláře
   -------------------------------------------------------------------------- */

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.field label,
.field legend {
    font-weight: 600;
    font-size: .93rem;
}

.field input,
.field select,
.field textarea,
.admin-actions input[type="text"],
.rating-form input,
.rating-form select {
    width: 100%;
    min-height: 44px;
    padding: 9px 12px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink);
    font: inherit;
}

.field textarea {
    min-height: 180px;
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: 2px solid var(--primary);
    outline-offset: 0;
    border-color: var(--primary);
}

.field-hint {
    margin: 0;
    color: var(--muted);
    font-size: .82rem;
}

.field-error {
    margin: 0;
    color: var(--danger);
    font-size: .85rem;
    font-weight: 600;
}

.required { color: var(--danger); }

.field-narrow { max-width: 220px; }

.field-wide { grid-column: 1 / -1; }

.fieldset {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    margin: 0 0 20px;
    background: #fbfdfc;
}

.fieldset legend {
    padding: 0 8px;
    font-weight: 700;
}

.radio-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.radio-pill {
    position: relative;
    display: inline-flex;
}

.radio-pill input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.radio-pill span {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 7px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--surface);
    font-size: .9rem;
    font-weight: 500;
    cursor: pointer;
}

.radio-pill input:checked + span {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary-dark);
    font-weight: 700;
}

.radio-pill input:focus-visible + span {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
    font-size: .9rem;
}

.checkbox input {
    width: 18px;
    height: 18px;
    margin-top: 3px;
    flex: 0 0 auto;
}

.stack-form > *:last-child { margin-bottom: 0; }

.filters {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.filters-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 12px;
}

.filters-grid .field { margin-bottom: 12px; }
.filters-actions { grid-column: 1 / -1; display: flex; gap: 10px; margin-top: 4px; }

/* --------------------------------------------------------------------------
   Drobečková navigace, hlavička stránky
   -------------------------------------------------------------------------- */

.breadcrumbs {
    font-size: .82rem;
    color: var(--muted);
    margin-bottom: 14px;
}

.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.breadcrumbs li:not(:last-child)::after {
    content: "›";
    margin-left: 6px;
    color: var(--line-strong);
}

.breadcrumbs a { color: var(--muted); }

.page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.page-head h1 { margin-bottom: 6px; }

.page-lead {
    color: var(--ink-soft);
    max-width: 68ch;
    margin: 0;
}

.eyebrow {
    margin: 0 0 6px;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .72rem;
    font-weight: 700;
    color: var(--primary);
}

.result-count {
    margin: 0;
    font-weight: 700;
    color: var(--ink-soft);
    white-space: nowrap;
}

.chip-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.chip {
    display: inline-flex;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    font-size: .86rem;
    color: var(--ink-soft);
}

.chip:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }

.results-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 12px;
    font-size: .9rem;
    color: var(--ink-soft);
}

.results-bar p { margin: 0; }

/* --------------------------------------------------------------------------
   Hero a homepage
   -------------------------------------------------------------------------- */

.hero {
    background: radial-gradient(1200px 500px at 15% -10%, #147f75 0%, transparent 60%),
                linear-gradient(160deg, #0c3b36 0%, #0f5b53 55%, #10736a 100%);
    color: #fff;
    border-radius: 18px;
    padding: 32px 20px;
    margin-bottom: 32px;
}

.hero-content { max-width: 700px; }
.hero .eyebrow { color: #9fe3d8; }
.hero h1 { color: #fff; font-size: clamp(1.8rem, 1.3rem + 2.2vw, 2.8rem); }

.hero-lead {
    color: #d6efeb;
    font-size: 1.02rem;
    max-width: 58ch;
}

.hero-search {
    display: flex;
    gap: 8px;
    margin: 22px 0 14px;
    max-width: 620px;
}

.hero-search input {
    flex: 1;
    min-width: 0;
    min-height: 50px;
    border: 0;
    border-radius: 999px;
    padding: 10px 20px;
    font: inherit;
    background: #fff;
    color: var(--ink);
}

.hero-search input:focus { outline: 3px solid #f8b98f; }

.hero-cta { margin: 0 0 20px; }

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 26px;
    list-style: none;
    padding: 0;
    margin: 0;
    color: #c8e9e4;
    font-size: .86rem;
}

.hero-stats strong { color: #fff; font-size: 1.05rem; display: block; }

.section { margin-bottom: 40px; }

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.section-head h2 { margin: 0; }
.section-link { font-size: .9rem; font-weight: 600; }
.section-note { color: var(--muted); font-size: .85rem; }

.category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-tile {
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: 100%;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--ink);
    box-shadow: var(--shadow-sm);
    transition: border-color .15s ease, transform .15s ease;
}

.category-tile:hover {
    text-decoration: none;
    border-color: var(--primary);
    transform: translateY(-1px);
}

.category-tile-mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-weight: 800;
}

.category-tile-name { font-weight: 700; }

.category-tile-desc {
    font-size: .78rem;
    color: var(--muted);
    display: none;
}

/* --------------------------------------------------------------------------
   Karty inzerátů
   -------------------------------------------------------------------------- */

.listing-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.listing-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.listing-card:hover {
    border-color: var(--line-strong);
    box-shadow: var(--shadow);
}

.listing-card.is-top { border-color: #f0b27a; }

.listing-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
}

.listing-card-link:hover { text-decoration: none; }

.listing-card-media {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #e9f0ed;
}

.listing-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.listing-card-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    min-height: 90px;
    background: linear-gradient(135deg, #e7f1ee, #d5e6e1);
    color: #6f9188;
    font-size: 2rem;
    font-weight: 800;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .04em;
}

.badge-top {
    background: var(--accent);
    color: #fff;
}

.listing-card-media .badge-top {
    position: absolute;
    top: 8px;
    left: 8px;
}

.listing-card-body {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.listing-card-category {
    margin: 0;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted);
}

.listing-card-title {
    margin: 0;
    font-size: .96rem;
    line-height: 1.3;
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.listing-card-price {
    margin: 4px 0 0;
    font-weight: 800;
    color: var(--primary-dark);
}

.listing-card-meta {
    margin: 2px 0 0;
    font-size: .78rem;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

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

/* --------------------------------------------------------------------------
   Jak to funguje
   -------------------------------------------------------------------------- */

.how-grid {
    display: grid;
    gap: 12px;
}

.how-item {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
}

.how-number {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-weight: 800;
    margin-bottom: 10px;
}

.how-item h3 { margin-bottom: 4px; }
.how-item p { margin: 0; color: var(--muted); font-size: .9rem; }

/* --------------------------------------------------------------------------
   Detail inzerátu
   -------------------------------------------------------------------------- */

.listing-layout {
    display: grid;
    gap: 20px;
}

.listing-head { margin-bottom: 16px; }
.listing-cat { margin: 0 0 4px; font-size: .85rem; }

.listing-price {
    font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
    font-weight: 800;
    color: var(--primary-dark);
    margin: 6px 0;
}

.listing-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    color: var(--muted);
    font-size: .88rem;
    margin: 0;
}

.gallery {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 10px;
    margin-bottom: 20px;
}

.gallery-main {
    background: #eef4f2;
    border-radius: var(--radius-sm);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    display: grid;
    place-items: center;
}

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

.gallery-thumbs {
    display: flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    overflow-x: auto;
}

.gallery-thumb {
    padding: 0;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    background: none;
    cursor: pointer;
    overflow: hidden;
    width: 76px;
    height: 58px;
    flex: 0 0 auto;
}

.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb.is-active { border-color: var(--primary); }

.gallery-empty {
    background: var(--surface);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    padding: 40px 20px;
    text-align: center;
    color: var(--muted);
    margin-bottom: 20px;
}

.listing-description {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
}

.prose {
    white-space: pre-line;
    color: var(--ink-soft);
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.owner-box {
    margin-top: 20px;
    background: var(--primary-soft);
    border: 1px solid #bfe3dc;
    border-radius: var(--radius);
    padding: 18px;
}

.owner-box h2 { font-size: 1.1rem; }

.listing-side {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.contact-card,
.seller-card,
.safety-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow-sm);
}

.contact-card h2,
.seller-card h2,
.safety-card h2 { font-size: 1.05rem; margin-bottom: 12px; }

.contact-name { font-weight: 700; margin-bottom: 10px; }

.contact-line {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0 0 12px;
}

.contact-label {
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
}

.contact-value { font-weight: 700; font-size: 1.02rem; }
.contact-value.is-masked { color: var(--muted); letter-spacing: .05em; }

.contact-hint {
    margin: 12px 0 0;
    font-size: .78rem;
    color: var(--muted);
    border-top: 1px solid var(--line);
    padding-top: 10px;
}

.seller-name { margin: 0 0 4px; font-weight: 700; }
.seller-rating { margin: 0 0 6px; display: flex; gap: 8px; flex-wrap: wrap; font-size: .9rem; }

.stars { color: #d97706; letter-spacing: .08em; }

.safety-card ul { margin: 0; padding-left: 18px; font-size: .86rem; color: var(--muted); }
.safety-card li { margin-bottom: 6px; }

.ratings-section { margin-top: 32px; }

.rating-form {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
}

.rating-form h3 { font-size: 1rem; }

.rating-form-row {
    display: grid;
    gap: 8px;
}

.rating-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.rating-item {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
}

.rating-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; margin: 0 0 4px; font-size: .9rem; }
.rating-item p { margin: 0 0 4px; }
.rating-source { font-size: .78rem; }

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */

.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 24px;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    min-height: 38px;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink-soft);
    font-size: .9rem;
}

.page-link:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.page-link.is-current { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }
.page-gap { color: var(--muted); padding: 0 2px; }

/* --------------------------------------------------------------------------
   Přihlášení, registrace, účet
   -------------------------------------------------------------------------- */

.auth-wrap {
    display: flex;
    justify-content: center;
    padding: 20px 0 40px;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 22px;
    box-shadow: var(--shadow);
}

.auth-card h1 { font-size: 1.6rem; }
.auth-alt { margin-top: 18px; font-size: .9rem; text-align: center; }

.two-col {
    display: grid;
    gap: 18px;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 18px;
}

.panel h2 { font-size: 1.1rem; }
.panel-narrow { max-width: 640px; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

/* --------------------------------------------------------------------------
   Profil
   -------------------------------------------------------------------------- */

.profile-head {
    display: flex;
    gap: 16px;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 24px;
}

.profile-avatar {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 1.6rem;
    font-weight: 800;
}

.profile-head h1 { margin-bottom: 4px; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; margin: 0; font-size: .9rem; color: var(--ink-soft); }

.static-page {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    max-width: 860px;
}

.static-page h2 { margin-top: 1.4em; }
.static-page ul, .static-page ol { color: var(--ink-soft); }
.static-page li { margin-bottom: 6px; }

.faq dt { font-weight: 700; margin-top: 14px; }
.faq dd { margin: 4px 0 0; color: var(--ink-soft); }

.contact-block {
    background: #fbfdfc;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 20px;
}

/* --------------------------------------------------------------------------
   Wizard (vkládání inzerátu)
   -------------------------------------------------------------------------- */

.wizard { max-width: 820px; margin: 0 auto; }

.wizard-progress {
    display: flex;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    font-size: .8rem;
    color: var(--muted);
}

.wizard-progress li {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    padding: 8px 6px;
    border-bottom: 3px solid var(--line);
}

.wizard-progress li.is-current { color: var(--primary-dark); border-color: var(--primary); font-weight: 700; }
.wizard-progress li.is-done { color: var(--primary); border-color: #9fd3ca; }

.wizard-num {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--line);
    color: var(--ink-soft);
    font-size: .75rem;
    font-weight: 800;
    flex: 0 0 auto;
}

.wizard-progress li.is-current .wizard-num,
.wizard-progress li.is-done .wizard-num { background: var(--primary); color: #fff; }

.wizard-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.wizard-card > h1 { font-size: 1.6rem; }

.counter { color: var(--muted); font-variant-numeric: tabular-nums; }

.photo-manager {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}

.photo-item {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
    background: #fbfdfc;
}

.photo-item img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    border-radius: 6px;
}

.upload-form {
    border-top: 1px solid var(--line);
    padding-top: 14px;
}

.upload-form .field input[type="file"] {
    padding: 8px;
    background: #fbfdfc;
}

.summary-list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.summary-list > div {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 10px;
    padding: 9px 12px;
    border-bottom: 1px solid var(--line);
    font-size: .9rem;
}

.summary-list > div:last-child { border-bottom: 0; }
.summary-list dt { color: var(--muted); }
.summary-list dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.summary-compact > div { grid-template-columns: 1fr auto; }

.summary-description {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 16px;
}

.summary-description summary { cursor: pointer; font-weight: 700; margin-bottom: 8px; }

/* --------------------------------------------------------------------------
   Moje inzeráty
   -------------------------------------------------------------------------- */

.stat-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.stat {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
}

.stat strong { display: block; font-size: 1.5rem; color: var(--primary-dark); line-height: 1.1; }
.stat span { font-size: .8rem; color: var(--muted); }

.my-listings { display: grid; gap: 12px; }

.my-listing {
    display: flex;
    gap: 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
}

.my-listing-media { flex: 0 0 92px; }
.my-listing-media img,
.my-listing-media .listing-card-placeholder {
    width: 92px;
    height: 72px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    font-size: 1.4rem;
}

.my-listing-body { flex: 1; min-width: 0; }
.my-listing-body h2 { font-size: 1rem; margin: 4px 0; }
.my-listing-body h2 a { color: var(--ink); }
.my-listing-body p { margin: 0 0 4px; font-size: .84rem; }
.my-listing-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.my-listing .button-row { margin-top: 8px; }

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    white-space: nowrap;
}

.status-active { background: #e8f7ef; color: #166534; }
.status-pending { background: var(--warning-soft); color: #92400e; }
.status-rejected { background: var(--danger-soft); color: #991b1b; }
.status-deleted { background: #eef0ef; color: #4b5563; }

.two-col-wide { align-items: start; }

/* --------------------------------------------------------------------------
   Administrace
   -------------------------------------------------------------------------- */

.admin-head { margin-bottom: 12px; }

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 8px;
    margin-bottom: 20px;
}

.admin-nav a {
    padding: 7px 13px;
    border-radius: 999px;
    color: var(--ink-soft);
    font-size: .88rem;
    font-weight: 600;
}

.admin-nav a:hover { background: var(--primary-soft); text-decoration: none; }
.admin-nav a.is-active { background: var(--primary); color: #fff; }
.admin-nav a.admin-nav-site { margin-left: auto; color: var(--muted); font-weight: 500; }

.admin-pending-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.admin-pending-item { border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.admin-pending-item:last-child { border-bottom: 0; padding-bottom: 0; }
.admin-pending-title { margin: 0; font-weight: 700; }

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: flex-start;
    margin-top: 6px;
}

.admin-actions input[type="text"] {
    min-height: 32px;
    padding: 4px 8px;
    width: auto;
    min-width: 130px;
    font-size: .82rem;
}

.admin-reject-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.admin-more { position: relative; }
.admin-more summary { list-style: none; cursor: pointer; }
.admin-more summary::-webkit-details-marker { display: none; }

.admin-more-form {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
    padding: 8px;
    background: #fbfdfc;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}

.admin-table-wrap {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .88rem;
    min-width: 860px;
}

.admin-table th,
.admin-table td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.admin-table th {
    background: #f9fbfa;
    font-size: .76rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted);
}

.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table td p { margin: 0; }
.admin-table-compact { min-width: 0; }
.admin-table-compact th, .admin-table-compact td { padding: 8px 10px; }

.audit-mini { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .84rem; }
.audit-mini li { border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.audit-mini li:last-child { border-bottom: 0; }

.cat-admin-tree,
.cat-admin-children { list-style: none; padding: 0; margin: 0; }

.cat-admin-item {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 10px 12px;
    margin-bottom: 8px;
}

.cat-admin-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
    justify-content: space-between;
}

.cat-admin-name { display: flex; flex-direction: column; min-width: 0; }
.cat-admin-name strong { overflow-wrap: anywhere; }
.cat-admin-children { margin: 8px 0 0 16px; padding-left: 10px; border-left: 2px solid var(--line); }
.cat-admin-children .cat-admin-item { background: #fbfdfc; }
.cat-admin-state { margin-left: auto; }

/* --------------------------------------------------------------------------
   Chybová stránka
   -------------------------------------------------------------------------- */

.error-page {
    text-align: center;
    padding: 50px 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.error-code {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--primary-soft);
    margin: 0;
    line-height: 1;
    -webkit-text-stroke: 2px var(--primary);
}

.error-page .button-row { justify-content: center; }

/* --------------------------------------------------------------------------
   Zápatí
   -------------------------------------------------------------------------- */

.site-footer {
    background: #0f2b27;
    color: #c9ddd7;
    padding-top: 32px;
    font-size: .9rem;
}

.footer-grid {
    display: grid;
    gap: 22px;
    padding-bottom: 24px;
}

.footer-brand { color: #fff; font-weight: 800; font-size: 1.15rem; margin-bottom: 6px; }
.site-footer .muted { color: #93ada6; }
.footer-heading { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 8px; }
.footer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer-list a { color: #c9ddd7; }
.footer-list a:hover { color: #fff; }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .12);
    padding-top: 14px;
    padding-bottom: 22px;
    font-size: .78rem;
}

.footer-bottom p { margin: 0 0 4px; }

/* --------------------------------------------------------------------------
   Responzivní úpravy
   -------------------------------------------------------------------------- */

@media (min-width: 600px) {
    .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .category-tile-desc { display: block; }
    .listing-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
    .how-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .stat-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .filters-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .two-col { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
    .photo-manager { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .profile-head { padding: 22px; }
}

@media (min-width: 860px) {
    main.container { padding-top: 28px; }

    .header-inner { flex-wrap: nowrap; gap: 18px; }
    .header-search { order: 0; flex: 1 1 auto; max-width: 520px; }
    .hero { padding: 52px 40px; }
    .category-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .listing-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

    .listing-layout {
        grid-template-columns: minmax(0, 1fr) 320px;
        align-items: start;
        gap: 24px;
    }

    .listing-side { position: sticky; top: 120px; }

    .filters-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

    .wizard-card { padding: 28px; }
    .wizard-progress { font-size: .88rem; }

    .two-col-wide { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }

    .my-listings { gap: 14px; }
    .my-listing-media { flex-basis: 140px; }
    .my-listing-media img, .my-listing-media .listing-card-placeholder { width: 140px; height: 100px; }

    .rating-form-row { grid-template-columns: auto 200px 1fr auto; align-items: center; }
    .rating-form-row label { white-space: nowrap; }
}

@media (min-width: 1100px) {
    .listing-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 380px) {
    .header-actions { font-size: .82rem; gap: 6px 10px; }
    .header-cta { padding: 7px 12px; }
    .listing-grid { grid-template-columns: 1fr; }
}
