/* ============================================================
   ZORIA Biotech — Sklep / Shop
   Wspólny arkusz stylów
   ============================================================ */

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300 900;
    font-display: swap;
    src: url('fonts/inter-latin-ext-var.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300 900;
    font-display: swap;
    src: url('fonts/inter-latin-var.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('fonts/space-grotesk-latin-ext-var.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('fonts/space-grotesk-latin-var.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

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

:root {
    /* ── POWIERZCHNIE ── */
    --bg:         #080a0b;
    --surface:    #0e1214;
    --surface2:   #12171a;

    /* ── MARKA ── */
    --accent:     #52e034;
    --accent2:    #c8e6b0;

    /* ── STANY SEMANTYCZNE ── */
    --warn:       #e0b25c;
    --danger:     #d47a6a;

    /* ── TEKST ── */
    --text:       #eef0f2;
    --dim:        #8a9299;
    --dimmer:     #7b848a;

    /* ── KRAWĘDZIE ── */
    --border:       rgba(82, 224, 52, 0.22);
    --line:         rgba(255, 255, 255, 0.07);
    --line-control: #5b6266;

    /* ── PRZEZROCZYSTE WARSTWY MARKI ── */
    --accent-wash:  rgba(82, 224, 52, 0.05);
    --accent-tint:  rgba(82, 224, 52, 0.08);
    --accent-fill:  rgba(82, 224, 52, 0.12);
    --accent-solid: rgba(82, 224, 52, 0.22);
    --white-wash:   rgba(255, 255, 255, 0.03);
    --white-tint:   rgba(255, 255, 255, 0.05);
    --white-fill:   rgba(255, 255, 255, 0.09);

    /* ── STAN WYŁĄCZONY ── */
    --disabled-bg: #5f676d;
    --disabled-fg: #22262a;

    /* ── SKALA ODSTĘPÓW ── */
    --sp-1:  2px;
    --sp-2:  4px;
    --sp-3:  8px;
    --sp-4:  12px;
    --sp-5:  16px;
    --sp-6:  20px;
    --sp-7:  24px;
    --sp-8:  28px;
    --sp-9:  32px;
    --sp-10: 36px;
    --sp-11: 40px;
    --sp-12: 52px;
    --sp-13: 80px;

    /* ── WYMIARY ── */
    --nav-h:     66px;
    --radius:    12px;
    --focus:     #c8e6b0;
    --tap:       44px;
}

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, sans-serif;
    line-height: 1.65;
    font-size: 15px;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

/* ─────────── FOKUS KLAWIATURY ─────────── */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
    border-radius: 6px;
}
.btn:focus-visible, .cart-btn:focus-visible, .doc-item:focus-visible,
.prod-tile a:focus-visible, .nav-links a:focus-visible, .mobile-nav a:focus-visible {
    border-radius: 8px;
}
.btn-primary:focus-visible {
    outline-color: #080a0b;
    box-shadow: 0 0 0 4px var(--focus);
}
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 1px;
}

/* ─────────── SKIP LINK ─────────── */
.skip-link {
    position: absolute; left: 12px; top: 12px; z-index: 999;
    transform: translateY(-150%);
    background: var(--accent); color: #080a0b;
    padding: var(--sp-4) var(--sp-5); border-radius: 8px;
    font-size: 0.78rem; font-weight: 700; letter-spacing: 1px;
    text-transform: uppercase; text-decoration: none;
    transition: transform .18s ease-out;
}
.skip-link:focus { transform: translateY(0); }

/* ─────────── NAV ─────────── */
.shop-nav {
    position: sticky; top: 0; z-index: 500;
    height: var(--nav-h);
    display: flex; align-items: center; gap: var(--sp-6);
    padding: 0 clamp(var(--sp-4), 4vw, var(--sp-11));
    background: rgba(8, 10, 11, 0.97);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

.nav-logo {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700; font-size: 1.05rem;
    letter-spacing: 0.5px; text-decoration: none;
    display: flex; align-items: center; gap: var(--sp-3); flex-shrink: 0;
}
.nav-logo span { color: var(--accent); }
.nav-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--accent); box-shadow: 0 0 9px var(--accent);
}

.nav-links { display: flex; gap: var(--sp-1); margin-left: auto; align-items: center; }
.nav-links a {
    color: var(--dim); text-decoration: none;
    font-size: 0.76rem; font-weight: 600;
    letter-spacing: 1.2px; text-transform: uppercase;
    padding: var(--sp-3) var(--sp-4); border-radius: 6px;
    transition: color .2s, background .2s; white-space: nowrap;
}
.nav-links a:hover { color: var(--text); background: var(--white-tint); }
.nav-links a.active { color: var(--accent); }

.nav-tools { display: flex; align-items: center; gap: var(--sp-3); margin-left: var(--sp-4); }

.lang-switch { display: flex; border: 1px solid var(--line-control); border-radius: 6px; overflow: hidden; }
.lang-switch button {
    background: none; border: none; color: var(--dimmer);
    font: 700 0.68rem/1 'Inter', sans-serif; letter-spacing: 1px;
    padding: var(--sp-3) var(--sp-3); cursor: pointer; transition: color .2s, background .2s;
}
.lang-switch button.active { color: var(--accent); background: var(--accent-fill); }
.lang-switch button:not(.active):hover { color: var(--text); background: var(--white-tint); }

.cart-btn {
    position: relative; display: flex; align-items: center; gap: var(--sp-3);
    background: var(--accent-fill); border: 1px solid var(--border);
    color: var(--accent); text-decoration: none;
    padding: var(--sp-3) var(--sp-4); border-radius: 7px;
    font-size: 0.76rem; font-weight: 700; letter-spacing: 1px;
    transition: background .2s;
}
.cart-btn:hover { background: var(--accent-solid); }
.cart-count {
    background: var(--accent); color: #080a0b;
    font-size: 0.66rem; font-weight: 800;
    min-width: 18px; height: 18px; border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0 var(--sp-2);
}

.nav-burger {
    display: none; flex-direction: column; gap: var(--sp-2);
    padding: var(--sp-3); cursor: pointer; border-radius: 6px; background: none; border: none;
}
.nav-burger:hover { background: var(--white-tint); }
.nav-burger span { display: block; width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; }
.nav-burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-nav {
    display: none; position: fixed; inset: var(--nav-h) 0 0 0;
    background: rgba(8,10,11,.99); z-index: 499;
    flex-direction: column; padding: var(--sp-7); gap: var(--sp-2);
    overflow-y: auto;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity .25s, visibility .25s;
}
.mobile-nav.open { opacity: 1; visibility: visible; pointer-events: all; }
.mobile-nav a {
    color: var(--dim); text-decoration: none;
    font-size: 1rem; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
    padding: var(--sp-5) var(--sp-5); border-radius: 9px; border-bottom: 1px solid var(--line);
}
.mobile-nav a.active { color: var(--accent); }

/* ─────────── LAYOUT ─────────── */
main { flex: 1 0 auto; }

.container {
    max-width: 1180px; margin: 0 auto;
    padding: clamp(var(--sp-8), 5vw, var(--sp-12)) clamp(var(--sp-4), 4vw, var(--sp-9)) var(--sp-13);
}
.container.narrow { max-width: 820px; }

.page-head { margin-bottom: var(--sp-9); }
.eyebrow {
    font-size: 0.68rem; font-weight: 700;
    letter-spacing: 3.5px; text-transform: uppercase;
    color: var(--accent); margin-bottom: var(--sp-3);
}
.page-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 5vw, 3.1rem);
    font-weight: 700; line-height: 1.08; letter-spacing: -0.035em;
    color: #fff; margin-bottom: var(--sp-4); text-wrap: balance;
}
.page-lead { color: var(--dim); font-size: 0.98rem; max-width: 660px; }

.sec-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem; font-weight: 700; color: #fff;
    margin: var(--sp-10) 0 var(--sp-5); letter-spacing: -0.3px;
}
.sub-title {
    font-size: 0.72rem; font-weight: 700;
    letter-spacing: 2px; text-transform: uppercase;
    color: var(--accent); margin: var(--sp-7) 0 var(--sp-4);
}

/* ─────────── BREADCRUMB ─────────── */
.crumbs {
    font-size: 0.74rem; color: var(--dimmer);
    margin-bottom: var(--sp-5); display: flex; gap: var(--sp-3); flex-wrap: wrap; align-items: center;
}
.crumbs a { color: var(--dim); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }

/* ─────────── RUO BANNER ─────────── */
.ruo {
    border: 1.5px solid var(--warn);
    background: rgba(224, 178, 92, 0.07);
    border-radius: 10px;
    padding: var(--sp-4) var(--sp-5);
    display: flex; gap: var(--sp-4); align-items: flex-start;
}
.ruo i { color: var(--warn); font-size: 1rem; margin-top: var(--sp-2); flex-shrink: 0; }
.ruo-pl { color: var(--warn); font-weight: 700; font-size: 0.85rem; line-height: 1.5; display: block; }
.ruo-en { color: var(--dim); font-size: 0.78rem; font-style: italic; display: block; margin-top: var(--sp-2); }
.ruo.compact { padding: var(--sp-3) var(--sp-4); border-radius: 8px; }
.ruo.compact .ruo-pl { font-size: 0.76rem; }
.ruo.compact .ruo-en { font-size: 0.71rem; }

/* ─────────── CARDS ─────────── */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: var(--sp-7);
}
.card + .card { margin-top: var(--sp-5); }

.facts-card {
    margin-bottom: var(--sp-7);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: var(--sp-5);
}
.facts-card .sub-title { margin: 0 0 var(--sp-2); }
.fact-value { font-size: 0.85rem; color: var(--dim); }

:where(.card, .summary, .buy-box, .chart-card) > .sub-title:first-of-type,
:where(.card, .summary, .buy-box, .chart-card) > .sec-title:first-of-type { margin-top: 0; }

/* ─────────── KATALOG ─────────── */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
    gap: var(--sp-5);
}

.prod-tile {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: var(--sp-6);
    display: flex; flex-direction: column;
    transition: border-color .25s, transform .25s, background .25s;
}

@media (hover: hover) and (pointer: fine) {
    .prod-tile:hover { border-color: var(--border); transform: translateY(-3px); background: var(--surface2); }
}
@media (hover: none) {
    .prod-tile:active { border-color: var(--border); background: var(--surface2); }
}

.tile-top { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-4); flex-wrap: wrap; }
.sku {
    font-family: 'Space Grotesk', monospace;
    font-size: 0.72rem; font-weight: 700; letter-spacing: 1.5px;
    color: var(--accent); background: var(--accent-fill);
    padding: var(--sp-2) var(--sp-3); border-radius: 4px;
    white-space: nowrap;
}
.tile-tags { min-width: 0; display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.tag {
    font-size: 0.62rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
    padding: var(--sp-2) var(--sp-3); border-radius: 4px;
    background: var(--white-tint); color: var(--dim); border: 1px solid var(--line);
}
.tag.sterile { color: var(--accent); border-color: var(--border); background: var(--accent-tint); }

/* Styl dla statusów dostępności */
.tag-available {
    color: var(--accent);
    border-color: rgba(82, 224, 52, 0.3);
    background: rgba(82, 224, 52, 0.12);
}
.tag-unavailable {
    color: var(--danger);
    border-color: rgba(212, 122, 106, 0.3);
    background: rgba(212, 122, 106, 0.12);
}

.prod-tile h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.16rem; font-weight: 700; color: #fff;
    line-height: 1.28; margin-bottom: var(--sp-3); letter-spacing: -0.01em;
}
.tile-desc { color: var(--dim); font-size: 0.86rem; margin-bottom: var(--sp-4); flex: 1; }

.tile-meta { display: flex; flex-direction: column; gap: var(--sp-2); margin-bottom: var(--sp-5); padding-top: var(--sp-4); border-top: 1px solid var(--line); }
.meta-row { display: flex; justify-content: space-between; gap: var(--sp-4); font-size: 0.78rem; }
.meta-row dt { color: var(--dimmer); }
.meta-row dd { color: var(--text); text-align: right; }

/* ─────────── CENY ─────────── */
.price-block { margin-bottom: var(--sp-4); }
.price-net {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.7rem; font-weight: 700; color: #fff; line-height: 1.05;
    letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.price-net small { font-size: 0.62rem; font-weight: 700; color: var(--dim); letter-spacing: 1.5px; margin-left: var(--sp-2); text-transform: uppercase; }
.price-gross { font-size: 0.78rem; color: var(--dim); margin-top: var(--sp-1); }
.price-per-l { font-size: 0.73rem; color: var(--accent); margin-top: var(--sp-2); }

/* ─────────── BUTTONS ─────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-3);
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
    padding: var(--sp-4) var(--sp-6); border-radius: 8px; border: 1px solid transparent;
    text-decoration: none; cursor: pointer; transition: .2s; text-align: center;
}
.btn-primary { background: var(--accent); color: #080a0b; }
@media (hover: hover) and (pointer: fine) {
    .btn-primary:hover { background: var(--accent2); transform: translateY(-1px); box-shadow: 0 10px 22px rgba(0,0,0,0.45); }
}
.btn-primary:active { transform: translateY(0); box-shadow: none; background: var(--accent2); }
.btn-primary:disabled { background: var(--disabled-bg); color: var(--disabled-fg); cursor: not-allowed; }
.btn-outline { background: transparent; color: var(--accent); border-color: var(--border); }
.btn-outline:hover { background: var(--accent-fill); }
.btn-ghost { background: rgba(255,255,255,.04); color: var(--dim); border-color: var(--line-control); }
.btn-ghost:hover { color: var(--text); background: rgba(255,255,255,.07); }
.btn-block { width: 100%; }
.btn-sm { padding: var(--sp-3) var(--sp-5); font-size: 0.71rem; }

.btn:disabled,
.btn[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.55;
    box-shadow: none;
    transform: none;
}

.btn-outline:active, .btn-ghost:active { transform: translateY(1px); }
.icon-btn:active { transform: scale(0.92); }
@media (prefers-reduced-motion: reduce) {
    .btn-outline:active, .btn-ghost:active, .icon-btn:active { transform: none; }
    .btn-outline:active, .btn-ghost:active { background: var(--accent-fill); }
    .icon-btn:active { color: var(--danger); }
}

/* ─────────── KARTA PRODUKTU ─────────── */
.product-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    grid-template-areas:
        "head buy"
        "body buy";
    gap: 0 var(--sp-9);
    align-items: start;
}
.prod-head { grid-area: head; min-width: 0; }
.prod-body { grid-area: body; min-width: 0; }
.buy-box   { grid-area: buy; }
.buy-box {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: var(--sp-6);
    position: sticky; top: calc(var(--nav-h) + 18px);
}

.qty-row { display: flex; align-items: center; gap: var(--sp-3); margin: var(--sp-5) 0; }
.qty-ctrl {
    display: inline-flex; align-items: center; width: fit-content;
    border: 1px solid var(--line-control); border-radius: 7px; overflow: hidden;
}
.qty-ctrl button {
    background: rgba(255,255,255,.04); border: none; color: var(--text);
    width: 36px; height: 40px; font-size: 1rem; cursor: pointer; transition: background .2s;
}
.qty-ctrl button:hover { background: var(--white-fill); }
.qty-ctrl input {
    width: 56px; height: 40px; background: transparent; border: none;
    color: var(--text); text-align: center; font: 600 0.95rem 'Inter', sans-serif;
    -moz-appearance: textfield;
}
.qty-ctrl input::-webkit-outer-spin-button,
.qty-ctrl input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Rabaty ilościowe */
.discount-table { width: 100%; border-collapse: collapse; margin-top: var(--sp-3); font-size: 0.78rem; }
.discount-table th {
    text-align: left; color: var(--dimmer); font-size: 0.64rem;
    font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
    padding: var(--sp-3) var(--sp-3); border-bottom: 1px solid var(--line);
}
.discount-table td { padding: var(--sp-3); border-bottom: 1px solid var(--line); color: var(--dim); }
.discount-table tr.hit td { color: var(--accent); background: var(--accent-tint); font-weight: 700; }
.discount-table tr.hit td:first-child { position: relative; padding-left: var(--sp-6); }
.discount-table tr.hit td:first-child::before {
    content: '▸';
    position: absolute; left: 7px; top: 50%; transform: translateY(-50%);
    font-size: 0.8em; line-height: 1;
}
.discount-table td:last-child, .discount-table th:last-child { text-align: right; }

/* Specyfikacja */
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table tr { border-bottom: 1px solid var(--line); }
.spec-table tr:last-child { border-bottom: none; }
.spec-table th {
    text-align: left; vertical-align: top; padding: var(--sp-4) var(--sp-4) var(--sp-4) 0;
    font-size: 0.68rem; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
    color: var(--dimmer); width: 38%;
}
.spec-table td { padding: var(--sp-4) 0; font-size: 0.88rem; color: var(--text); }

.ncage-pill {
    display: inline-flex; align-items: center; gap: var(--sp-2);
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 5px; padding: var(--sp-1) var(--sp-3);
    font-weight: 700; font-size: 0.82rem; color: #fff;
}

.step-list { counter-reset: step; list-style: none; }
.step-list li {
    counter-increment: step; position: relative;
    padding: var(--sp-3) 0 var(--sp-3) var(--sp-10); font-size: 0.88rem; color: var(--text);
    border-bottom: 1px solid var(--line);
}
.step-list li:last-child { border-bottom: none; }
.step-list li::before {
    content: counter(step); position: absolute; left: 0; top: 9px;
    width: 24px; height: 24px; border-radius: 6px;
    background: var(--accent-fill); color: var(--accent);
    font-size: 0.72rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}

.bullet-list { list-style: none; }
.bullet-list li { position: relative; padding: var(--sp-2) 0 var(--sp-2) var(--sp-6); font-size: 0.88rem; color: var(--text); }
.bullet-list li::before { content: '▪'; position: absolute; left: 4px; color: var(--accent); }

/* Dokumenty */
.doc-list { display: flex; flex-direction: column; gap: var(--sp-3); }
.doc-item {
    display: flex; align-items: center; gap: var(--sp-4);
    padding: var(--sp-4) var(--sp-5); border-radius: 9px;
    background: var(--white-wash); border: 1px solid var(--line);
    text-decoration: none; transition: border-color .2s, background .2s;
}
.doc-item:hover { border-color: var(--border); background: var(--white-tint); }
.doc-icon {
    width: 34px; height: 34px; border-radius: 7px; flex-shrink: 0;
    background: var(--accent-fill); color: var(--accent);
    display: flex; align-items: center; justify-content: center;
}
.doc-name { font-size: 0.86rem; font-weight: 600; color: var(--text); }
.doc-sub { font-size: 0.7rem; color: var(--dimmer); }
.doc-item .go { margin-left: auto; color: var(--dimmer); font-size: 0.8rem; }

.doc-item.is-pending {
    cursor: default;
    border-style: dashed;
    background: rgba(255,255,255,.02);
}
.doc-item.is-pending .doc-icon { background: var(--white-tint); color: var(--dim); }
.doc-item.is-pending .doc-name { color: var(--dim); font-weight: 500; }
.docs-request { margin-top: var(--sp-4); }

/* Stan wysyłki formularza */
.btn.is-loading { pointer-events: none; opacity: .8; }
.btn .spinner {
    width: 14px; height: 14px; flex-shrink: 0;
    border: 2px solid rgba(8,10,11,.3);
    border-top-color: #080a0b;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
.btn-ghost .spinner, .btn-outline .spinner {
    border-color: rgba(255,255,255,.25); border-top-color: var(--accent);
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .btn .spinner { animation: pulse 1.4s ease-in-out infinite; }
    @keyframes pulse { 0%,100% { opacity: .35; } 50% { opacity: 1; } }
}

.form-status { display: none; margin-bottom: var(--sp-5); }
.form-status.show { display: block; }
.form-status .btn { margin-top: var(--sp-4); }

/* Info / placeholder */
.note {
    border: 1px solid var(--border);
    background: var(--accent-wash);
    border-radius: 9px;
    padding: var(--sp-4) var(--sp-5); font-size: 0.85rem; color: var(--dim);
    margin: var(--sp-4) 0;
}
.note.warn { border-color: rgba(224,178,92,.35); background: rgba(224,178,92,.06); }
.note strong { color: var(--text); }

.placeholder {
    color: var(--warn); background: rgba(224,178,92,.1);
    border: 1px dashed rgba(224,178,92,.45); border-radius: 4px;
    padding: var(--sp-1) var(--sp-3); font-size: 0.82em; font-weight: 600; white-space: nowrap;
}

html[data-lang="pl"] .le { display: none !important; }
html[data-lang="en"] .lp { display: none !important; }

/* ─────────── KOSZYK ─────────── */
.cart-layout { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: var(--sp-8); align-items: start; }

.cart-line {
    display: grid; grid-template-columns: 1fr auto auto;
    gap: var(--sp-5); align-items: center;
    padding: var(--sp-5) 0; border-bottom: 1px solid var(--line);
}
.cart-line:last-child { border-bottom: none; }
.cart-line-name { font-weight: 600; font-size: 0.95rem; color: #fff; }
.cart-line-sub { font-size: 0.76rem; color: var(--dimmer); margin-top: var(--sp-2); }
.cart-line-price { text-align: right; white-space: nowrap; }
.cart-line-price .net { font-weight: 700; font-size: 0.98rem; }
.cart-line-price .old { text-decoration: line-through; color: var(--dimmer); font-size: 0.76rem; }
.icon-btn {
    background: none; border: none; color: var(--dimmer);
    cursor: pointer; padding: var(--sp-3); border-radius: 5px; transition: color .2s;
}
.icon-btn:hover { color: var(--danger); }

.summary { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--sp-6); position: sticky; top: calc(var(--nav-h) + 18px); }
.sum-row { display: flex; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-3) 0; font-size: 0.87rem; color: var(--dim); }
.sum-row span:last-child { color: var(--text); font-weight: 600; white-space: nowrap; }
.sum-row.total {
    border-top: 1px solid var(--border); margin-top: var(--sp-3); padding-top: var(--sp-4);
    font-size: 1.05rem; color: #fff; font-weight: 700;
}
.sum-row.total span:last-child { color: var(--accent); font-family: 'Space Grotesk', sans-serif; font-size: 1.3rem; }
.free-ship-bar { height: 5px; background: rgba(255,255,255,.07); border-radius: 3px; overflow: hidden; margin: var(--sp-2) 0 var(--sp-4); }
.free-ship-bar div {
    height: 100%; width: 100%;
    background: var(--accent); border-radius: 3px;
    transform-origin: left center;
    transition: transform .4s cubic-bezier(.16, 1, .3, 1);
}
@media (prefers-reduced-motion: reduce) {
    .free-ship-bar div { transition: none; }
}

.empty-state { text-align: center; padding: 60px var(--sp-6); color: var(--dim); }
.empty-state i { font-size: 2.4rem; color: var(--dimmer); margin-bottom: var(--sp-5); display: block; }

/* ─────────── FORMULARZE ─────────── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); }
.field { display: flex; flex-direction: column; gap: var(--sp-2); }
.field.full { grid-column: 1 / -1; }
.field label {
    font-size: 0.7rem; font-weight: 700; letter-spacing: 1.2px;
    text-transform: uppercase; color: var(--dim);
}
.field label .req { color: var(--warn); }
.field input, .field textarea, .field select {
    background: var(--white-wash); border: 1px solid var(--line-control);
    border-radius: 8px; padding: var(--sp-4) var(--sp-4);
    color: var(--text); font: 400 0.92rem 'Inter', sans-serif;
    transition: border-color .2s, background .2s;
}
.field input:focus, .field textarea:focus, .field select:focus {
    outline: none; border-color: var(--accent); background: var(--white-tint);
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: var(--danger); }
.field .hint { font-size: 0.73rem; color: var(--dimmer); }
.field .err { font-size: 0.75rem; color: var(--danger); display: none; }
.field.invalid .err { display: block; }
.field .err::before { content: '⚠ '; }

.check-row { display: flex; gap: var(--sp-4); align-items: flex-start; padding: var(--sp-4) 0; border-top: 1px solid var(--line); }
.check-row input[type="checkbox"] {
    appearance: none; -webkit-appearance: none;
    width: 20px; height: 20px; flex-shrink: 0; margin-top: var(--sp-1);
    border: 1.5px solid var(--line-control); border-radius: 5px;
    background: transparent; cursor: pointer; transition: .2s; position: relative;
}
.check-row input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent); }
.check-row input[type="checkbox"]:checked::after {
    content: '✓'; position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: #080a0b; font-size: 0.8rem; font-weight: 900;
}
.check-row label { font-size: 0.84rem; color: var(--dim); cursor: pointer; }
.check-row a { color: var(--accent); }
.check-row.invalid input[type="checkbox"] { border-color: var(--danger); }
.check-row .err { display: none; margin-top: var(--sp-2); }
.check-row.invalid .err { display: block; }

/* Przełącznik „nie posiadam NIP" pod polem NIP — ten sam wygląd checkboxa
   co przy zgodach, tylko mniejszy i dosunięty pod pole. */
.nip-toggle { display: flex; align-items: center; gap: var(--sp-3); margin-top: var(--sp-3); }
.nip-toggle input[type="checkbox"] {
    appearance: none; -webkit-appearance: none;
    width: 18px; height: 18px; flex-shrink: 0;
    border: 1.5px solid var(--line-control); border-radius: 5px;
    background: transparent; cursor: pointer; transition: .2s; position: relative;
}
.nip-toggle input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent); }
.nip-toggle input[type="checkbox"]:checked::after {
    content: '✓'; position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: #080a0b; font-size: 0.72rem; font-weight: 900;
}
.nip-toggle label { font-size: 0.78rem; color: var(--dim); cursor: pointer; }
/* Pole NIP wyłączone (gdy zaznaczono „nie dotyczy") czytelnie nieaktywne. */
.field input:disabled { opacity: 0.5; cursor: not-allowed; }

/* Poprawka błędu składniowego w .sr-only */
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: calc(-1 * var(--sp-1)); overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ─────────── PROZA / STRONY PRAWNE ─────────── */
.prose { font-size: 0.92rem; color: var(--dim); }
.prose h2 {
    font-family: 'Space Grotesk', sans-serif; font-size: 1.15rem;
    color: #fff; font-weight: 700; margin: var(--sp-9) 0 var(--sp-4);
}
.prose h3 { font-size: 0.95rem; color: var(--text); font-weight: 700; margin: var(--sp-6) 0 var(--sp-3); }
.prose p { margin-bottom: var(--sp-4); }
.prose ul, .prose ol { margin: 0 0 var(--sp-4) var(--sp-6); }
.prose li { margin-bottom: var(--sp-2); }
.prose strong { color: var(--text); }
.prose table { width: 100%; border-collapse: collapse; margin: var(--sp-4) 0; font-size: 0.86rem; }
.prose th { text-align: left; color: var(--accent); font-size: 0.68rem; letter-spacing: 1.2px; text-transform: uppercase; padding: var(--sp-3) var(--sp-4) var(--sp-3) 0; border-bottom: 1px solid var(--border); }
.prose td { padding: var(--sp-3) var(--sp-4) var(--sp-3) 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose a { color: var(--accent); }

.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--sp-5) var(--sp-6); margin-bottom: var(--sp-8); }
.toc ol { margin-left: var(--sp-5); font-size: 0.85rem; }
.toc a { color: var(--dim); text-decoration: none; }
.toc a:hover { color: var(--accent); }

.doc-meta { font-size: 0.76rem; color: var(--dimmer); padding-bottom: var(--sp-5); border-bottom: 1px solid var(--line); margin-bottom: var(--sp-6); }

/* ─────────── DANE BADAWCZE ─────────── */
.chart-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--sp-6); margin-bottom: var(--sp-5); }
.chart-wrap { overflow-x: auto; }
.chart-wrap svg { min-width: 460px; width: 100%; height: auto; }
.chart-legend { display: flex; gap: var(--sp-5); flex-wrap: wrap; margin-top: var(--sp-4); font-size: 0.78rem; color: var(--dim); }
.chart-legend span { display: inline-flex; align-items: center; gap: var(--sp-3); }
.swatch { width: 12px; height: 3px; border-radius: 2px; display: inline-block; }
.method-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--sp-4); margin-top: var(--sp-4); }
.method-item { background: var(--white-wash); border: 1px solid var(--line); border-radius: 9px; padding: var(--sp-4) var(--sp-5); }
.method-item dt { font-size: 0.65rem; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--dimmer); margin-bottom: var(--sp-2); }
.method-item dd { font-size: 0.85rem; color: var(--text); }

/* ─────────── STOPKA ─────────── */
.shop-footer {
    flex-shrink: 0;
    border-top: 1px solid var(--line);
    background: #060809;
    padding: var(--tap) clamp(var(--sp-4), 4vw, var(--sp-11)) 0;
    padding-left: max(clamp(var(--sp-4), 4vw, var(--sp-11)), env(safe-area-inset-left));
    padding-right: max(clamp(var(--sp-4), 4vw, var(--sp-11)), env(safe-area-inset-right));
}
.foot-grid {
    max-width: 1180px; margin: 0 auto;
    display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.7fr; gap: var(--sp-9);
}
.foot-logo { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1rem; margin-bottom: var(--sp-4); }
.foot-logo span { color: var(--accent); }
.shop-footer .foot-h {
    font-size: 0.66rem; font-weight: 700; letter-spacing: 1.8px;
    text-transform: uppercase; color: var(--accent); margin-bottom: var(--sp-4);
}
.foot-links { display: flex; flex-direction: column; gap: var(--sp-3); }
.foot-links a { color: var(--dim); text-decoration: none; font-size: 0.82rem; transition: color .2s; }
.foot-links a:hover { color: var(--accent); }
.foot-legal { font-size: 0.78rem; color: var(--dim); line-height: 1.85; }
.foot-legal strong { color: var(--text); }
.foot-ruo {
    font-size: 0.75rem; color: var(--warn); line-height: 1.55;
}
.foot-ruo em { color: var(--dimmer); font-size: 0.71rem; }
.foot-bottom {
    max-width: 1180px; margin: var(--sp-9) auto 0;
    border-top: 1px solid var(--line); padding: var(--sp-5) 0 var(--sp-7);
    display: flex; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap;
    font-size: 0.74rem; color: var(--dimmer);
}
.foot-bottom a { color: var(--dimmer); text-decoration: none; }
.foot-bottom a:hover { color: var(--accent); }

/* ─────────── BANER COOKIES ─────────── */
.cookie-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
    background: rgba(10, 13, 15, .985);
    border-top: 1px solid var(--border);
    padding: var(--sp-6) clamp(var(--sp-4), 4vw, var(--sp-11));
    padding-bottom: max(var(--sp-6), env(safe-area-inset-bottom));
    box-shadow: 0 -20px 50px rgba(0,0,0,.6);
    display: none;
    max-height: 85vh;
    max-height: 85dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.cookie-bar.show { display: block; }
.cookie-inner {
    max-width: 1180px; margin: 0 auto;
    display: flex; gap: var(--sp-7); align-items: center; flex-wrap: wrap;
}
.cookie-text { flex: 1 1 380px; font-size: 0.84rem; color: var(--dim); }
.cookie-text strong { color: var(--text); display: block; margin-bottom: var(--sp-2); font-size: 0.92rem; }
.cookie-text a { color: var(--accent); }
.cookie-actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; }
.cookie-actions .btn { min-width: 168px; }
.cookie-prefs { display: none; max-width: 1180px; margin: var(--sp-5) auto 0; padding-top: var(--sp-5); border-top: 1px solid var(--line); }
.cookie-prefs.show { display: block; }
.cookie-opt { display: flex; gap: var(--sp-4); align-items: flex-start; padding: var(--sp-4) 0; border-bottom: 1px solid var(--line); }
.cookie-opt:last-child { border-bottom: none; }
.cookie-opt strong { font-size: 0.85rem; color: var(--text); }
.cookie-opt p { font-size: 0.78rem; color: var(--dimmer); }

/* ─────────── WALIDATOR PUBLIKACJI ─────────── */
.pub-check {
    position: fixed; right: 16px; bottom: 16px; z-index: 480;
    padding-bottom: max(var(--sp-3), env(safe-area-inset-bottom));
    background: rgba(224,178,92,.12); border: 1px solid var(--warn);
    color: var(--warn); border-radius: 9px; padding: var(--sp-3) var(--sp-5);
    font-size: 0.75rem; font-weight: 700; max-width: 300px;
    display: none;
}
.pub-check.show { display: block; }
.pub-check ul { margin: var(--sp-3) 0 0 var(--sp-5); font-weight: 400; font-size: 0.72rem; }

/* ─────────── PASEK AKCJI ─────────── */
.action-bar {
    display: none;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 850;
    background: rgba(10, 13, 15, .97);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--border);
    padding: var(--sp-4) clamp(var(--sp-4), 3vw, var(--sp-6));
    padding-bottom: max(var(--sp-4), env(safe-area-inset-bottom));
    box-shadow: 0 -14px 34px rgba(0,0,0,.5);
    transform: translateY(115%);
    transition: transform .28s cubic-bezier(.16, 1, .3, 1);
}
.action-bar.show { transform: translateY(0); }
.action-bar-inner {
    max-width: 1180px; margin: 0 auto;
    display: flex; align-items: center; gap: var(--sp-4);
}
.ab-figure { min-width: 0; flex: 0 1 auto; }
.ab-price {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.12rem; font-weight: 700; color: #fff;
    line-height: 1.1; letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums; white-space: nowrap;
}
.ab-note {
    font-size: 0.68rem; color: var(--dim);
    letter-spacing: .6px; text-transform: uppercase; white-space: nowrap;
}
.action-bar .btn { flex: 1 1 auto; min-height: var(--tap); }

@media (max-width: 1000px) {
    .action-bar { display: block; }
    body.has-action-bar .shop-footer { padding-bottom: 76px; }
    body.has-action-bar .pub-check { bottom: 88px; }
}
@media (max-width: 380px) {
    .ab-note { display: none; }
    .action-bar .btn { padding: var(--sp-4) var(--sp-4); }
}
@media (prefers-reduced-motion: reduce) {
    .action-bar { transition: none; }
}
@media print { .action-bar { display: none !important; } }

/* ─────────── TOAST ─────────── */
.toast {
    position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 90px);
    background: var(--accent); color: #080a0b;
    padding: var(--sp-4) var(--sp-7); border-radius: 9px;
    font-size: 0.85rem; font-weight: 700; z-index: 950;
    box-shadow: 0 14px 34px rgba(0,0,0,.5);
    opacity: 0; transition: transform .3s, opacity .3s; pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ─────────── WEJŚCIE KATALOGU ─────────── */
@media (prefers-reduced-motion: no-preference) {
    .catalog-grid .prod-tile {
        opacity: 0;
        animation: tileIn .55s cubic-bezier(.16, 1, .3, 1) both;
    }
    .catalog-grid .prod-tile:nth-child(1) { animation-delay: .04s; }
    .catalog-grid .prod-tile:nth-child(2) { animation-delay: .10s; }
    .catalog-grid .prod-tile:nth-child(3) { animation-delay: .16s; }
    .catalog-grid .prod-tile:nth-child(4) { animation-delay: .22s; }
    .catalog-grid .prod-tile:nth-child(5) { animation-delay: .28s; }
    .catalog-grid .prod-tile:nth-child(6) { animation-delay: .34s; }
}
@keyframes tileIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─────────── RESPONSYWNOŚĆ ─────────── */
@media (max-width: 1000px) {
    .product-layout {
        grid-template-columns: 1fr;
        grid-template-areas:
            "head"
            "buy"
            "body";
        gap: 0;
    }
    .buy-box { margin: var(--sp-2) 0 var(--sp-8); }
    .cart-layout { grid-template-columns: 1fr; }
    .buy-box, .summary { position: static; }
    .foot-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-8); }
}

@media (max-width: 73.75em) {
    .nav-links { display: none; }
    .nav-burger { display: flex; }
    .mobile-nav { display: flex; }
    .nav-tools { margin-left: auto; }
}

@media (max-width: 780px) {
    .cart-btn span.label { display: none; }
    .form-grid { grid-template-columns: 1fr; }
    .cookie-actions { width: 100%; }
    .cookie-actions .btn { flex: 1 1 140px; min-width: 0; }

    .shop-nav .lang-switch { display: none; }
    .mobile-nav .lang-switch { display: flex; align-self: flex-start; margin-top: var(--sp-4); }
    .mobile-nav .lang-switch button { min-width: var(--tap); min-height: var(--tap); font-size: 0.8rem; }

    .cart-btn {
        min-width: var(--tap); min-height: var(--tap);
        justify-content: center; padding: 0 var(--sp-4); gap: var(--sp-2);
    }
    .nav-burger { min-width: var(--tap); min-height: var(--tap); align-items: center; justify-content: center; }
    .nav-logo { min-height: var(--tap); }
}

@media (pointer: coarse) {
    .qty-ctrl button { width: var(--tap); height: var(--tap); }
    .qty-ctrl input { height: var(--tap); }
    .icon-btn { min-width: var(--tap); min-height: var(--tap); display: inline-flex; align-items: center; justify-content: center; }
    .btn-sm { padding: var(--sp-4) var(--sp-5); }
    .foot-links { gap: var(--sp-1); }
    .foot-links a { padding: var(--sp-4) 0; }
    .foot-bottom { gap: var(--sp-2); }
    .foot-bottom a { display: inline-block; padding: var(--sp-4) 0; }
    .crumbs a { padding: var(--sp-2) 0; }
    .toc a { display: inline-block; padding: var(--sp-2) 0; }
    .lang-switch button { min-height: var(--tap); }
}

@media (max-width: 380px) {
    .shop-nav { gap: var(--sp-3); padding: 0 var(--sp-4); }
    .nav-logo { font-size: 0.95rem; gap: var(--sp-3); }
    .nav-logo span:not(.nav-dot) { display: none; }
    .nav-tools { gap: var(--sp-2); }
    .container { padding-left: var(--sp-4); padding-right: var(--sp-4); }
}

@media (max-width: 560px) {
    body { font-size: 15px; }
    .foot-grid { grid-template-columns: 1fr; gap: var(--sp-7); }
    .catalog-grid { grid-template-columns: 1fr; }
    .cart-line { grid-template-columns: 1fr auto; }
    .cart-line > div:first-child { grid-column: 1; grid-row: 1; }
    .cart-line .icon-btn { grid-column: 2; grid-row: 1; align-self: start; }
    .cart-line-price { grid-column: 1 / -1; grid-row: 2; text-align: left; margin-top: var(--sp-2); }
    .spec-table th { width: 45%; font-size: 0.7rem; }
    .card { padding: var(--sp-5); }
    .pub-check { left: 12px; right: 12px; max-width: none; }

    .tag { font-size: 0.7rem; }
    .discount-table th, .method-item dt { font-size: 0.7rem; }
    .eyebrow { font-size: 0.72rem; letter-spacing: 2.5px; }
    .price-net small, .cart-count { font-size: 0.7rem; }
    .foot-bottom, .foot-links a, .doc-sub, .field .hint { font-size: 0.8rem; }
}

@media (pointer: coarse) {
    .field input, .field textarea, .field select, .qty-ctrl input { font-size: 16px; }
}

@media print {
    .shop-nav, .mobile-nav, .cookie-bar, .pub-check, .buy-box, .toast { display: none !important; }
    body { background: #fff; color: #000; }
}