:root {
  --bg: #f6f4f1;
  --surface: #ffffff;
  --surface-2: #efebe6;
  --ink: #1c1a18;
  --ink-2: #5b5650;
  --line: #e2ddd6;
  --coal: #17171a;
  --coal-2: #26262b;
  --fire: #e8661a;
  --fire-2: #c9520f;
  --fire-soft: #fdeee3;
  --ok: #1f8a4c;
  --ok-soft: #e4f4ea;
  --warn: #b7791f;
  --warn-soft: #fbf1df;
  --err: #c0392b;
  --err-soft: #fbe7e5;
  --info: #2563eb;
  --info-soft: #e6eefc;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 6px 20px rgba(0,0,0,.06);
  --wrap: 1180px;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); line-height: 1.55; font-size: 16px; }
img, svg { display: block; max-width: 100%; }
a { color: var(--fire-2); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--ink-2); }
.small { font-size: .875rem; }
.hidden { display: none !important; }
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }

/* Topbar + header */
.topbar { background: var(--coal); color: #d6d3cf; font-size: .85rem; }
.topbar .wrap { display: flex; gap: 20px; justify-content: space-between; padding-top: 7px; padding-bottom: 7px; flex-wrap: wrap; }
.topbar a { color: #fff; text-decoration: none; }
.topbar strong { color: #ffb37f; font-weight: 600; }

.header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.3rem; }
.logo-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--coal); display: grid; place-items: center; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.nav a:hover { color: var(--fire-2); }
.cart-link { display: inline-flex; align-items: center; gap: 8px; background: var(--coal); color: #fff; text-decoration: none; padding: 9px 14px; border-radius: 999px; font-weight: 600; }
.cart-link:hover { background: var(--coal-2); }
.cart-badge { background: var(--fire); color: #fff; font-size: .75rem; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 6px; }

.menu-btn { display: none; }
@media (max-width: 760px) {
  .nav { display: none; }
  .header .wrap { gap: 12px; position: relative; }
  .header .cart-link { margin-left: auto; }
  .menu-btn { display: inline-grid; align-content: center; gap: 4px; width: 42px; height: 42px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; }
  .menu-btn span { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
  .header.open .menu-btn span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .header.open .menu-btn span:nth-child(2) { opacity: 0; }
  .header.open .menu-btn span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .header.open .nav { display: grid; position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(0,0,0,.08); padding: 6px 16px 12px; gap: 0; }
  .header.open .nav a { padding: 13px 4px; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .header.open .nav a:last-child { border-bottom: 0; }
  .header .wrap { justify-content: space-between; }
  .topbar .hide-sm { display: none; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 10px; padding: 12px 20px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; transition: background .15s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--fire); color: #fff; }
.btn-primary:hover { background: var(--fire-2); }
.btn-dark { background: var(--coal); color: #fff; }
.btn-dark:hover { background: var(--coal-2); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-ok { background: var(--ok); color: #fff; }
.btn-ok:hover { filter: brightness(.92); }
.btn-danger { background: transparent; color: var(--err); border: 1px solid #efc2bd; }
.btn-danger:hover { background: var(--err-soft); }
.btn-sm { padding: 7px 12px; font-size: .875rem; border-radius: 8px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* Hero */
.hero { background: radial-gradient(1200px 500px at 80% 0%, #3a2416 0%, transparent 60%), var(--coal); color: #fff; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding-top: 64px; padding-bottom: 64px; }
.hero p.lead { color: #cfcac4; font-size: 1.15rem; max-width: 34em; }
.hero h1 span { color: #ff9a56; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero .btn-ghost { color: #fff; border-color: #4a4a50; }
.hero .btn-ghost:hover { background: #2b2b30; }
.hero-badges { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 32px; color: #e8e4df; font-size: .95rem; }
.hero-badges div { display: flex; align-items: center; gap: 8px; }
.hero-art { aspect-ratio: 1 / .85; border-radius: 24px; overflow: hidden; box-shadow: 0 30px 60px rgba(0,0,0,.45); }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; padding-top: 40px; padding-bottom: 40px; } .hero-art { display: none; } }

/* Zdjęcie Ekogroszku Premium w nagłówku strony głównej */
.hero-product { position: relative; margin: 0; display: grid; justify-items: center; gap: 14px; }
.hero-product::before { content: ""; position: absolute; inset: 6% 4% 14%; background: radial-gradient(closest-side, rgba(255, 138, 61, .42), rgba(255, 138, 61, 0)); pointer-events: none; }
.hero-product img { position: relative; width: auto; height: auto; max-width: 100%; max-height: 470px; filter: drop-shadow(0 28px 34px rgba(0, 0, 0, .6)); }
.hero-product figcaption { position: relative; }
.hero-product figcaption a { display: inline-block; color: #fff; text-decoration: none; font-weight: 600; font-size: .9rem; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); padding: 7px 14px; border-radius: 999px; }
.hero-product figcaption a:hover { background: rgba(255, 255, 255, .14); }
@media (max-width: 860px) { .hero-product img { max-height: 300px; } }

/* Sections */
section.block { padding: 64px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head p { margin: 0; }

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: -36px; position: relative; z-index: 2; }
.feature { background: var(--surface); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.feature .ico { width: 42px; height: 42px; border-radius: 10px; background: var(--fire-soft); color: var(--fire-2); display: grid; place-items: center; margin-bottom: 12px; }
.feature h3 { margin-bottom: 4px; font-size: 1.02rem; }
.feature p { margin: 0; color: var(--ink-2); font-size: .92rem; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .features { grid-template-columns: 1fr; } }

/* Filters */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--surface); padding: 7px 14px; border-radius: 999px; font: inherit; font-size: .9rem; cursor: pointer; color: var(--ink); }
.chip.active { background: var(--coal); color: #fff; border-color: var(--coal); }

/* Product grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.card-art { position: relative; aspect-ratio: 4 / 3; background: var(--coal); }
.card-art svg { width: 100%; height: 100%; }
.tag { position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,.92); color: var(--ink); font-size: .75rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.tag-sale { left: auto; right: 12px; background: var(--fire); color: #fff; }
.card-body { padding: 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body h3 { margin: 0; }
.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: .85rem; color: var(--ink-2); margin: 0; }
.specs dt { color: var(--ink-2); }
.specs dd { margin: 0; color: var(--ink); font-weight: 600; text-align: right; }
.price-row { display: flex; align-items: baseline; gap: 10px; margin-top: auto; padding-top: 6px; }
.price { font-size: 1.5rem; font-weight: 800; }
.price small { font-size: .85rem; font-weight: 500; color: var(--ink-2); }
.old-price { color: var(--ink-2); text-decoration: line-through; font-size: .95rem; }
.add-row { display: flex; gap: 8px; }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.qty button { width: 36px; height: 42px; border: 0; background: transparent; font-size: 1.15rem; cursor: pointer; color: var(--ink); }
.qty button:hover { background: var(--surface-2); }
.qty input { width: 54px; text-align: center; border: 0; font: inherit; font-weight: 600; height: 42px; -moz-appearance: textfield; background: transparent; color: var(--ink); }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty .unit { padding-right: 10px; color: var(--ink-2); font-size: .85rem; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; }
.step { background: var(--surface); border-radius: var(--radius); padding: 22px; border: 1px solid var(--line); position: relative; }
.step::before { counter-increment: step; content: counter(step); width: 34px; height: 34px; border-radius: 50%; background: var(--coal); color: #fff; display: grid; place-items: center; font-weight: 700; margin-bottom: 12px; }
.step p { margin: 0; color: var(--ink-2); font-size: .93rem; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* FAQ */
.faq { max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; margin-bottom: 10px; }
.faq summary { font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--fire-2); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 12px 0 0; color: var(--ink-2); }

/* Contact band */
.band { background: var(--coal); color: #fff; border-radius: 20px; padding: 36px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: center; }
.band p { color: #cfcac4; margin: 0; }
.band .contact-lines { display: grid; gap: 10px; font-size: 1.05rem; }
.band a { color: #fff; }
@media (max-width: 760px) { .band { grid-template-columns: 1fr; padding: 24px; } }

/* Footer */
.footer { background: var(--coal); color: #a9a49e; margin-top: 64px; padding: 44px 0 24px; font-size: .9rem; }
.footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.footer h4 { color: #fff; margin: 0 0 10px; font-size: .95rem; }
.footer a { color: #d9d5d0; text-decoration: none; }
.footer a:hover { color: #fff; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer .copy { border-top: 1px solid #2c2c31; margin-top: 28px; padding-top: 18px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 760px) { .footer .cols { grid-template-columns: 1fr; } }

/* Forms / panels */
.page-head { padding: 36px 0 20px; }
.layout-2 { display: grid; grid-template-columns: 1fr 380px; gap: 24px; align-items: start; }
.layout-2 > * { min-width: 0; }
@media (max-width: 1100px) and (min-width: 961px) { .layout-2 { grid-template-columns: 1fr 320px; } }
@media (max-width: 960px) { .layout-2 { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.panel + .panel { margin-top: 20px; }
.panel h2 { font-size: 1.3rem; }
.sticky { position: sticky; top: 88px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; font: inherit; background: #fff; color: var(--ink); }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid #f5b48a; border-color: var(--fire); }
.field .err { color: var(--err); font-size: .82rem; margin-top: 4px; min-height: 0; }
.field.invalid input { border-color: var(--err); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--fire); }

/* Cart */
.cart-item { display: grid; grid-template-columns: 72px 1fr auto auto; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-item:last-child { border-bottom: 0; }
.cart-thumb { width: 72px; height: 56px; border-radius: 8px; overflow: hidden; }
.cart-item .line { font-weight: 700; min-width: 110px; text-align: right; }
.icon-btn { border: 0; background: transparent; cursor: pointer; color: var(--ink-2); padding: 6px; border-radius: 8px; }
.icon-btn:hover { background: var(--err-soft); color: var(--err); }
@media (max-width: 620px) {
  .cart-item { grid-template-columns: 60px 1fr; }
  .cart-item .qty, .cart-item .line { grid-column: 2; justify-self: start; text-align: left; }
}
.sum-row { display: flex; justify-content: space-between; padding: 6px 0; }
.sum-row.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; font-size: 1.25rem; font-weight: 800; }
.free { color: var(--ok); font-weight: 700; }
.empty { text-align: center; padding: 40px 10px; }

/* Order confirmation */
.notice { border-radius: 12px; padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; }
.notice-ok { background: var(--ok-soft); color: #145c33; }
.notice-warn { background: var(--warn-soft); color: #7a4e0c; }
.notice-info { background: var(--info-soft); color: #1d4ab8; }
.notice-err { background: var(--err-soft); color: #8e2a20; }

.pay-box { border: 2px dashed var(--fire); border-radius: 16px; padding: 22px; background: var(--fire-soft); }
.pay-row { display: grid; grid-template-columns: 170px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid #f3d3bd; }
.pay-row:last-child { border-bottom: 0; }
.pay-row .k { color: var(--ink-2); font-size: .9rem; }
.pay-row .v { font-weight: 700; overflow-wrap: anywhere; }
.pay-row .v.big { font-size: 1.5rem; letter-spacing: .04em; color: var(--fire-2); }
@media (max-width: 560px) { .pay-row { grid-template-columns: 1fr auto; } .pay-row .k { grid-column: 1 / -1; } }
.copy-btn { border: 1px solid #efc2a2; background: #fff; border-radius: 8px; padding: 6px 10px; font: inherit; font-size: .82rem; cursor: pointer; color: var(--fire-2); font-weight: 600; }
.copy-btn:hover { background: #fff7f1; }

.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.st-pending { background: var(--warn-soft); color: #8a5a10; }
.st-paid_reported { background: var(--info-soft); color: #1d4ab8; }
.st-approved { background: var(--ok-soft); color: #145c33; }
.st-shipped { background: #efe7fb; color: #5b2bb5; }
.st-completed { background: #e7eceb; color: #2e4a43; }
.st-cancelled { background: var(--err-soft); color: #8e2a20; }

table.list { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.list th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); }
table.list td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list tr.clickable { cursor: pointer; }
table.list tr.clickable:hover td { background: #faf8f6; }
.num { text-align: right; white-space: nowrap; }
.table-wrap { overflow-x: auto; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--coal); color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.25); opacity: 0; transition: .2s; z-index: 100; display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast a { color: #ffb37f; font-weight: 600; }

.prose { max-width: 820px; }
.prose h2 { font-size: 1.25rem; margin-top: 1.6em; }
.prose li { margin-bottom: .4em; }
.add-row .btn { white-space: nowrap; padding-left: 12px; padding-right: 12px; }
.add-row .qty input { width: 40px; }
.add-row .qty button { width: 32px; }

/* Podpowiedzi adresu */
.ac-field { position: relative; }
.ac-list { position: absolute; left: 0; right: 0; z-index: 30; list-style: none; margin: 0; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.14); max-height: 320px; overflow-y: auto; }
.ac-item { padding: 9px 12px; border-radius: 8px; cursor: pointer; display: grid; gap: 1px; }
.ac-item:hover, .ac-item.active { background: var(--fire-soft); }
.ac-main { font-weight: 600; }
.ac-sub { font-size: .8rem; color: var(--ink-2); }
.ac-empty { padding: 10px 12px; color: var(--ink-2); font-size: .9rem; }
.ac-foot { padding: 6px 12px 2px; font-size: .72rem; color: var(--ink-2); border-top: 1px solid var(--line); margin-top: 4px; }

/* Baner zgody na cookies */
.consent { position: fixed; z-index: 90; left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); max-width: 760px; margin: 0 auto; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px rgba(0,0,0,.18); padding: 16px 18px; display: flex; gap: 14px 20px; align-items: center; flex-wrap: wrap; font-size: .9rem; }
.consent p { margin: 0; flex: 1 1 320px; }
.consent-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-art svg, .card-art svg, .cart-thumb svg { width: 100%; height: 100%; }
.card-art img, .cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.toast { pointer-events: none; }
.toast.show { pointer-events: auto; }

/* Bardzo wąskie telefony (do 400 px) */
@media (max-width: 400px) {
  .logo { font-size: 1.15rem; gap: 8px; }
  .cart-link { padding: 9px 12px; }
  .cart-link .cart-text { display: none; }
  .pay-box { padding: 16px; }
  .pay-row .v.big { font-size: 1.3rem; }
  .panel { padding: 18px; }
}

/* Długie słowa (e-mail, nazwa firmy, numer konta) zawijają się zamiast poszerzać stronę */
.panel, .kv dd, .notice { overflow-wrap: anywhere; }
table.list { overflow-wrap: normal; }

/* Tabela produktów w zamówieniu: na telefonie każdy wiersz jako blok */
@media (max-width: 560px) {
  table.list.stack td[colspan] { display: block; }
  table.list.stack td:empty { display: none; }
  table.list.stack thead { display: none; }
  table.list.stack, table.list.stack tbody { display: block; }
  table.list.stack tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  table.list.stack td { display: flex; justify-content: space-between; gap: 12px; padding: 0; border: 0; text-align: left; }
  table.list.stack td:first-child { grid-column: 1 / -1; font-weight: 700; }
  table.list.stack td:not(:first-child) { grid-column: 1 / -1; font-size: .9rem; }
  table.list.stack td:not(:first-child)::before { content: attr(data-label); color: var(--ink-2); }
}

/* Przejścia do sekcji (#produkty, #faq…) nie chowają nagłówka pod przyklejonym menu */
[id] { scroll-margin-top: 84px; }
@media (max-width: 760px) {
  .topbar .wrap { row-gap: 2px; column-gap: 12px; padding-top: 6px; padding-bottom: 6px; }
}
