/* HoubaShop – prémiový lesní styl.
   Layout: tmavé „lesní“ pásy (hero, jak to funguje, patička) střídají světlé pásy se zbožím.
   Obsah v sloupci max 1180 px, karty zboží v mřížce, na mobilu 2 sloupce + spodní lišta košíku. */
:root {
  --bg: #eef0e8;
  --surface: #fbfbf7;
  --sunk: #e2e6da;
  --ink: #18231b;
  --muted: #56614f;
  --line: #d2d7c7;
  --forest: #13201a;
  --forest-2: #1c2d22;
  --on-forest: #ebeee2;
  --on-forest-muted: #a8b59f;
  --gold: #d9a441;
  --gold-ink: #241704;
  --moss: #3d6340;
  --ok: #2f6b3c;
  --warn: #94590a;
  --bad: #a3321f;
  --info: #2c5a7a;
  --f-display: "Fraunces", Georgia, "Times New Roman", serif;
  --f-body: "Manrope", "Segoe UI", system-ui, sans-serif;
  --r: 14px;
  --shadow: 0 1px 2px rgba(20, 30, 20, .06), 0 8px 24px -12px rgba(20, 30, 20, .18);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1611; --surface: #172019; --sunk: #1f2a21; --ink: #e6eadf; --muted: #9eab97; --line: #2a382c;
    --forest: #0a110c; --forest-2: #132019; --on-forest: #e6eadf; --on-forest-muted: #9eab97;
    --gold: #e2b052; --gold-ink: #221603; --moss: #8fbf8a;
    --ok: #7cc48a; --warn: #e2a64a; --bad: #ef8a75; --info: #82b6dc;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 28px -14px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16.5px/1.6 var(--f-body); accent-color: var(--moss); }
a { color: var(--moss); text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; line-height: 1.08; text-wrap: balance; margin: 0; font-optical-sizing: auto; }
h1 { font-size: clamp(2.3rem, 6.2vw, 4.4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); letter-spacing: -0.015em; }
h3 { font-size: 1.2rem; letter-spacing: -0.005em; }
p { margin: 0; }
.num, td.num, .price { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-inline: 20px; }
@media (max-width: 600px) { .wrap { padding-inline: 16px; } }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.eyebrow { font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.latin { font-family: var(--f-display); font-style: italic; color: var(--muted); font-size: .92rem; }

/* ---------- hlavička ---------- */
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--forest) 94%, transparent); backdrop-filter: blur(10px); color: var(--on-forest); border-bottom: 1px solid rgba(255,255,255,.07); }
.site-head .wrap { display: flex; align-items: center; gap: 20px; min-height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; font-family: var(--f-display); font-weight: 700; font-size: 1.45rem; letter-spacing: -0.02em; white-space: nowrap; line-height: 1.1; }
.brand svg { width: 32px; height: 32px; flex: none; }
.brand small { font-family: var(--f-body); font-weight: 600; font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--on-forest-muted); display: block; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a { text-decoration: none; color: var(--on-forest); padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: .95rem; white-space: nowrap; }
.nav a:hover { background: rgba(255,255,255,.08); }
.nav a.cart { background: var(--gold); color: var(--gold-ink); display: inline-flex; gap: 8px; align-items: center; }
.nav a.cart b { background: var(--gold-ink); color: var(--gold); border-radius: 999px; padding: 0 7px; font-size: .8rem; line-height: 1.5; }
.head-cart { display: none; }
@media (max-width: 760px) {
  .site-head .wrap { flex-wrap: wrap; gap: 0 12px; min-height: 0; padding-block: 10px 0; }
  .nav { order: 3; margin: 6px -16px 0; padding: 0 12px 8px; overflow-x: auto; scrollbar-width: none; width: calc(100% + 32px); }
  .nav::-webkit-scrollbar { display: none; }
  .nav a.cart { display: none; }
  .head-cart { display: inline-flex; margin-left: auto; align-items: center; gap: 6px; text-decoration: none; color: var(--gold-ink); background: var(--gold); font-weight: 700; border-radius: 999px; padding: 6px 12px; font-size: .9rem; }
}

main { display: block; }
.page { padding-block: 40px 72px; }

/* ---------- hero ---------- */
.hero { position: relative; background: var(--forest); color: var(--on-forest); overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: url("/static/img/hero.svg") right center / cover no-repeat; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,17,12,.92) 0%, rgba(10,17,12,.55) 48%, rgba(10,17,12,0) 75%); }
.hero .wrap { position: relative; z-index: 1; padding-block: clamp(56px, 10vw, 120px) clamp(48px, 8vw, 96px); }
.hero-text { max-width: 620px; display: flex; flex-direction: column; gap: 22px; }
.hero .eyebrow { color: var(--gold); }
.hero h1 em { font-style: italic; color: var(--gold); font-weight: 500; }
.hero .lead { font-size: clamp(1.05rem, 2vw, 1.2rem); color: var(--on-forest-muted); max-width: 48ch; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.next-pickup { display: inline-flex; gap: 12px; align-items: center; padding: 10px 16px 10px 14px; border-radius: 999px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); font-size: .93rem; align-self: flex-start; max-width: 100%; }
.next-pickup .dot { width: 9px; height: 9px; border-radius: 50%; background: #7fd18b; box-shadow: 0 0 0 4px rgba(127,209,139,.18); flex: none; }
@media (max-width: 760px) {
  .hero::before { background-position: 72% bottom; background-size: auto 100%; opacity: .8; }
  .hero::after { background: linear-gradient(180deg, rgba(10,17,12,.92) 0%, rgba(10,17,12,.78) 55%, rgba(10,17,12,.3) 100%); }
  .hero .wrap { padding-bottom: 150px; }
  .next-pickup { border-radius: 14px; }
}

/* ---------- přednosti ---------- */
.facts { background: var(--forest-2); color: var(--on-forest); }
.facts .wrap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding-block: 26px; }
.fact { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: start; }
.fact svg { width: 40px; height: 40px; color: var(--gold); }
.fact b { display: block; font-family: var(--f-display); font-size: 1.08rem; font-weight: 600; }
.fact span { color: var(--on-forest-muted); font-size: .92rem; }
@media (max-width: 760px) { .facts .wrap { grid-template-columns: minmax(0, 1fr); gap: 16px; } }

/* ---------- sekce ---------- */
.section { padding-block: clamp(48px, 7vw, 88px); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 40px; align-items: end; margin-bottom: 28px; }
.section-head > div { display: flex; flex-direction: column; gap: 8px; }
.section-head p.desc { color: var(--muted); max-width: 52ch; }
@media (max-width: 760px) { .section-head { grid-template-columns: minmax(0, 1fr); } }
.slots { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.slot-chip { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font-size: .9rem; min-width: 0; }
.slot-chip b { font-family: var(--f-display); font-weight: 600; font-size: 1.02rem; }
.slot-chip span { color: var(--muted); }
.slots-label { margin-bottom: 10px; }

/* ---------- karty zboží ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
@media (max-width: 600px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.card { background: var(--surface); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); border: 1px solid var(--line); }
.card .ph { position: relative; aspect-ratio: 4 / 3; background: var(--forest-2); max-width: 100%; overflow: hidden; }
.card .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .ph img { transform: scale(1.04); }
.card .ph .pill { position: absolute; left: 10px; top: 10px; }
.card.sold .ph img { filter: grayscale(.8) brightness(.8); }
.card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card h3 { font-size: 1.25rem; }
.card .desc { color: var(--muted); font-size: .92rem; flex: 1; margin-top: 6px; }
.card .pricebox { display: flex; align-items: baseline; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.price { font-family: var(--f-display); font-weight: 600; font-size: 1.55rem; letter-spacing: -0.01em; }
.unit { color: var(--muted); font-size: .9rem; }
.card form { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.card form .btn { flex: 1; }
@media (max-width: 600px) {
  .card .body { padding: 12px 12px 14px; }
  .card h3 { font-size: 1.05rem; }
  .card .latin { font-size: .8rem; }
  .card .desc { display: none; }
  .price { font-size: 1.25rem; }
  .card form { flex-direction: column; }
  .card form .stepper { width: 100%; }
  .card .ph .pill { left: 6px; top: 6px; font-size: .7rem; padding: 2px 8px; }
}

.stepper { display: inline-grid; grid-template-columns: 38px minmax(0, 1fr) 38px; align-items: stretch; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); min-width: 128px; }
.stepper button { border: 0; background: var(--sunk); color: var(--ink); font-size: 1.15rem; cursor: pointer; font-weight: 700; padding: 0; }
.stepper button:hover { background: var(--line); }
.stepper input { border: 0; border-radius: 0; text-align: center; padding: 8px 2px; font-weight: 700; -moz-appearance: textfield; appearance: textfield; background: transparent; }
.stepper input:focus { outline: none; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--sunk); color: var(--muted); white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ph .pill { background: rgba(10,17,12,.72); color: #e6eadf; backdrop-filter: blur(4px); }
.ph .pill.ok::before { background: #7fd18b; } .ph .pill.warn::before { background: #f0b552; } .ph .pill.bad::before { background: #f08a75; }
.pill.ok { color: var(--ok); } .pill.warn { color: var(--warn); } .pill.bad { color: var(--bad); }
.ph .pill.ok, .ph .pill.warn, .ph .pill.bad { color: #e6eadf; }
.pill.new { color: var(--gold-ink); background: var(--gold); } .pill.new::before { background: var(--gold-ink); }
.pill.info { color: var(--info); } .pill.ready { color: var(--warn); } .pill.done { color: var(--ok); } .pill.cancel { color: var(--bad); }

/* ---------- jak to funguje (tmavý pás) ---------- */
.band { background: var(--forest); color: var(--on-forest); }
.band .eyebrow { color: var(--gold); }
.band .desc { color: var(--on-forest-muted) !important; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin: 8px 0 0; counter-reset: s; list-style: none; padding: 0; }
.steps li { border-top: 1px solid rgba(255,255,255,.16); padding-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.steps li::before { counter-increment: s; content: counter(s); font-family: var(--f-display); font-size: 2.6rem; line-height: 1; color: var(--gold); font-weight: 500; }
.steps b { font-family: var(--f-display); font-size: 1.25rem; font-weight: 600; }
.steps span { color: var(--on-forest-muted); }
@media (max-width: 760px) { .steps { grid-template-columns: minmax(0, 1fr); gap: 20px; } }

.ratio { display: flex; align-items: center; gap: 18px; padding: 14px 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); max-width: 520px; }
.ratio b { font-family: var(--f-display); font-size: 1.7rem; font-weight: 600; white-space: nowrap; color: var(--moss); }
.ratio span { color: var(--muted); font-size: .92rem; }

/* ---------- formuláře ---------- */
input, select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--moss); outline: 2px solid color-mix(in srgb, var(--moss) 30%, transparent); }
textarea { min-height: 90px; resize: vertical; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .95rem; }
label.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; }
label.check input { width: auto; margin-top: 5px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.fields .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .fields { grid-template-columns: minmax(0, 1fr); } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 1rem var(--f-body); border: 0; border-radius: 10px; padding: 11px 18px; background: var(--gold); color: var(--gold-ink); cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .12s ease, filter .12s ease; }
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.light { background: transparent; color: var(--on-forest); border: 1px solid rgba(255,255,255,.35); }
.btn.moss { background: var(--moss); color: var(--surface); }
.btn.danger { background: transparent; color: var(--bad); border: 1px solid var(--bad); }
.btn.sm { padding: 6px 12px; font-size: .9rem; }
.btn.big { padding: 15px 26px; font-size: 1.08rem; }

.choice { display: grid; gap: 10px; }
.choice label { flex-direction: row; align-items: flex-start; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-weight: 400; cursor: pointer; }
.choice label:has(input:checked) { border-color: var(--moss); box-shadow: inset 0 0 0 1px var(--moss); }
.choice label:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.choice input { width: auto; margin-top: 5px; }
.choice b { display: block; }
.choice .r { margin-left: auto; font-weight: 700; white-space: nowrap; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
@media (max-width: 600px) { .panel { padding: 16px; } }
.notice { padding: 12px 16px; border-radius: 12px; background: color-mix(in srgb, var(--moss) 14%, var(--surface)); }
.notice.err { background: color-mix(in srgb, var(--bad) 14%, var(--surface)); }
.notice.warn { background: color-mix(in srgb, var(--gold) 22%, var(--surface)); }
.toast { position: fixed; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top, 0px) + 80px); z-index: 30; background: var(--gold); color: var(--gold-ink); padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow); width: max-content; max-width: calc(100% - 32px); font-weight: 700; animation: toast 4.5s ease forwards; }
@keyframes toast { 0%, 85% { opacity: 1 } 100% { opacity: 0; visibility: hidden } }

.checkout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.checkout aside { position: sticky; top: 90px; }
@media (max-width: 860px) { .checkout { grid-template-columns: minmax(0, 1fr); } .checkout aside { position: static; } }

/* ---------- tabulky ---------- */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }
td.num, th.num { text-align: right; white-space: nowrap; }
tr.total td { border-bottom: 0; font-weight: 700; font-size: 1.1rem; }

/* košík jako seznam (funguje i na mobilu) */
.lines { display: flex; flex-direction: column; }
.line { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.line img { width: 72px; height: 54px; object-fit: cover; border-radius: 8px; background: var(--forest-2); }
.line .ctrl { display: flex; gap: 10px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.line .ctrl form { display: flex; gap: 6px; align-items: center; }
.line .sum { font-weight: 700; min-width: 80px; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) {
  .line { grid-template-columns: 56px minmax(0, 1fr); }
  .line img { width: 56px; height: 42px; }
  .line .ctrl { grid-column: 1 / -1; justify-content: space-between; }
}
.sumrow { display: flex; justify-content: space-between; padding: 14px 0 4px; font-weight: 700; font-size: 1.15rem; }

.prose { max-width: 70ch; display: flex; flex-direction: column; gap: 14px; }
.prose h2 { margin-top: 18px; font-size: 1.6rem; }
.qr { background: #fff; padding: 10px; border-radius: 10px; width: 220px; max-width: 100%; }

/* ---------- spodní lišta košíku (mobil) ---------- */
.cartbar { display: none; }
@media (max-width: 760px) {
  .cartbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; gap: 12px; align-items: center; justify-content: space-between;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--forest); color: var(--on-forest); box-shadow: 0 -6px 20px rgba(0,0,0,.25); }
  .cartbar b { font-family: var(--f-display); font-size: 1.15rem; display: block; }
  .cartbar span { color: var(--on-forest-muted); font-size: .85rem; display: block; }
  body.has-cartbar { padding-bottom: 76px; }
}

/* ---------- patička ---------- */
.site-foot { background: var(--forest); color: var(--on-forest-muted); font-size: .92rem; padding-block: 44px; }
.site-foot .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.site-foot b { color: var(--on-forest); font-family: var(--f-display); font-size: 1.15rem; font-weight: 600; display: block; margin-bottom: 6px; }
.site-foot a { color: var(--on-forest); }
@media (max-width: 760px) { .site-foot .wrap { grid-template-columns: minmax(0, 1fr); } }

/* ---------- admin ---------- */
.admin .top { background: var(--forest); color: var(--on-forest); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; }
.admin .top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; flex-wrap: wrap; padding-block: 8px; }
.admin .top .nav { margin-left: 0; flex-wrap: wrap; overflow: visible; width: auto; padding: 0; order: 0; }
.admin .top .nav a.on { background: rgba(255,255,255,.14); }
.admin main.wrap { padding-block: 28px 64px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs a { text-decoration: none; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); font-size: .92rem; }
.tabs a.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 8px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.kpi b { display: block; font-family: var(--f-display); font-size: 1.7rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.kpi span { color: var(--muted); font-size: .88rem; }
.thumb { width: 52px; height: 40px; border-radius: 6px; object-fit: cover; background: var(--sunk); }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 860px) { .two { grid-template-columns: minmax(0, 1fr); } }
.inline-stock { display: flex; gap: 6px; align-items: center; } .inline-stock input { width: 84px; padding: 6px 8px; }
tr.off td { opacity: .5; }

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