/* CenaKatalogowa.pl – public site. Plain CSS, mobile-first, no build step. */
:root {
    --bg: #10151c;
    --surface: #171e28;
    --surface-2: #1e2733;
    --line: #2a3441;
    --text: #eef1f5;
    --muted: #9aa7b8;
    --accent: #ffd21f;
    --accent-ink: #10151c;
    --accent-soft: rgba(255, 210, 31, 0.12);
    --radius: 10px;
    --gutter: 16px;
    --max: 960px;
    --font: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 400 17px/1.5 var(--font);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1; padding-bottom: 48px; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

img { max-width: 100%; height: auto; }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 10px; padding-bottom: 10px; }
.logo { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.logo img { border-radius: 10px; display: block; }
.logo__text { font-weight: 700; font-size: 24px; letter-spacing: -0.01em; }
.logo__text b { color: var(--accent); }
.logo__pl { color: var(--muted); font-weight: 500; }
.site-header__tag { display: none; margin: 0; color: var(--muted); font-size: 15px; }

/* Hero */
.hero {
    position: relative;
    height: clamp(120px, 22vw, 250px);
    margin-top: 20px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #0e1729;
}
.hero img {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: max(100%, 680px);
    max-width: none;
    height: auto;
}

/* Filters */
.filters { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; margin: 20px 0 8px; }
.filters__q { grid-column: 1 / -1; }
.filters input, .filters select, .filters button {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    font: inherit;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.filters select { appearance: auto; }
.filters input::placeholder { color: var(--muted); }
.filters button {
    grid-column: 1 / -1;
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
    font-weight: 700;
    cursor: pointer;
}
.filters button:hover { background: #ffdf4d; }
.filters__reset { grid-column: 1 / -1; text-align: center; font-size: 15px; }

/* Brands and models */
.brand { margin-top: 32px; }
.brand__name {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 12px;
    font-size: 22px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.brand__name::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.models { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: 1fr; }

.model-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px 12px;
    align-items: baseline;
    padding: 14px 16px;
    color: var(--text);
    text-decoration: none;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    transition: background 0.15s, transform 0.15s;
}
.model-card:hover { background: var(--surface-2); transform: translateY(-1px); color: var(--text); }
.model-card__name { font-size: 20px; font-weight: 700; }
.model-card__price { color: var(--accent); font-weight: 700; font-size: 19px; text-align: right; font-variant-numeric: tabular-nums; }
.model-card__price small { color: var(--muted); font-weight: 400; font-size: 14px; }
.model-card__date { grid-column: 1 / -1; color: var(--muted); font-size: 14px; }

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

/* Price list page (release and model) */
.price-list { padding-top: 16px; }

.newer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 16px;
    padding: 12px 16px;
    color: var(--accent-ink);
    background: var(--accent);
    border-radius: var(--radius);
    font-weight: 700;
    text-decoration: none;
}
.newer:hover { color: var(--accent-ink); background: #ffdf4d; }

.pl-head { padding: 8px 0 4px; }
.crumbs { color: var(--muted); font-size: 15px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--text); }
.pl-head h1 { margin: 4px 0 6px; font-size: clamp(28px, 6vw, 40px); line-height: 1.1; font-weight: 700; letter-spacing: -0.01em; }
.pl-head__dates { margin: 0; color: var(--muted); font-size: 15px; }
.pl-head__dates span + span::before { content: "·"; margin: 0 8px; color: #5b6878; }
.pl-head__from { margin: 10px 0 14px; color: var(--accent); font-size: clamp(26px, 5vw, 34px); font-weight: 700; font-variant-numeric: tabular-nums; }
.btn-video {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--accent-ink);
    background: var(--accent);
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
}
.btn-video:hover { color: var(--accent-ink); background: #ffdf4d; }

.pl-section { margin-top: 32px; }
.pl-section h2 {
    margin: 0 0 12px;
    color: var(--accent);
    font-size: 17px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.note { margin: 8px 0 0; color: var(--muted); font-size: 14px; }

/* Price table: scrolls sideways on phones, version column stays put */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.price-table { width: 100%; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
.price-table th, .price-table td { padding: 10px 14px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
.price-table tbody tr:last-child > * { border-bottom: 0; }
.price-table thead th { color: var(--muted); font-size: 14px; font-weight: 500; vertical-align: bottom; white-space: normal; min-width: 7.5em; }
.price-table th:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    text-align: left;
    background: var(--surface);
    box-shadow: 1px 0 0 var(--line);
    min-width: 0;
}
.price-table tbody th { font-weight: 700; }
.price-table tbody tr:hover > * { background: var(--surface-2); }
.price-table .na { color: #4b5563; }
.price--promo { display: block; color: var(--accent); font-weight: 700; }
.price--list { display: block; color: var(--muted); font-size: 14px; }

/* Version cards */
.versions { display: grid; gap: 10px; grid-template-columns: 1fr; }
.version { padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.version__name { margin: 0; font-size: 20px; font-weight: 700; }
.version__from { margin: 0 0 6px; color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.version__summary { margin: 0; color: var(--muted); font-size: 15px; }
.version__adds-label { margin: 10px 0 4px; font-size: 14px; color: var(--muted); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pills li { padding: 2px 8px; font-size: 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; }

/* Packages, promotions, videos, lists */
.packages, .promotions, .videos, .link-list, .history { margin: 0; padding: 0; list-style: none; }
.package, .promotion { padding: 12px 0; border-bottom: 1px solid var(--line); }
.package:first-child, .promotion:first-child { padding-top: 0; }
.package p, .promotion p { margin: 0; }
.package__head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.package__name { font-weight: 700; }
.package__price { color: var(--accent); font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.package__items { color: var(--muted); font-size: 15px; }
.package__in { margin-top: 4px !important; font-size: 14px; }
.promotion__meta { color: var(--muted); font-size: 14px; }

.panel { padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius); }
.changes__note > :first-child { margin-top: 0; }
.changes__note > :last-child { margin-bottom: 4px; }
.changes__meta { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.btn-link { font-weight: 700; text-decoration: none; }

.videos { display: grid; gap: 8px; }
.video {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0 12px;
    padding: 10px 14px;
    color: var(--text);
    text-decoration: none;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.video:hover { color: var(--text); background: var(--surface-2); }
.video__icon { grid-row: span 2; align-self: center; color: var(--accent); }
.video__meta { color: var(--muted); font-size: 14px; }

.link-list li, .history li { border-bottom: 1px solid var(--line); }
.link-list a { display: block; padding: 10px 0; text-decoration: none; font-weight: 500; }
.history a {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0 12px;
    padding: 10px 0;
    color: var(--text);
    text-decoration: none;
    font-variant-numeric: tabular-nums;
}
.history a:hover { color: var(--accent); }
.history__date { font-weight: 700; }
.history__my { grid-row: 2; color: var(--muted); font-size: 14px; }
.history__from { grid-row: span 2; align-self: center; color: var(--accent); font-weight: 700; }
.history__item--current .history__date::after { content: " · aktualny"; color: var(--muted); font-weight: 400; font-size: 14px; }

/* Comparison (X vs Y) */
.compare { padding-top: 16px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.toggle { display: flex; align-items: center; gap: 10px; margin: 16px 0 8px; font-size: 15px; }
.toggle[hidden], .cmp [hidden] { display: none; }
.toggle input { width: 18px; height: 18px; accent-color: var(--accent); }

.cmp { margin-top: 8px; font-variant-numeric: tabular-nums; }
.cmp__head, .cmp .row { display: grid; grid-template-columns: 38% 31% 31%; }
.cmp__head {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 8px 0;
    background: var(--bg);
    border-bottom: 2px solid var(--accent);
    font-weight: 700;
}
.cmp__head > div:nth-child(n+2), .cmp .row > div:nth-child(n+2) { text-align: right; padding-right: 6px; }
.cmp__head a { color: var(--text); text-decoration: none; }
.cmp__head a:hover { color: var(--accent); }
.cmp__head .meta { display: block; color: var(--muted); font-size: 14px; font-weight: 400; }
.cmp .row { gap: 0 4px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.cmp .row > div:first-child { padding-left: 4px; overflow-wrap: anywhere; }
.cmp .row.diff { background: rgba(255, 210, 31, 0.14); }
.cmp__sub { display: block; color: var(--muted); font-size: 14px; }
.cmp .no-data { color: #6b7684; font-style: italic; }
.cmp .status-brak { color: var(--text); }
.cmp__section h2 {
    margin: 24px 0 6px;
    color: var(--accent);
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.cmp__category { margin: 14px 0 2px; color: var(--muted); font-size: 14px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }
.cmp__version { display: inline-flex; gap: 8px; margin-bottom: 6px; }
.cmp__version select, .picker select, .cmp__version button, .picker button {
    min-height: 40px;
    padding: 0 10px;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
}
.cmp__note { margin: 4px 0 8px; color: var(--muted); font-size: 14px; }
.cmp__nodiff { margin: 8px 0; color: var(--muted); font-style: italic; }
.cmp.only-diff .row:not(.diff), .cmp .is-empty { display: none; }

.picker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.picker label { flex: 1 0 100%; color: var(--muted); font-size: 15px; }
.picker button { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); font-weight: 700; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 24px 0 32px; color: var(--muted); font-size: 14px; background: #0c1015; }
.site-footer p { margin: 0 0 8px; max-width: 70ch; }
.site-footer__meta { color: #6f7c8d; }

@media (min-width: 640px) {
    body { font-size: 18px; }
    .site-header__tag { display: block; }
    .filters { grid-template-columns: 2fr 1fr 1fr auto; }
    .filters__q { grid-column: auto; }
    .filters button { grid-column: auto; width: auto; padding: 0 24px; }
    .filters__reset { grid-column: 1 / -1; text-align: left; }
    .models { grid-template-columns: repeat(2, 1fr); }
    .versions { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
    .models { grid-template-columns: repeat(3, 1fr); }
    .versions { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    .model-card { transition: none; }
}

.price-chart { display: block; max-width: 100%; height: auto; border-radius: 8px; }
