/* Nejenchlebem.cz shop. No external fonts or requests. */
:root {
  --bg: #faf6ef; --card: #fff; --ink: #2b2118; --muted: #6b5b4b; --line: #e7ddcf;
  --accent: #a0522d; --accent-dark: #7d3f22; --ok: #2e7d4f; --bad: #b3261e; --warn-bg: #fdf0d5;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
a { color: var(--accent-dark); }
a:hover { color: var(--ink); }
h1 { font-size: 1.9rem; line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h2 { font-size: 1.35rem; line-height: 1.25; margin: 1.6em 0 .6em; }
h3 { font-size: 1rem; line-height: 1.3; margin: 0; }
small, .hint { color: var(--muted); font-size: .875rem; }
[hidden] { display: none !important; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 28px; padding-bottom: 56px; min-height: 60vh; }
.center { text-align: center; }

.beta { background: #5b3a1e; color: #fff; text-align: center; padding: 6px 16px; font-size: .9rem; }
.top { position: sticky; top: 0; z-index: 5; background: var(--card); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 8px 22px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.brand { font-weight: 800; font-size: 1.3rem; color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.brand span { color: var(--accent); }
.top nav { display: flex; flex-wrap: wrap; gap: 4px 18px; flex: 1; }
.top nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.top nav a:hover { color: var(--accent); }
.cart-link { margin-left: auto; text-decoration: none; font-weight: 700; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; }
.cart-link:hover { border-color: var(--accent); }
.badge { display: inline-block; min-width: 1.4em; padding: 0 .4em; border-radius: 999px; background: var(--accent); color: #fff; font-size: .8rem; text-align: center; }

.hero { padding: 6px 0 4px; }
.hero p { color: var(--muted); max-width: 46rem; margin: 0; }
.cat-note { color: var(--muted); margin: -.3em 0 1em; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.card-img { display: block; aspect-ratio: 4 / 3; border-radius: 6px; overflow: hidden; background: #fff; }
.card-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.noimg { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; min-height: 120px; background: #f1e8da; color: var(--accent); font-size: 3rem; font-weight: 800; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--accent); }
.short { margin: 0; color: var(--muted); font-size: .875rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; padding-top: 6px; }
.price { font-weight: 800; font-size: 1.15rem; white-space: nowrap; }
.price.big { font-size: 1.8rem; }
.stock { font-size: .85rem; font-weight: 600; }
.stock.ok { color: var(--ok); }
.stock.out { color: var(--muted); }
.vat { color: var(--muted); font-size: .9rem; margin-bottom: 6px; }

.btn { display: inline-block; background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: 9px 16px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--accent-dark); color: #fff; }
.btn:disabled { background: #cfc4b6; cursor: not-allowed; }
.btn.big { padding: 12px 24px; font-size: 1.05rem; }
.btn.ghost { background: transparent; color: var(--accent-dark); border: 2px solid var(--accent); }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-dark); text-decoration: underline; cursor: pointer; }
:focus-visible { outline: 3px solid #e09060; outline-offset: 2px; }

.crumbs { margin: 0 0 14px; font-size: .9rem; }
.detail { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px; align-items: start; }
.detail-img { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.detail-img img { width: 100%; height: auto; max-height: 460px; object-fit: contain; display: block; }
.lead { font-size: 1.1rem; }
.buy { display: flex; align-items: flex-end; gap: 14px; margin-top: 18px; }
.buy input { width: 5rem; }
.descr { max-width: 46rem; }
.descr p { margin: 0 0 .7em; }
.bullet { padding-left: 1.2em; position: relative; }
.bullet::before { content: "•"; position: absolute; left: .2em; color: var(--accent); }

.notice { background: var(--warn-bg); border: 1px solid #ecd9a8; border-radius: 8px; padding: 10px 14px; }
.notice.ok { background: #e6f3ea; border-color: #b9dcc5; }
.error { color: var(--bad); font-weight: 600; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.25); z-index: 10; max-width: calc(100vw - 32px); }
.toast a { color: #ffd9a8; font-weight: 700; }

.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; background: var(--card); }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .85rem; color: var(--muted); font-weight: 600; }
table.cart, table.plain, table.admin { border: 1px solid var(--line); border-radius: var(--radius); }
.c-unit, .c-total { white-space: nowrap; }
.c-total { font-weight: 700; }
.c-qty input { width: 4.5rem; }

form fieldset { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); margin: 20px 0 0; padding: 16px 18px 18px; min-width: 0; }
legend { font-weight: 800; font-size: 1.1rem; padding: 0 6px; }
label { display: block; font-weight: 600; font-size: .92rem; }
input:not([type=checkbox]):not([type=radio]), textarea { display: block; width: 100%; margin-top: 4px; padding: 9px 10px; font: inherit; color: inherit; background: #fff; border: 1px solid #c9bba9; border-radius: 7px; }
input.bad, textarea.bad { border-color: var(--bad); box-shadow: 0 0 0 2px rgba(179,38,30,.15); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin-bottom: 12px; }
.wide { grid-column: 1 / -1; }
.opts { display: grid; gap: 8px; }
.opt { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; cursor: pointer; font-weight: 400; }
.opt:has(input:checked) { border-color: var(--accent); background: #fdf7f1; }
.opt input { margin-top: 5px; }
.opt-text { display: grid; gap: 1px; }
.opt-price { color: var(--accent-dark); font-weight: 600; }
.point { margin-top: 12px; }
#point-chosen { margin-left: 10px; font-weight: 600; }
details { margin: 4px 0 12px; }
summary { cursor: pointer; font-weight: 600; margin-bottom: 10px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin-top: 10px; }
.check input { margin-top: 5px; }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.sum, .pay { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; margin: 0 0 14px; max-width: 26rem; }
.sum dd, .pay dd { margin: 0; text-align: right; font-weight: 600; }
.sum .total { font-size: 1.2rem; font-weight: 800; border-top: 1px solid var(--line); padding-top: 8px; }
.robot input { max-width: 10rem; }
#order-send { margin-top: 14px; }
.done { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; max-width: 40rem; }

.text { max-width: 48rem; }
.text.narrow { max-width: 28rem; }
.text.center { margin: 40px auto; }
.text li { margin: .3em 0; }
.form-sample { border: 1px dashed #c9bba9; border-radius: 8px; padding: 6px 16px; background: var(--card); }

.admin-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.admin-head h1 { margin: 0; }
table.admin input:not([type=checkbox]) { width: auto; display: inline-block; margin: 0; padding: 6px 8px; }
table.admin tr.off td { color: var(--muted); background: #f6f1e9; }
.savebar { position: sticky; bottom: 0; background: var(--bg); padding: 14px 0; border-top: 1px solid var(--line); margin-top: 16px; }
.audit { padding-left: 1.1em; color: var(--muted); font-size: .9rem; }

.foot { background: #2b2118; color: #d9cdbd; padding: 28px 0; font-size: .9rem; }
.foot a { color: #f0c8a0; }
.foot-in { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px 32px; }

@media (max-width: 720px) {
  h1 { font-size: 1.5rem; }
  .top { position: static; }
  html { scroll-padding-top: 0; }
  .top nav { order: 3; flex-basis: 100%; }
  .detail { grid-template-columns: 1fr; gap: 18px; }
  .fields { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .card { padding: 10px; }
  .card-foot { flex-direction: column; align-items: stretch; }
  table.cart thead { display: none; }
  table.cart tr { display: grid; grid-template-columns: 1fr auto auto; gap: 4px 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  table.cart td { border: 0; padding: 0; }
  table.cart .c-name { grid-column: 1 / -1; font-weight: 600; }
  table.cart .c-unit { display: none; }
  table.cart .c-del { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
