/* ChiaWiem — style strony
   Linie: Diety ChiaWiem (burak + zieleń), Mistrzowskie 44 (ciepłe, domowe), Seniorzy (spokojny morski). */

:root {
  --bg: #F4F6F0;
  --surface: #FFFFFF;
  --ink: #1E2B1F;
  --muted: #46524A;
  --line: #D9DED2;
  --line-strong: #A9B2A3;
  --accent: #8E2347;         /* burak */
  --accent-dark: #6A1834;
  --accent-soft: #FBF1F4;
  --green: #3F7D3A;
  --todo: #FFF4C2;
  --todo-ink: #5C4A0E;

  --serif: "Young Serif", Georgia, "Times New Roman", serif;
  --sans: "Figtree", "Segoe UI", Roboto, Arial, sans-serif;
  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --radius: 10px;
}

body.theme-mistrz {
  --bg: #F7F3EA;
  --ink: #2A2116;
  --muted: #5A4E3E;
  --line: #E3DBCB;
  --line-strong: #B9AC95;
  --accent: #8A4B0F;
  --accent-dark: #6A3909;
  --accent-soft: #FBF0E0;
}
body.theme-senior {
  --bg: #F1F5F5;
  --ink: #1C2B2E;
  --muted: #45585C;
  --line: #D3DEDF;
  --line-strong: #9FB3B5;
  --accent: #2F6670;
  --accent-dark: #224D55;
  --accent-soft: #E6F0F1;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; border-radius: 3px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0 0 0.5em; overflow-wrap: break-word; hyphens: auto; }
h1 { font-size: clamp(1.85rem, 5.2vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; max-width: 64ch; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 50; }
.skip:focus { left: .5rem; top: .5rem; }
.todo { background: var(--todo); color: var(--todo-ink); padding: 0 .3em; border-radius: 3px; }
.muted { color: var(--muted); }
.small { font-size: .92rem; }

/* ---------- Nagłówek ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .8rem; padding-bottom: .8rem; }
.brand { display: flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--ink); font-family: var(--serif); font-size: 1.6rem; }
.brand img { height: 56px; width: auto; }
.videos { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem; max-width: 640px; }
.videos > * { min-width: 0; }
.videos figure { margin: 0; }
.videos video { width: 100%; aspect-ratio: 9 / 16; border-radius: var(--radius); background: #1d1d1b; display: block; }
.videos figcaption { font-size: .95rem; margin-top: .5rem; color: var(--muted); }
.nav { display: flex; align-items: center; gap: .25rem 1.4rem; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; padding: .35rem 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--line-strong); color: var(--ink); }
.nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.nav .nav-cta { background: var(--accent); color: #fff; padding: .55rem 1.1rem; border-radius: 999px; border: 0; font-weight: 700; }
.nav .nav-cta:hover { background: var(--accent-dark); color: #fff; }
.menu-toggle { display: none; font: inherit; font-weight: 600; background: none; border: 1px solid var(--line-strong); border-radius: 8px; padding: .55rem .9rem; min-height: 44px; align-items: center; gap: .5rem; color: var(--ink); cursor: pointer; }
.burger, .burger::before, .burger::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -6px; } .burger::after { top: 6px; }

@media (max-width: 980px) {
  .menu-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: .5rem var(--gutter) 1rem; gap: 0; }
  .nav.open { display: flex; }
  .nav a { padding: .8rem 0; border-bottom: 1px solid var(--line); }
  .nav a[aria-current="page"] { border-bottom-color: var(--line); color: var(--accent); font-weight: 700; }
  .nav .nav-cta { margin-top: .75rem; text-align: center; border-radius: 8px; }
}

/* ---------- Przyciski ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .8rem 1.4rem; border-radius: 8px; border: 2px solid var(--accent); background: var(--accent); color: #fff; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; text-align: center; }
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

/* ---------- Sekcje ---------- */
.section { padding: clamp(2.75rem, 6vw, 4.5rem) 0; }
.section-white { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hero { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(1.5rem, 5vw, 3.5rem); align-items: center; }
.hero .lead { font-size: 1.2rem; color: var(--muted); max-width: 46ch; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; padding: 0; list-style: none; }
.chips li { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .35rem .9rem; font-size: .95rem; }

.numbers { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; margin: 1.75rem 0 0; }
.numbers div { display: flex; flex-direction: column; }
.numbers strong { font-family: var(--serif); font-weight: 400; font-size: 2rem; line-height: 1.1; color: var(--accent); }
.numbers span { font-size: .95rem; color: var(--muted); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 3.5rem); align-items: start; }

/* Linie produktów */
.lines { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.line-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); }
.line-card:hover { border-color: var(--line-strong); color: var(--ink); }
.line-card .photo { border-radius: 0; aspect-ratio: 4 / 3; }
.line-card .body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.line-card h3 { margin: 0; }
.line-card .price { font-weight: 700; color: var(--line-accent, #8E2347); }
.line-card .more { margin-top: auto; font-weight: 700; color: var(--line-accent, #8E2347); }
.line-chiawiem { --line-accent: #8E2347; }
.line-mistrz { --line-accent: #8A4B0F; }
.line-senior { --line-accent: #2F6670; }

/* Przełącznik linii na stronach produktowych */
.line-switch { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.line-switch a { flex: 1 1 220px; min-width: 0; text-decoration: none; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; }
.line-switch a[aria-current="page"] { border-color: var(--accent); background: var(--accent-soft); }
.line-switch strong { display: block; }
.line-switch span { display: block; font-size: .92rem; color: var(--muted); }

/* Kroki */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; counter-reset: krok; padding: 0; margin: 1.5rem 0 0; list-style: none; }
.steps li { counter-increment: krok; border-top: 3px solid var(--accent); padding-top: 1rem; }
.steps li::before { content: counter(krok); font-family: var(--serif); font-size: 1.6rem; color: var(--accent); display: block; }
.steps h3 { margin: .2rem 0 .3rem; }

/* Przykładowy dzień */
.day { list-style: none; padding: 0; margin: 0; display: grid; gap: .1rem; }
.day li { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.day li strong { font-weight: 700; }

/* Zdjęcia */
.photo { margin: 0; border-radius: var(--radius); overflow: hidden; background: linear-gradient(135deg, #DCE4D3, #EBDDE2); aspect-ratio: 4 / 3; position: relative; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo.no-img { display: flex; align-items: center; justify-content: center; text-align: center; padding: 1rem; color: var(--muted); font-size: .95rem; }
.photo.no-img small { font-size: .8rem; opacity: .8; }
.photo.tall { aspect-ratio: 4 / 5; }

/* Opinie */
.reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; margin-top: 1.5rem; }
.reviews blockquote { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.reviews p { font-family: var(--serif); font-size: 1.1rem; line-height: 1.45; }
.reviews cite { font-style: normal; color: var(--muted); font-size: .95rem; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding: 1rem 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.08rem; }
.faq details p { margin: .6rem 0 0; color: var(--muted); }
.faq-static h2 { font-family: var(--sans); font-weight: 700; font-size: 1.15rem; margin: 2rem 0 .4rem; }
.faq-static p { color: var(--muted); }

/* Porównanie */
.compare { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.compare th, .compare td { text-align: left; padding: .8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { background: var(--accent-soft); }
.table-box { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }

/* ---------- Konfigurator zamówienia ---------- */
.order { display: flex; flex-wrap: wrap; gap: 2rem; align-items: flex-start; }
.order-steps { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 2.25rem; }
.order-step h2 { font-size: 1.6rem; margin-bottom: .3rem; }
.order-step > p { color: var(--muted); margin-bottom: 1rem; }
.options { display: flex; flex-wrap: wrap; gap: .6rem; border: 0; padding: 0; margin: 0; }
.options legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.opt span { display: inline-flex; align-items: center; min-height: 46px; padding: .55rem 1.05rem; border: 2px solid var(--line); border-radius: 999px; background: var(--surface); font-weight: 600; }
.opt input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.opt input:focus-visible + span { outline: 3px solid var(--green); outline-offset: 2px; }
.opt.card { flex: 1 1 210px; min-width: 0; }
.opt.card span { display: flex; flex-direction: column; align-items: flex-start; border-radius: var(--radius); padding: 1rem 1.1rem; height: 100%; font-weight: 400; gap: .25rem; }
.opt.card b { font-family: var(--serif); font-weight: 400; font-size: 1.3rem; }
.opt.card em { font-style: normal; font-weight: 700; color: var(--accent); }
.opt.card small { color: var(--muted); font-size: .92rem; }

.fields { display: flex; flex-wrap: wrap; gap: 1rem; }
.field { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: .35rem; font-weight: 600; font-size: .95rem; }
.field.full { flex-basis: 100%; }
.field input, .field select, .field textarea { font: inherit; font-weight: 400; padding: .75rem .8rem; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--ink); min-height: 48px; width: 100%; }
.field textarea { min-height: 5rem; resize: vertical; }
.field .hint { font-weight: 400; color: var(--muted); font-size: .88rem; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .95rem; }
.check input { width: 22px; height: 22px; margin-top: .1rem; flex: none; }
.hp { position: absolute; left: -5000px; }

.summary { flex: 1 1 320px; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1.5rem; position: sticky; top: 1rem; }
.summary h2 { font-size: 1.6rem; }
.summary dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .5rem 1rem; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; text-align: right; font-weight: 600; }
.summary .total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); margin-top: 1rem; padding-top: 1rem; }
.summary .total strong { font-family: var(--serif); font-weight: 400; font-size: 2.1rem; color: var(--accent); }
.summary .btn { width: 100%; margin-top: 1rem; }
.pay-methods { font-size: .9rem; color: var(--muted); margin: .75rem 0 0; }
.errors { background: #FDECEC; border: 1px solid #E8B4B4; color: #7A1D1D; border-radius: 8px; padding: .8rem 1rem; margin-top: 1rem; }
.errors ul { margin: 0; padding-left: 1.1rem; }
.notice { background: var(--accent-soft); border-radius: 8px; padding: .9rem 1rem; }
@media (max-width: 980px) { .summary { position: static; } }

/* Menu tygodnia */
.menu-week { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.menu-day { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.menu-day h2 { font-size: 1.35rem; color: var(--accent); }
.menu-day p { margin: 0; white-space: pre-line; }
.menu-meals { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.menu-meals strong { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

/* Artykuł */
.article { max-width: 44rem; }
.article h2 { margin-top: 2rem; }
.article ul, .article ol { padding-left: 1.2rem; }
.article li { margin-bottom: .4rem; }

/* Stopka */
.site-footer { background: #1E2B1F; color: #CFD8CC; padding: 3rem 0 2rem; font-size: .95rem; margin-top: 0; }
.site-footer a { color: #F2C9D5; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
.footer-brand { font-family: var(--serif); font-size: 1.5rem; color: #fff; margin-bottom: .5rem; }
.site-footer h2 { font-family: var(--sans); font-weight: 700; font-size: 1rem; color: #fff; margin-bottom: .6rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.legal { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.15); }

.wa-float { position: fixed; right: 16px; bottom: 16px; width: 56px; height: 56px; border-radius: 50%; background: #1F7A4D; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(0,0,0,.25); z-index: 30; }

/* Panel */
.panel-table { width: 100%; border-collapse: collapse; font-size: .95rem; background: var(--surface); }
.panel-table th, .panel-table td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.panel-table th { background: #EEF1EA; }
.badge { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.badge.ok { background: #DDF0DA; color: #1E5A1A; }
.badge.wait { background: #FFF1C9; color: #6A4F00; }
.badge.bad { background: #FBDADA; color: #7A1D1D; }
.tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 1.5rem; }
.tabs a { padding: .5rem 1rem; border: 1px solid var(--line-strong); border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 600; }
.tabs a[aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Responsywność ---------- */
@media (max-width: 860px) {
  .hero-grid, .split { grid-template-columns: 1fr; }
  .lines, .steps, .reviews { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .day li { grid-template-columns: 1fr; gap: .1rem; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .btn-row .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
@media print { .site-header, .site-footer, .wa-float { display: none; } }

/* Elementy siatki nie mogą rozpychać strony (np. tabele na telefonie) */
.split > *, .hero-grid > *, .lines > *, .steps > *, .reviews > * { min-width: 0; }
