:root {
    --red: #b91c1c;
    --red-dark: #7f1d1d;
    --red-soft: #fde8e8;
    --cream: #fdf8f3;
    --card: #ffffff;
    --ink: #2b1d17;
    --muted: #7a6a62;
    --line: #eadfd6;
    --green: #15803d;
    --gold: #f59e0b;
    --whatsapp: #25d366;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(43, 29, 23, .06), 0 4px 16px rgba(43, 29, 23, .06);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--cream);
    color: var(--ink);
    line-height: 1.5;
    -webkit-tap-highlight-color: transparent;
}
body:has(dialog[open]) { overflow: hidden; }
body.has-cart { padding-bottom: 84px; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { line-height: 1.2; margin: 0; }

/* --- Pasek DEMO --- */
.demo-strip {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 10px;
    padding: 10px 16px;
    background: #111827; color: #fff; text-decoration: none; text-align: center;
    font-size: 15px;
}
.demo-strip strong { color: #fde047; }
.demo-sub { font-size: 13px; color: #cbd5e1; width: 100%; }
.demo-tag {
    background: #fde047; color: #111827; font-weight: 800; font-size: 11px; letter-spacing: .08em;
    padding: 2px 7px; border-radius: 4px;
}

/* --- Hero --- */
.hero {
    background:
        radial-gradient(circle at 15% 20%, rgba(255,255,255,.12) 0 2px, transparent 3px) 0 0 / 28px 28px,
        linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
    color: #fff;
    padding: 36px 16px 30px;
}
.hero-inner { max-width: 960px; margin: 0 auto; }
.logo-mark {
    width: 64px; height: 64px; border-radius: 50%;
    display: grid; place-items: center; font-size: 34px;
    background: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.25); margin-bottom: 14px;
}
.hero h1 { font-size: clamp(32px, 7vw, 48px); font-weight: 800; letter-spacing: -.02em; }
.hero h1 span { display: block; font-size: .45em; font-weight: 500; letter-spacing: .02em; opacity: .9; margin-top: 4px; }
.hero-meta { margin: 10px 0 16px; opacity: .85; font-size: 14px; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
    background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2);
    border-radius: 999px; padding: 5px 12px; font-size: 13px;
}

/* --- Nawigacja kategorii --- */
.cat-nav {
    position: sticky; top: 0; z-index: 10;
    background: rgba(253, 248, 243, .95); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}
.cat-nav-inner {
    position: relative;
    max-width: 960px; margin: 0 auto; padding: 10px 16px;
    display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
}
.cat-nav-inner::-webkit-scrollbar { display: none; }
.cat-nav a {
    flex: none; text-decoration: none; font-size: 14px; font-weight: 600;
    padding: 7px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line);
    transition: background .2s, color .2s;
}
.cat-nav a.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* --- Menu --- */
.menu { max-width: 960px; margin: 0 auto; padding: 8px 16px 24px; }
.category { padding-top: 24px; }
.category h2 { font-size: 22px; margin-bottom: 12px; }
.items { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .items { grid-template-columns: 1fr 1fr; } }

.item {
    display: flex; align-items: stretch; gap: 14px; width: 100%; text-align: left;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 14px; box-shadow: var(--shadow);
    transition: transform .15s, box-shadow .15s, border-color .15s;
}
.item:hover { border-color: #d9c6b8; box-shadow: 0 6px 22px rgba(43,29,23,.1); }
.item:active { transform: scale(.985); }
.item-emoji {
    flex: none; width: 76px; height: 76px; border-radius: 12px;
    display: grid; place-items: center; font-size: 40px;
    background: linear-gradient(135deg, #fff3e6, #fde4d4);
}
.item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.item-name { font-weight: 700; font-size: 16px; }
.item-desc { color: var(--muted); font-size: 13.5px; }
.item-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 4px; }
.item-price { font-weight: 700; margin-right: 4px; }
.item-add {
    flex: none; align-self: center; width: 36px; height: 36px; border-radius: 50%;
    display: grid; place-items: center; font-size: 22px; font-weight: 600;
    background: var(--red); color: #fff;
}

.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; vertical-align: 2px; }
.badge-hot { background: #fff1d6; color: #9a5b00; margin-left: 4px; }
.badge-vegetarisch, .badge-vegan { background: #e3f5e8; color: var(--green); }
.badge-scharf { background: var(--red-soft); color: var(--red); }

.allergen-note { color: var(--muted); font-size: 13px; margin-top: 28px; }

/* --- Sekcja dla gastronomów --- */
.pitch { background: #111827; color: #e5e7eb; padding: 48px 16px; }
.pitch-inner { max-width: 960px; margin: 0 auto; }
.pitch-kicker { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 700; color: #fde047; margin: 0 0 8px; }
.pitch h2 { font-size: clamp(26px, 5.5vw, 40px); color: #fff; }
.pitch h2 span { color: #fde047; }
.pitch-lead { font-size: 17px; max-width: 640px; color: #cbd5e1; }
.benefits { display: grid; gap: 14px; grid-template-columns: 1fr; margin: 28px 0; }
@media (min-width: 640px) { .benefits { grid-template-columns: 1fr 1fr; } }
.benefit { background: #1f2937; border-radius: var(--radius); padding: 18px; }
.benefit > span { font-size: 28px; }
.benefit h3 { color: #fff; font-size: 17px; margin: 6px 0 4px; }
.benefit p { margin: 0; font-size: 14.5px; color: #cbd5e1; }

.calc { background: #fff; color: var(--ink); border-radius: var(--radius); padding: 20px; }
.calc h3 { font-size: 19px; margin-bottom: 14px; }
.calc label { display: block; font-size: 14.5px; margin-top: 10px; }
.calc input[type=range] { width: 100%; accent-color: var(--red); margin: 6px 0; }
.calc-result { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.calc-result div { background: var(--red-soft); border-radius: 10px; padding: 12px; text-align: center; }
.calc-result span { display: block; font-size: 13px; color: var(--muted); }
.calc-result strong { font-size: clamp(22px, 5vw, 28px); color: var(--red); }
.calc-note { margin: 12px 0 0; font-size: 15px; }
.calc-note strong { color: var(--green); }

.pitch-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

/* --- Przyciski --- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 48px; padding: 0 20px; border-radius: 12px; border: 0;
    font-weight: 700; font-size: 15.5px; text-decoration: none;
    transition: filter .15s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:not(:disabled):hover { filter: brightness(1.08); }
.btn-light { background: #fff; color: #111827; }
.btn-outline { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.4); }
.btn-whatsapp { background: var(--whatsapp); color: #fff; }
.btn-ghost { background: transparent; border: 1px solid var(--line); }
.btn-grow { flex: 1; }
.link-btn { background: none; border: 0; padding: 0; color: var(--red); font-weight: 700; text-decoration: underline; }

/* --- Stopka --- */
.site-footer { text-align: center; padding: 24px 16px 32px; font-size: 13px; color: var(--muted); }
.site-footer p { margin: 4px 0; }

/* --- Pasek koszyka --- */
.cart-bar {
    position: fixed; z-index: 20; left: 50%; transform: translateX(-50%);
    bottom: calc(14px + env(safe-area-inset-bottom));
    width: min(560px, calc(100% - 32px)); min-height: 56px;
    display: flex; align-items: center; gap: 12px; padding: 0 18px;
    border: 0; border-radius: 16px; background: var(--red); color: #fff; font-weight: 700; font-size: 16px;
    box-shadow: 0 10px 30px rgba(185, 28, 28, .35);
}
.cart-bar[hidden] { display: none; }
.cart-count { background: #fff; color: var(--red); min-width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center; font-size: 14px; padding: 0 6px; }
.cart-bar-total { margin-left: auto; }
.cart-bar.bump { animation: bump .35s ease; }
@keyframes bump { 40% { transform: translateX(-50%) scale(1.05); } }

/* --- Okna (dialog jako arkusz od dołu na telefonie) --- */
.sheet {
    border: 0; padding: 0; background: var(--card); color: var(--ink);
    width: 100%; max-width: 560px; max-height: 92dvh;
    border-radius: 20px 20px 0 0; margin: auto auto 0;
    box-shadow: 0 -10px 40px rgba(0,0,0,.2);
}
.sheet[open] { display: flex; flex-direction: column; animation: sheet-up .25s ease-out; }
.sheet > form[method=dialog] { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.sheet::backdrop { background: rgba(17, 24, 39, .55); }
@media (min-width: 640px) {
    .sheet { border-radius: 20px; margin: auto; max-height: 86vh; }
}
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }

.sheet-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 18px 12px; border-bottom: 1px solid var(--line); }
.sheet-head > div { flex: 1; min-width: 0; }
.sheet-head h3 { font-size: 19px; flex: 1; }
.sheet-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.sheet-emoji { font-size: 40px; line-height: 1; }
.close { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; background: #f3ece6; font-size: 15px; }
.sheet-body { flex: 1; overflow-y: auto; padding: 14px 18px; overscroll-behavior: contain; }
.sheet-body[hidden] { display: none; }
.sheet-foot { display: flex; gap: 10px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }

.opt-group { border: 0; margin: 0 0 14px; padding: 0; }
.opt-group legend { font-weight: 700; padding: 0; margin-bottom: 6px; }
.opt-group legend small { font-weight: 500; color: var(--muted); margin-left: 6px; font-size: 12px; }
.opt {
    display: flex; align-items: center; gap: 10px; padding: 11px 12px; margin-bottom: 6px;
    border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
}
.opt:has(input:checked) { border-color: var(--red); background: #fff7f6; }
.opt input { width: 18px; height: 18px; accent-color: var(--red); margin: 0; }
.opt-name { flex: 1; }
.opt-price { color: var(--muted); font-size: 14px; }

.qty { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.qty button { width: 44px; height: 46px; border: 0; background: #f8f3ef; font-size: 20px; }
.qty span { min-width: 34px; text-align: center; font-weight: 700; }
.qty-sm button { width: 32px; height: 32px; font-size: 15px; }
.qty-sm span { min-width: 26px; }

/* --- Koszyk --- */
.mode-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: #f3ece6; padding: 4px; border-radius: 12px; margin-bottom: 14px; }
.mode-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.mode-toggle span { display: block; text-align: center; padding: 10px 6px; border-radius: 9px; font-weight: 600; font-size: 14.5px; cursor: pointer; }
.mode-toggle input:checked + span { background: #fff; box-shadow: var(--shadow); }
.mode-toggle input:focus-visible + span { outline: 2px solid var(--red); }

.cart-lines { list-style: none; margin: 0; padding: 0; }
.cart-lines li { display: flex; gap: 10px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-lines li.empty { display: block; text-align: center; color: var(--muted); padding: 30px 0; border: 0; }
.line-emoji { font-size: 26px; line-height: 1.2; }
.line-main { flex: 1; min-width: 0; }
.line-main small { display: block; color: var(--muted); font-size: 13px; }
.line-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-weight: 600; }

.totals { margin: 14px 0 0; }
.totals div { display: flex; justify-content: space-between; padding: 3px 0; font-size: 15px; }
.totals dt, .totals dd { margin: 0; }
.totals .discount dd { color: var(--green); }
.totals .grand { font-weight: 800; font-size: 18px; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }
.hint { background: #fff7e6; color: #8a5300; border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 12px 0 0; }
.hint[hidden] { display: none; }

/* --- Formularz --- */
#checkout-step label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 12px; }
#checkout-step label small { font-weight: 400; color: var(--muted); }
#checkout-step input:not([type=radio]), #checkout-step textarea {
    display: block; width: 100%; margin-top: 5px; padding: 12px; font: inherit; font-size: 16px;
    border: 1px solid #d9cbc0; border-radius: 10px; background: #fff; color: var(--ink);
}
#checkout-step input:focus, #checkout-step textarea:focus { outline: 2px solid var(--red); outline-offset: -1px; border-color: transparent; }
#checkout-step .row { display: flex; gap: 10px; }
#checkout-step .row label { flex: 1; }
#checkout-step .row .zip { flex: 0 0 110px; }
#address-fields[hidden] { display: none; }
.pay { border: 0; padding: 0; margin: 4px 0 0; }
.pay legend { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.pay label { display: flex !important; align-items: center; gap: 10px; font-weight: 500 !important; border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 6px !important; }
.pay label:has(input:checked) { border-color: var(--red); background: #fff7f6; }
.pay input { accent-color: var(--red); width: 18px; height: 18px; margin: 0; }
.demo-note { background: #eef6ff; color: #1e3a5f; border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 14px; }
.demo-note .link-btn { color: #1d4ed8; margin-left: 4px; }
.hp { position: absolute; left: -9999px; }
.error { background: var(--red-soft); color: var(--red-dark); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.error[hidden] { display: none; }

/* --- Toast --- */
.toast {
    position: fixed; z-index: 30; left: 50%; top: 16px; transform: translate(-50%, -150%);
    background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14.5px;
    box-shadow: 0 10px 30px rgba(0,0,0,.25); transition: transform .3s ease; max-width: calc(100% - 32px);
}
.toast.show { transform: translate(-50%, 0); }

/* --- Strona statusu zamówienia --- */
.track { max-width: 560px; margin: 0 auto; padding: 24px 16px 40px; }
.track-card { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); padding: 24px 20px; text-align: center; }
.track-icon { font-size: 54px; line-height: 1; }
.track h1 { font-size: 24px; margin: 10px 0 4px; }
.track-sub { color: var(--muted); margin: 0; }
.track-eta { margin: 16px auto 0; display: inline-block; background: var(--red-soft); color: var(--red); font-weight: 800; padding: 8px 16px; border-radius: 999px; }
.track-eta[hidden] { display: none; }
.steps { list-style: none; padding: 0; margin: 24px 0 0; text-align: left; }
.steps li { position: relative; padding: 0 0 18px 38px; color: var(--muted); }
.steps li::before {
    content: ""; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%;
    border: 2px solid var(--line); background: #fff;
}
.steps li::after { content: ""; position: absolute; left: 11px; top: 25px; bottom: 2px; width: 2px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps li.done { color: var(--ink); }
.steps li.done::before { background: var(--green); border-color: var(--green); }
.steps li.done::after { background: var(--green); }
.steps li.current { color: var(--ink); font-weight: 700; }
.steps li.current::before { border-color: var(--red); background: var(--red); box-shadow: 0 0 0 5px var(--red-soft); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(185,28,28,.08); } }
.track-summary { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); padding: 18px 20px; margin-top: 16px; }
.track-summary h2 { font-size: 17px; margin-bottom: 8px; }
.track-summary ul { list-style: none; margin: 0; padding: 0; }
.track-summary li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.track-summary li small { display: block; color: var(--muted); font-size: 13px; }
.track-demo { background: #111827; color: #e5e7eb; border-radius: 18px; padding: 20px; margin-top: 16px; }
.track-demo h2 { color: #fde047; font-size: 18px; margin-bottom: 6px; }
.track-demo p { margin: 0 0 14px; font-size: 15px; }
.track-demo .btn { width: 100%; margin-top: 8px; }
.cancelled .track-icon { filter: grayscale(1); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
