/* Ošatka — čistý, řemeslný vzhled. Bílá, tmavě zelená, tlumená olivová. */

:root {
  --bg: #ffffff;
  --cream: #fbf8ec;
  --green: #2d4a26;
  --green-dark: #1f3520;
  --olive: #8b8530;
  --ink: #26301f;
  --muted: #646b5c;
  --line: #e4e0d0;
  --line-strong: #cbc6b3;
  --error: #9b3424;
  --error-bg: #fbefec;
  --ok-bg: #edf3e8;
  --warn-bg: #f8f1d9;
  --serif: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius: 3px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--green-dark); }
h1, h2, h3, h4 { margin: 0; font-weight: 500; }
p { margin: 0; }

:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* ---------- Hlavička ---------- */

.site-header { display: flex; justify-content: center; padding: 36px 20px 8px; }
.site-header .logo { width: 180px; height: auto; }
.site-header--small .logo { width: 120px; }
.logo-link { display: block; }

/* ---------- Úvod ---------- */

.intro { text-align: center; padding: 32px 0 48px; max-width: 620px; margin: 0 auto; }
.eyebrow {
  font-size: 12px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
  color: var(--olive); margin-bottom: 14px;
}
.intro-title {
  font-family: var(--serif); font-weight: 500; color: var(--green);
  font-size: clamp(2.3rem, 7vw, 3.6rem); line-height: 1.05; letter-spacing: -.01em;
}
.intro-text { margin-top: 16px; color: var(--muted); font-size: 17px; white-space: pre-line; }

/* ---------- Pečení ---------- */

.batches { border-top: 1px solid var(--line); }
.batch { padding: 40px 0 48px; border-bottom: 1px solid var(--line); }
.batch:last-child { border-bottom: 0; }

.batch-photo { margin: 0 -20px 28px; background: var(--cream); }
.batch-photo img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.batch--soldout .batch-photo img { filter: saturate(.6); opacity: .85; }

.batch-title {
  font-family: var(--serif); font-weight: 500; color: var(--green);
  font-size: clamp(2.1rem, 6vw, 2.8rem); line-height: 1.1;
}
/* Částky bezpatkovým písmem – patkové má „staré“ číslice, kde 1 vypadá jako ı. */
.batch-price { margin-top: 8px; font-size: 1.25rem; font-weight: 600; color: var(--green); line-height: 1.2; }
.availability { margin-top: 10px; font-size: 15px; color: var(--muted); }
.availability strong { color: var(--green); font-weight: 600; font-size: 17px; }
.availability--out { color: var(--olive); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: 13px; }
.batch-date { margin-top: 2px; font-size: 15px; color: var(--muted); }
.batch-pickup { margin-top: 2px; font-size: 15px; color: var(--muted); }
.nowrap { white-space: nowrap; }
.batch-desc { margin-top: 20px; font-size: 17px; white-space: pre-line; }
.batch-ingredients { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.batch-ingredients p { white-space: pre-line; font-size: 15px; }
.label {
  font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--olive); margin-bottom: 6px;
}

.status-note {
  margin-top: 28px; padding: 14px 16px; background: var(--cream);
  border: 1px solid var(--line); color: var(--green); font-weight: 500; text-align: center;
}

@media (min-width: 860px) {
  .batch { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: start; padding: 56px 0; }
  .batch-photo { margin: 0; position: sticky; top: 24px; }
  .batch-photo img { aspect-ratio: 4 / 5; }
  .site-header .logo { width: 220px; }
}

/* ---------- Rezervace ---------- */

.reserve { margin-top: 28px; }
.reserve-form { margin-top: 4px; padding-top: 24px; border-top: 1px solid var(--line); }
.form-title { font-family: var(--serif); font-size: 1.7rem; color: var(--green); margin-bottom: 18px; }
.form-note { margin-top: 12px; font-size: 14px; color: var(--muted); text-align: center; }
.form-alert {
  margin: 0 0 18px; padding: 12px 14px; background: var(--error-bg);
  border-left: 3px solid var(--error); color: var(--error); font-size: 15px;
}
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.field { margin: 0 0 18px; border: 0; padding: 0; min-width: 0; }
.field label, .field legend, .label-text { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; padding: 0; }
.optional { color: var(--muted); font-weight: 400; }
.hint { margin-top: 6px; font-size: 13px; color: var(--muted); }
.field-error { margin-top: 6px; font-size: 14px; color: var(--error); }

input[type=text], input[type=password], input[type=number], input[type=date], input[type=time], input:not([type]), select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 12px 14px; min-height: 48px;
}
textarea { resize: vertical; line-height: 1.5; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--green) 50%), linear-gradient(135deg, var(--green) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--green); outline-offset: 0; border-color: var(--green); }
[aria-invalid=true] { border-color: var(--error); }

.choices { display: grid; gap: 8px; }
.choice, .field .choice {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  font-size: 16px; font-weight: 400; margin: 0; min-height: 48px;
}
.choice:has(input:checked) { border-color: var(--green); background: var(--cream); }
.choice input { width: 18px; height: 18px; margin: 0; accent-color: var(--green); flex: none; }

/* ---------- Tlačítka ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: var(--radius);
  font: 500 15px/1.2 var(--sans); letter-spacing: .01em; text-decoration: none; text-align: center;
  border: 1px solid var(--green); cursor: pointer; transition: background-color .15s, color .15s;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); color: #fff; }
.btn-secondary { background: #fff; color: var(--green); }
.btn-secondary:hover { background: var(--cream); }
.btn-ghost { background: transparent; color: var(--green); border-color: transparent; text-decoration: underline; }
.btn-ghost:hover { background: var(--cream); }
.btn-block { display: flex; width: 100%; }
.btn-reserve { width: 100%; }
.btn-large { min-height: 56px; font-size: 16px; }
.btn-small { min-height: 40px; padding: 8px 14px; font-size: 14px; }
.btn[disabled], .btn[aria-busy=true] { opacity: .6; cursor: progress; }
.link-button { background: none; border: 0; padding: 8px 0; font: inherit; font-size: 14px; color: var(--green); text-decoration: underline; cursor: pointer; }

@media (min-width: 560px) { .btn-reserve { width: auto; min-width: 240px; } }

/* ---------- Prázdný stav, potvrzení ---------- */

.empty { text-align: center; padding: 64px 0; color: var(--muted); }
.empty-title { font-family: var(--serif); font-size: 1.8rem; color: var(--green); margin-bottom: 8px; }

.confirm { max-width: 560px; margin: 0 auto; padding: 32px 0 24px; }
.confirm-title { font-family: var(--serif); font-size: clamp(2.2rem, 7vw, 3rem); color: var(--green); line-height: 1.1; }
.confirm-lead { margin-top: 10px; font-size: 18px; color: var(--muted); }
.summary { margin: 28px 0; border-top: 1px solid var(--line); }
.summary > div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 500; text-align: right; }
.summary .summary-note { font-weight: 400; white-space: pre-line; text-align: left; }
.pay { margin: 0 0 28px; padding: 20px; border: 1px solid var(--line); background: var(--cream); text-align: center; }
.pay .label { margin-bottom: 4px; }
.pay-amount { font-size: 1.9rem; font-weight: 600; color: var(--green); line-height: 1.2; }
.pay-text { margin-top: 6px; font-size: 15px; color: var(--muted); }
.pay-qr { width: 200px; margin: 16px auto; background: #fff; padding: 6px; }
.pay-qr svg { display: block; width: 100%; height: auto; }
.pay-details { margin: 0; font-size: 14px; text-align: left; max-width: 300px; margin-inline: auto; }
.pay-details > div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.pay-details dt { color: var(--muted); }
.pay-details dd { margin: 0; font-weight: 600; }
.note { margin-bottom: 20px; }
.note p { white-space: pre-line; }
.confirm-hint { font-size: 14px; color: var(--muted); margin: 24px 0; }

/* ---------- Patička ---------- */

.site-footer { margin-top: 72px; border-top: 1px solid var(--line); padding: 40px 0 32px; font-size: 14px; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.footer-name { font-family: var(--serif); font-size: 1.9rem; font-weight: 600; color: var(--green); line-height: 1; }
.footer-tagline { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--green); margin-top: 4px; }
.footer-contact { margin-top: 14px; white-space: pre-line; }
.qr { margin: 0; text-align: center; }
.qr-code { display: block; width: 104px; }
.qr svg { width: 100%; height: auto; display: block; }
.qr figcaption { margin-top: 4px; font-size: 12px; letter-spacing: .04em; }
.footer-bottom { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  margin-top: 32px; border-top: 1px solid var(--line); padding-top: 16px; }
.privacy { flex: 1; }
.baker-link { flex: none; display: block; padding: 12px; margin: -10px -12px 0 0; color: var(--line-strong); }
.baker-link:hover { color: var(--olive); }
.privacy summary { cursor: pointer; color: var(--green); }
.privacy p { margin-top: 10px; max-width: 680px; }

/* ================= Administrace ================= */

.admin { background: #fcfbf7; }
.a-wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.a-header { background: #fff; border-bottom: 1px solid var(--line); }
.a-header-inner { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; padding-bottom: 8px; }
.a-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--green); }
.a-brand img { width: 44px; height: auto; }
.a-brand strong { display: block; font-family: var(--serif); font-size: 1.5rem; line-height: 1; font-weight: 600; }
.a-brand small { display: block; font-size: 12px; color: var(--muted); }
.a-nav { display: flex; gap: 20px; overflow-x: auto; }
.a-nav a { padding: 10px 0 12px; text-decoration: none; color: var(--muted); font-size: 15px; border-bottom: 2px solid transparent; white-space: nowrap; }
.a-nav a[aria-current=page] { color: var(--green); border-bottom-color: var(--green); font-weight: 500; }
.a-main { padding-top: 20px; padding-bottom: 64px; }
.a-narrow { max-width: 380px; margin: 32px auto; }
.pin-input { font-size: 24px !important; letter-spacing: .4em; text-align: center; }
.a-title { font-family: var(--serif); font-size: 2rem; color: var(--green); font-weight: 600; margin-bottom: 14px; line-height: 1.15; }
.a-subtitle { font-family: var(--serif); font-size: 1.5rem; color: var(--green); font-weight: 600; margin-bottom: 12px; }
.a-section { margin-top: 32px; }
.muted { color: var(--muted); font-size: 14px; }
.back { font-size: 15px; text-decoration: none; display: inline-block; padding: 6px 0; margin-bottom: 8px; }

.a-card { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 16px; margin-bottom: 16px; }
.a-card-head { display: flex; gap: 14px; align-items: flex-start; text-decoration: none; color: inherit; }
.a-card-title { font-family: var(--serif); font-size: 1.6rem; color: var(--green); font-weight: 600; line-height: 1.1; margin-bottom: 4px; }
.thumb { flex: none; object-fit: cover; border-radius: 2px; background: var(--cream); }
.thumb--sm { width: 76px; height: 76px; }
.thumb--lg { width: 104px; height: 104px; }
.thumb--empty { display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--muted); border: 1px dashed var(--line-strong); }

.badge {
  display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: 2px;
  font-size: 12px; font-weight: 600; letter-spacing: .03em; vertical-align: middle;
  background: #f1efe6; color: var(--muted);
}
.badge--live, .badge--reserved { background: var(--ok-bg); color: var(--green); }
.badge--paused { background: var(--warn-bg); color: #6d5a12; }
.badge--out { background: #f3e6dd; color: #7a3e22; }
.badge--handed { background: #eceae2; color: var(--ink); }
.badge--cancelled { background: var(--error-bg); color: var(--error); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 16px 0 0; border: 1px solid var(--line); border-radius: 3px; }
.stats > div { padding: 10px 8px; text-align: center; border-left: 1px solid var(--line); }
.stats > div:first-child { border-left: 0; }
.stats dt { font-size: 12px; color: var(--muted); }
.stats dd { margin: 0; font-size: 1.5rem; font-weight: 600; color: var(--green); line-height: 1.2; }

.actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.actions > * { flex: 1 1 auto; }
.actions form { display: flex; }
.actions form .btn, .actions > .btn { width: 100%; }
.actions--wrap > * { flex: 1 1 calc(50% - 8px); }

.flash { padding: 12px 14px; margin-bottom: 16px; border-radius: 3px; font-size: 15px; background: var(--ok-bg); color: var(--green); border-left: 3px solid var(--green); }
.flash--error { background: var(--error-bg); color: var(--error); border-left-color: var(--error); }
.flash--warn { background: var(--warn-bg); color: #5c4b0e; border-left-color: #b39a2e; }

.a-form { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 18px 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.photo-field { display: grid; gap: 10px; }
.photo-preview { width: 100%; max-height: 320px; object-fit: cover; border-radius: 2px; background: var(--cream); }
.field .file-btn { position: relative; overflow: hidden; display: flex; margin: 0; font-size: 15px; }
.file-btn input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.hint--top { margin: 0 0 10px; }
.win-row {
  display: grid; grid-template-columns: 1fr auto 1fr auto; gap: 8px; align-items: center;
  padding: 10px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
}
.win-row .win-day { grid-column: 1 / 4; }
.win-row .win-remove { grid-column: 4; grid-row: 1; min-width: 40px; padding: 0 8px; font-size: 20px; text-decoration: none; }
.win-dash { color: var(--muted); }
.win-step { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.win-step label { margin: 0; font-weight: 400; white-space: nowrap; }
.win-step select { width: auto; }
.choice.choice--confirm { margin: 6px 0 18px; background: var(--warn-bg); border-color: #d9c98a; }
.a-form > .choice { margin-bottom: 18px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.form-actions .btn { flex: 1 1 auto; }

.a-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); font-size: 15px; }
.a-table th, .a-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-weight: 400; }
.a-table thead th { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .04em; }
.a-table tbody th { font-weight: 500; }

.res-list { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: 4px; }
.res { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.res:last-child { border-bottom: 0; }
.res-name { font-weight: 600; font-size: 16px; }
.res-name .badge { margin: 0 0 0 6px; }
.res-meta { font-size: 15px; color: var(--muted); margin-top: 2px; }
.res-meta strong { color: var(--ink); }
.res-contact { font-size: 15px; margin-top: 2px; }
.res-pickup { font-size: 15px; font-weight: 600; color: var(--green); margin-top: 2px; }
.a-pickup { margin-top: 12px; }
.a-table--slots { margin-bottom: 12px; }
.a-table caption { text-align: left; font-weight: 600; padding: 4px 0 8px; color: var(--green); }
.a-table--slots th { width: 64px; }
.res-note { font-size: 15px; margin-top: 6px; padding: 8px 10px; background: var(--cream); border-left: 2px solid var(--olive); white-space: pre-line; }
.res-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: flex-start; }
.res--handed .res-name, .res--cancelled .res-name { color: var(--muted); }
.qty-edit summary { list-style: none; }
.qty-edit summary::-webkit-details-marker { display: none; }
.qty-form { display: flex; gap: 8px; margin-top: 8px; }
.qty-form input { width: 96px; min-height: 40px; }
.cancelled { margin-top: 16px; }
.cancelled summary { cursor: pointer; padding: 8px 0; color: var(--muted); }

.a-list { list-style: none; padding: 0; margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 4px; }
.a-list-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.a-list-item:last-child { border-bottom: 0; }
.a-list-link { display: flex; gap: 12px; align-items: center; text-decoration: none; color: inherit; }
.a-list-link .thumb--sm { width: 56px; height: 56px; }

.loc-list { list-style: none; padding: 0; margin: 0 0 12px; }
.loc { margin-bottom: 8px; }
.loc-rename, .loc-add { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.loc-rename input, .loc-add input { flex: 1 1 180px; width: auto; min-height: 44px; }
.loc--inactive input { color: var(--muted); background: #f6f5f0; }
.qr--admin { width: 160px; margin: 0 0 8px; }

@media (max-width: 380px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats > div:nth-child(3) { border-left: 0; }
  .stats > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
