:root {
    --ink: #14171f;
    --ink-2: #1c202b;
    --paper: #f4f2ec;
    --text: #1c1c1a;
    --muted: #6b6a63;
    --border: #e2dfd3;
    --border-strong: #d8d5c9;
    --accent: #b48a2e;
    --accent-bg: #faeeda;
    --accent-text: #543d0b;
}

* { box-sizing: border-box; }

body {
    font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--paper);
    color: var(--text);
    margin: 0;
    padding: 0;
}

/* ---------- hero pás ---------- */

.hero {
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    background:
        radial-gradient(circle at 88% 15%, rgba(186,117,23,0.22), transparent 38%),
        radial-gradient(circle at 96% 55%, rgba(83,74,183,0.18), transparent 35%),
        radial-gradient(circle at 80% 85%, rgba(216,90,48,0.16), transparent 38%),
        linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 100%);
    color: #fff;
    padding: 1.25rem 1.25rem 0.75rem;
    min-height: 220px;
    display: flex;
    align-items: center;
}

.hero > .hero-inner {
    width: 100%;
}

.lang-switch {
    position: absolute;
    top: 18px;
    right: 20px;
    z-index: 3;
    display: flex;
    gap: 4px;
}

.lang-switch a {
    font-size: 12px;
    padding: 3px 9px;
    border-radius: 6px;
    text-decoration: none;
}

.hero-fan {
    position: absolute;
    z-index: 1;
    top: 50%;
    right: -10px;
    transform: translateY(-50%);
    width: 300px;
    height: 210px;
    pointer-events: none;
}

.fan-card {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 112px;
    height: 156px;
    border-radius: 10px;
    border: 2px solid rgba(255,255,255,0.22);
    box-shadow: 0 16px 36px rgba(0,0,0,0.45);
}

.fan-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    background: linear-gradient(155deg, rgba(255,255,255,0.22), transparent 55%);
}

.fan-1 { background: linear-gradient(160deg, #55400a, #1c1c1a); transform: translate(-70%, -58%) rotate(-16deg); }
.fan-2 { background: linear-gradient(160deg, #3a3287, #1c1c1a); transform: translate(-40%, -50%) rotate(-5deg); }
.fan-3 { background: linear-gradient(160deg, #6b2712, #1c1c1a); transform: translate(-10%, -52%) rotate(6deg); }
.fan-4 { background: linear-gradient(160deg, #06493d, #1c1c1a); transform: translate(20%, -60%) rotate(16deg); }

@media (max-width: 860px) {
    .hero-fan { display: none; }
}

.hero-inner {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 40px;
    font-weight: 700;
    margin: 0 0 8px;
    letter-spacing: -0.01em;
}

.hero .subtitle {
    color: #b7b6ae;
    font-size: 17px;
    margin: 0 0 1.5rem;
    max-width: 640px;
}

/* ---------- layout ---------- */

.wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
}

/* ---------- tabs (v hero) ---------- */

.tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 10px 18px;
    border: 1px solid rgba(255,255,255,0.28);
    background: rgba(255,255,255,0.06);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    color: #fff;
}

.tab-btn.active {
    border: 2px solid var(--accent);
    background: var(--accent-bg);
    color: var(--accent-text);
}

/* ---------- filtr her ---------- */

.game-filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.game-chip {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    background: #fff;
    text-decoration: none;
}

.game-chip.active {
    border: 2px solid var(--accent);
    background: var(--accent-bg);
    color: var(--accent-text);
}

.search-form { margin-bottom: 1.25rem; }

/* ---------- formulářové prvky ---------- */

input[type=text], input[type=email], input[type=tel], input[type=number], input[type=password], input[type=file], select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    color: var(--text);
}

input[type=file] { padding: 6px; background: transparent; border: none; }

label {
    font-size: 13px;
    color: var(--muted);
    display: block;
    margin-bottom: 4px;
}

.field { margin-bottom: 14px; }

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

button.primary {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    background: var(--ink);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

button.primary:hover { background: #2a2e38; }

.card-form {
    max-width: 560px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.5rem;
}

/* ---------- katalog karet ---------- */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 16px;
    margin-top: 0.5rem;
}

.card {
    position: relative;
    background: #fff;
    border: 1px solid var(--border);
    border-top: 3px solid var(--border-strong);
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow .15s ease, transform .15s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -160%;
    width: 55%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.55), transparent);
    transform: skewX(-20deg);
    transition: left .55s ease;
    pointer-events: none;
}

.card:hover::after { left: 160%; }

.card:hover {
    box-shadow: 0 8px 20px rgba(20,23,31,0.10);
    transform: translateY(-2px);
}

.card-image {
    width: 100%;
    aspect-ratio: 5 / 7;
    background: #efede4;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-image .no-photo {
    font-size: 12px;
    color: #a5a398;
}

.card-body { padding: 0.85rem 1rem 1rem; display: flex; flex-direction: column; flex: 1; }

.card-body .name { font-size: 15px; font-weight: 600; margin: 10px 0 2px; }
.card-body .meta { font-family: monospace; font-size: 12px; color: var(--muted); margin: 0 0 10px; }
.card-body .price { font-family: monospace; font-size: 17px; font-weight: 600; margin: 10px 0 0; margin-top: auto; padding-top: 10px; }

.badge {
    display: inline-block;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 6px;
    margin-right: 4px;
}

.badge-cond { background: #e1f5ee; color: #04342c; }
.badge-lang { background: #efede4; color: #6b6a63; }

.badge-finish-normal { background: #efede4; color: #6b6a63; }
.badge-finish-holo { background: linear-gradient(120deg, #fceec7, #fff6e0); color: #7a5a06; border: 1px solid #eec97a; }
.badge-finish-reverse-holo { background: linear-gradient(120deg, #e6e9fb, #f3e6fb); color: #4b3d8a; border: 1px solid #b7a8e8; }
.badge-finish-reverse-holo-energy { background: linear-gradient(120deg, #e6e9fb, #f3e6fb); color: #4b3d8a; border: 1px solid #b7a8e8; }
.badge-finish-reverse-holo-pokeball { background: linear-gradient(120deg, #e6e9fb, #f3e6fb); color: #4b3d8a; border: 1px solid #b7a8e8; }

.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
}

.page-link.active {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

.page-link:hover:not(.active) {
    border-color: var(--accent);
}

.page-dots {
    color: var(--muted);
    padding: 0 4px;
}

.hint {
    font-size: 13px;
    color: #8a887f;
    margin-top: 1.5rem;
}

.hint a { color: var(--accent); }

/* ---------- notifikace ---------- */

.notice {
    background: #eaf3de;
    color: #27500a;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 1.25rem;
}

.error {
    background: #fcebeb;
    color: #791f1f;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 1.25rem;
}

/* ---------- autocomplete ---------- */

.autocomplete-box { position: relative; }

.autocomplete-results {
    position: absolute;
    z-index: 10;
    background: #fff;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    width: 100%;
    max-height: 220px;
    overflow-y: auto;
    display: none;
}

.autocomplete-results div {
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
}

.autocomplete-results div:hover { background: var(--paper); }

/* ---------- admin ---------- */

table.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 1rem;
    min-width: 640px;
}

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

table.admin-table th { color: var(--muted); font-weight: 500; }

.status-pill {
    display: inline-block;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 6px;
    background: #efede4;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1.5rem;
}

.topbar a { font-size: 15px; color: var(--muted); text-decoration: none; }

/* ---------- mobil ---------- */

@media (max-width: 640px) {
    .hero { padding: 1.75rem 1rem 1.25rem; }
    .hero h1 { font-size: 28px; }
    .hero .subtitle { font-size: 15px; }
    .wrap { padding: 1.5rem 1rem 3rem; }
    .field-row { grid-template-columns: 1fr; }
    .grid { grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)); gap: 10px; }
    .card-body { padding: 0.65rem 0.75rem 0.75rem; }
    .card-body .name { font-size: 13px; margin-top: 8px; }
    .card-body .price { font-size: 15px; }
    .tab-btn { padding: 9px 14px; font-size: 13px; }
    .card-form { padding: 1.1rem; }
    table.admin-table { font-size: 12px; }
}
