/* =====================
   Silver Loaf — Rye & Espresso (light, clean)
   ===================== */

/* -------- Tokens -------- */
:root{
  --bg:#F6F1E7;
  --paper:#FFFFFF;
  --espresso:#3E2F23;
  --espresso-20:rgba(62,47,35,.2);
  --sage:#7A8B79;
  --wheat:#C8A97E;
  --sand:#EDE2D4;
  --muted:#6E6258;

  --radius:14px;
  --radius-sm:10px;
  --shadow-sm:0 2px 10px rgba(0,0,0,.05);
  --shadow-md:0 12px 24px rgba(0,0,0,.12);

  /* set by JS (logo shrink) */
  --topbar-h:124px;
  --header-pad-v:12px;
}

/* -------- Base -------- */
*{ box-sizing:border-box; }
html,body{ height:100%; }
/* Globální základ velikosti písma */
html {
  font-size: 12px;   /* zkus 15px; když chceš ještě menší, dej 14px */
}
body{
  margin:0;
  background:var(--bg);
  color:var(--espresso);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  font-family:"Outfit",system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  font-weight:300;
  line-height:1.55;
}
img{ max-width:100%; height:auto; display:block; }

.container{
  width:100%;
  max-width:1200px;
  margin:0 auto;
  padding:0 16px;
}
.container.fullbleed{ max-width:none; padding:0; }

.muted{ color:var(--muted); }
.hidden{ display:none !important; }

/* -------- Typography -------- */
h1,h2,h3{
  margin:.25rem 0 .65rem 0;
  line-height:1.25;
  color:var(--espresso);
  letter-spacing:.02em;
}
h1{ font-weight:500; font-size:clamp(1.2rem,1.0vw + 1rem,1.6rem); }
h2{ font-weight:400; font-size:clamp(1.05rem,0.8vw + .9rem,1.3rem); color:var(--muted); }
h3{ font-weight:400; font-size:.95rem; color:var(--muted); }
p,li{ font-weight:300; font-size:.95rem; }

/* -------- Buttons -------- */
.btn{
  display:inline-block;
  background:#fff;
  color:var(--espresso);
  border:1px solid var(--espresso-20);
  border-radius:999px;
  padding:.44rem .77rem;    /* bylo .36 .64  → +~20% */
  font-weight:500;
  font-size:1.0rem;         /* bylo .84rem   → +~20% */
  text-decoration:none;
  box-shadow:var(--shadow-sm);
  cursor:pointer;
  transition:transform .06s ease, filter .12s ease;
}
.btn:hover{ filter:brightness(.98); }
.btn:active{ transform:translateY(1px); }
.btn[disabled]{ opacity:.45; cursor:not-allowed; }
.btn.primary{
  background:var(--espresso);
  color:#fff;
  border-color:rgba(0,0,0,.18);
}

/* -------- Cards -------- */
.card{
  background:var(--paper);
  border:1px solid var(--espresso-20);
  border-radius:var(--radius);
  box-shadow:var(--shadow-sm);
  padding:1rem;
}

/* -------- Topbar (sticky) -------- */
.topbar{
  position:fixed;
  inset:0 0 auto 0;
  z-index:1000;
  background:var(--sand);
  border-bottom:1px solid rgba(0,0,0,.06);
}
.topbar-inner{
  display:flex;
  align-items:center;
  gap:1rem;
  padding: var(--header-pad-v) 16px; /* vertikál + vodorovné mezery */
}
.main-menu{
  display:flex;
  align-items:center;
  gap:1rem;
  margin-right:auto;
  white-space:nowrap;
}
.main-menu a{
  color:var(--espresso);
  font-weight:500;
  text-decoration:none;
  border-bottom:2px solid transparent;
  padding-bottom:2px;
  font-size:.95rem;
}
.main-menu a:hover{ border-color:var(--sage); }

.nav-order{
  background:var(--espresso);
  color:#fff !important;
  border-radius:6px;
  padding:4px 14px !important;
  border-bottom:none !important;
  margin-right:4px;
}
.nav-order:hover{ background:#2c2420; border-color:transparent !important; }

/* Home hero variant — glass pill over dark photo */
.nav-order-home{
  background:rgba(255,255,255,.18);
  border-radius:6px;
  padding:4px 14px;
  border:1.5px solid rgba(255,255,255,.55);
  backdrop-filter:blur(4px);
  -webkit-backdrop-filter:blur(4px);
}
.nav-order-home:hover{ background:rgba(255,255,255,.32); }

.brand-logo{ display:block; line-height:0; margin-left:auto; }
@media (max-width:640px){
  .main-menu{ display:flex; } /* JS zobrazí po zmenšení loga */
}
.topbar-spacer{ height:var(--topbar-h); }

/* -------- Floating “Order” -------- */
.fab-order{
  position:fixed;
  right:18px;
  z-index:1001;
  background:var(--espresso);
  color:#fff;
  border-radius:999px;
  padding:.75rem 1.05rem;
  font-weight:600;
  text-decoration:none;
  box-shadow:var(--shadow-md);
  border:1px solid rgba(0,0,0,.12);
}
.fab-order:hover{ filter:brightness(.95); }
@media (min-width:900px){ .fab-order{ top:calc(var(--topbar-h) + 30px); bottom:auto; } }
@media (max-width:899.98px){ .fab-order{ right:16px; bottom:16px; } }

/* =====================
   ORDER — Calendar
   ===================== */
.calendar{ display:grid; gap:16px; }
@media (min-width:900px){
  .calendar{ grid-template-columns:repeat(3,minmax(0,1fr)); }
}

.day{
  background:var(--paper);
  border:1px solid var(--espresso-20);
  border-radius:var(--radius);
  box-shadow:var(--shadow-sm);
  padding:.75rem;
}
.day h3{
  margin:.2rem 0 .6rem;
  font-weight:700;
  font-size:1.05rem;
  color:var(--muted);
  text-align:center;
}

.slot{
  display:grid;
  grid-template-columns:1fr auto auto;
  align-items:center;
  gap:.6rem;
  padding:.55rem .72rem;
  border:1px solid rgba(0,0,0,.06);
  border-radius:var(--radius-sm);
  background:#fff;
  margin-bottom:.5rem;
}
.slot:last-child{ margin-bottom:0; }
.slot-title{
  font-weight:500;
  letter-spacing:.02em;
  font-size:.9rem;
}
.slot-qty{
  font-size:.74rem;
  color:var(--muted);
  font-weight:300;
}
.slot .btn{
  font-size:.96rem;         /* bylo .80rem   → +~20% */
  padding:.38rem .67rem;    /* bylo .32 .56  → +~20% */
  white-space:nowrap;
  font-weight:600;
}

.slot.soldout{ opacity:.55; }
.slot.soldout .btn{ pointer-events:none; }

/* =====================
   Modal & Forms
   ===================== */
.modal{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.38);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:1100;
}
.modal:not(.hidden){ display:flex; }

.modal-box{
  width:min(640px,92vw);
  background:var(--paper);
  border:1px solid var(--espresso-20);
  border-radius:16px;
  box-shadow:var(--shadow-md);
  padding:1rem;
  position:relative;
}
.modal-box h2{ margin-top:0; font-weight:600; }
.modal .close{
  position:absolute;
  right:.5rem; top:.5rem;
  width:36px; height:36px;
  border-radius:999px;
  background:#fff;
  color:var(--espresso);
  border:1px solid rgba(0,0,0,.12);
  box-shadow:var(--shadow-sm);
  cursor:pointer;
}

.grid{ display:grid; gap:.8rem; grid-template-columns:1fr; }
@media (min-width:640px){
  .grid{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .grid > .btn.primary{ grid-column:span 2; justify-self:start; }
  .grid #result{ grid-column:span 2; justify-self:end; }
}

label span{
  display:block;
  font-size:.9rem;
  color:var(--muted);
  margin-bottom:.25rem;
  font-weight:400;
}
input,select{
  width:100%;
  border:1px solid rgba(0,0,0,.14);
  border-radius:10px;
  padding:.6rem .7rem;
  font:inherit;
  color:var(--espresso);
  background:#fff;
}
input:focus,select:focus{
  outline:none;
  border-color:var(--wheat);
  box-shadow:0 0 0 3px rgba(200,169,126,.18);
}

#result{
  text-align:right;
  color:#1d6b36;
  font-weight:600;
}
#result .sub{
  font-weight:400;
  color:var(--muted);
  font-size:.9rem;
  display:block;
  margin-top:.15rem;
}

/* =====================
   HOMEPAGE — Full-bleed gallery
   ===================== */
.gallery{ display:grid; grid-template-columns:1fr; gap:0; }
.photo{ margin:0; padding:0; border-radius:0; overflow:hidden; background:transparent; border:none; box-shadow:none; }
.photo > img{ width:100%; height:auto; display:block; }

/* =====================
   Small helpers
   ===================== */
code{
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
  background:rgba(0,0,0,.04);
  padding:.1rem .35rem;
  border-radius:6px;
  border:1px solid rgba(0,0,0,.06);
}

/* --- Utilities --- */
.stack{ display: grid; gap: 1rem; }

/* Mobile-only buttons (pevnější specifita) */
.only-mobile{ display: none !important; }
@media (max-width: 899.98px){
  .only-mobile{ display: inline-block !important; }
}

/* === BREAD CALCULATOR STYLES (BEGIN) === */
:root{ --ink:#1c1c1c; --paper:#fff; --muted:#67625a; --line:rgba(0,0,0,.1); --brand:#3E2F23 }
html,body{ font-family:'Outfit',system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif }

.calc-header{ display:flex; align-items:center; justify-content:space-between; padding:12px 16px; border-bottom:1px solid var(--line) }
.calc-header h1{ font-weight:800; letter-spacing:.2px; margin:0 }

.card{ background:var(--paper); border:1px solid var(--line); border-radius:16px; padding:16px; margin:16px 0; box-shadow:0 1px 2px rgba(0,0,0,.04) }
.card h2{ margin:0 0 10px; font-size:20px }

.grid-3{ display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:12px }
.row{ display:flex; gap:8px; flex-wrap:wrap }
label{ display:flex; flex-direction:column; gap:6px }
label span{ font-size:14px; color:var(--muted) }
input[type=number], input[type=text], select { padding:10px 12px; border:1px solid var(--line); border-radius:12px; font:inherit; background:#fff }
small{ color:var(--muted) }

.pill{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 12px; border:1px dashed var(--line); border-radius:999px; background:#faf9f7 }
.pill-strong{ background:#fff6e9; border-color:#f2d9a6 }

/* Baker toggle */
.baker-toggle{display:inline-flex;align-items:center;gap:.5rem}
.baker-toggle button{min-width:48px;padding:.25rem .6rem;border:1px solid rgba(0,0,0,.15);border-radius:999px;background:#fff;cursor:pointer;font:inherit}
.baker-toggle button[aria-pressed=true]{background:var(--brand);color:#fff}

/* Nutrition label visuals */
#nutrition{ display:flex; align-items:flex-start; gap:16px; flex-wrap:wrap }
.nf-card{ width:min(360px, 100%); background:#fff; color:#000; padding:12px 12px 14px; border:2px solid #000; font-family:Arial, Helvetica, sans-serif; line-height:1.2 }
.nf-title{font-weight:800;font-size:26px;border-bottom:10px solid #000;margin-bottom:6px}
.nf-serving,.nf-servings{font-size:12px;margin:.2rem 0}
.nf-thick{border:0;border-top:6px solid #000;margin:.35rem 0}
.nf-calories{display:flex;justify-content:space-between;align-items:flex-end;font-weight:700;font-size:22px;margin:.2rem 0}
.nf-dv{font-size:11px;margin:.2rem 0}
.nf-row,.nf-subrow{display:flex;justify-content:space-between;border-top:1px solid #000;padding:.2rem 0;font-size:13px}
.nf-subrow{padding-left:10px}
.nf-micro{font-size:11px;margin:.4rem 0}
.nf-footnote{font-size:10px;margin-top:.5rem;color:#333}
.nf-actions{display:flex;gap:.5rem;margin-top:.6rem}
/* === BREAD CALCULATOR STYLES (END) === */


/* Admin product editor modal */
#prod-editor-backdrop[hidden]{ display:none; }
#prod-editor-backdrop{
  position: fixed; inset: 0; z-index: 1000;
}
#prod-editor-backdrop .modal-backdrop{
  position:absolute; inset:0; background:rgba(0,0,0,.35); backdrop-filter: blur(2px);
}
#prod-editor-backdrop .modal-card{
  position: relative; background:#fff; max-width: 720px; width:min(96vw, 720px);
  margin: 5vh auto; padding: 1rem 1.125rem; border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,.25);
}
#prod-editor-backdrop .modal-close{
  position:absolute; top:.4rem; right:.5rem; border:0; background:transparent; font-size:1.6rem; cursor:pointer;
}
#admin-products table.table td code { font-size: .9em; }
#admin-products .card.subtle { padding: .75rem 1rem; border: 1px solid rgba(0,0,0,.08); border-radius: 12px; background: #fafafa; }


/* ---- Product thumbs (order page) ---- */
.product-thumbs{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(120px,1fr));
  gap:.75rem;
}
.product-thumb{
  display:grid;
  grid-template-rows: auto 1fr auto;
  gap:.35rem;
  padding:.4rem;
  border:1px solid rgba(0,0,0,.06);
  border-radius: var(--radius-sm);
  background:#fff;
  cursor:pointer;
  text-align:center;
}
.product-thumb:focus{ outline:2px solid var(--espresso-20); outline-offset:2px; }
.product-thumb .thumb-desc{
  font-size: 1.1rem;
  color:var(--muted);
  line-height:1.3;
  display:block;
  overflow:visible;
  /* allow full description to show; slightly taller box */
  min-height:3.2em;
}
.product-thumb .thumb-img{
  width:100%;
  aspect-ratio:1/1;
  overflow:hidden;
  border-radius: var(--radius-sm);
  display:block; align-self:end;
}
.product-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.product-thumb .thumb-label{ font-weight:600; font-size:.85rem; margin-top:.35rem; }

.product-thumb.active, .product-thumb:hover{
  box-shadow: var(--shadow-sm);
  border-color: var(--espresso-20);
}

/* Calendar filter states */
.slot.dim{ opacity:.35; }
.slot.highlight{ outline:2px solid var(--sage); box-shadow: var(--shadow-sm); }


/* --- Homepage hero video & overlay --- */
body.no-topbar .topbar, body.no-topbar .topbar-spacer{ display:none !important; }

.hero-video{
  position:fixed; inset:0; width:100%; height:100vh; object-fit:cover; z-index:-1;
  filter: none;
}

.overlay-nav{
  position:fixed; top:0; left:0; right:0; z-index:50;
  pointer-events:none;
}
.overlay-nav .nav-inner{
  display:flex; align-items:center; justify-content:space-between; padding:16px 24px;
}
.overlay-menu a{
  pointer-events:auto;
  display:inline-block; margin-right:18px;
  font-size:1.25rem; font-weight:600; color:#fff; text-decoration:none;
  text-shadow: 0 1px 0 rgba(0,0,0,.45), 0 6px 18px rgba(0,0,0,.6);
}
.overlay-menu a:last-child{ margin-right:0; }
.overlay-logo{
  pointer-events:auto;
  display:block;
}
.overlay-logo img{
  height:72px; width:auto; object-fit:contain;
  filter:none;
}
@media (max-width: 1024px){ .overlay-logo img{ height:56px; } }
@media (max-width: 640px){ .overlay-logo img{ height:44px; } }

/* Hero spacer with copy that scrolls away */
.hero-spacer{
  min-height:75vh; display:flex; align-items:flex-end; padding:90px 0 40px 0;
}
.hero-title, .hero-sub, .section-title{
  color:#fff;
  text-shadow: 0 1px 0 rgba(0,0,0,.45), 0 6px 22px rgba(0,0,0,.65);
}
.hero-title{ font-size:2.2rem; margin:0 0 .35rem 0; max-width:800px; }
.hero-sub{ font-size:1.4rem; margin:0; max-width:800px; }
.section-title{ font-size:2.2rem; margin: 0 0 .75rem 0; }

/* Product thumbnails on home (reuse look, but simple grid responsive) */
.product-thumbs.home{
  display:grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap:16px;
  margin-bottom:24px;
}
.product-thumbs.home .product-thumb{
  background:rgba(255,255,255,.9); border:1px solid var(--espresso-20); border-radius:var(--radius);
  padding:10px; box-shadow:var(--shadow-sm);
}
.product-thumbs.home .product-thumb{
  display:block;
  color:inherit;
  text-decoration:none;
  transition:transform .08s ease, box-shadow .12s ease, filter .14s ease;
}
.product-thumbs.home .product-thumb:hover{ transform:translateY(-2px); box-shadow:var(--shadow-md); filter:brightness(1.02); }
.product-thumbs.home .thumb-img{ aspect-ratio: 4 / 3; overflow:hidden; border-radius:var(--radius); }
.product-thumbs.home .thumb-img img{ width:100%; height:100%; object-fit:cover; }
.product-thumbs.home .thumb-label{ font-weight:600; margin-top:.5rem; }
.product-thumbs.home .thumb-next{ font-size:.9rem; color:var(--muted); margin-top:.15rem; }

/* One-column gallery stream */
.gallery-onecol .gallery-stream{ max-width:1200px; margin-top:50px; }
.gallery-onecol .gallery-photo{ margin:0 0 50px 0; }
.gallery-onecol .gallery-photo img{ width:100%; height:auto; display:block; }

.gallery-onecol .gallery-photo img{ border-radius: var(--radius); }

/* === Canonical header logo sizing (no JS shrink) === */
.brand-logo img{ display:block; height:72px; width:auto; opacity:.96; }
@media (max-width:640px){
  .brand-logo img{ height:60px; width:auto; }
  .main-menu{ display:flex; } /* keep menu visible on mobile */
}

/* Admin – Orders: widen "Contacts" column and prevent wrapping */
.card .table thead th.col-cont { 
  width: 300px;          /* uprav podle potřeby (např. 260px) */
}

.card .table tbody td:nth-child(7) {
  white-space: nowrap;   /* tel + email na jeden řádek */
}

.card .table tbody td:nth-child(7) a {
  white-space: nowrap;   /* jistota i pro odkazy */
}

/* Admin · Orders — header alignment */
.card .table thead th { 
  text-align: left;
}
.card .table thead th.col-qty,
.card .table tbody td:nth-child(5) {
  text-align: center;
}

/* Admin · Orders — horizontal scroll for small screens */
.card { 
  /* neřeší padding/ostatní styly, pouze plynulé touch-scrollování */
  -webkit-overflow-scrolling: touch;
}

/* Tabulka nesmí kolabovat do úzkých sloupců → dáme jí minimální šířku */
.card .table {
  min-width: 1400px;   /* můžeš upravit – viz níže doporučené šířky */
  table-layout: auto;  /* necháme prohlížeč dopočítat */
}

/* Nepřelamovat kontakty (ať se čísla neuseknou) */
.card .table tbody td:nth-child(7),
.card .table tbody td:nth-child(7) a {
  white-space: nowrap;
}




/* === ORDER PAGE: Intro text typography ===
   You can tweak font size/line-height/gap via the variables below.
   Change them here:
     --intro-font-size: 1.0rem;   // overall size of intro paragraphs
     --intro-line-height: 1.6;    // line height
     --intro-gap: .45rem;         // vertical gap between paragraphs
*/
.order-intro{
  --intro-font-size: 1.2rem;
  --intro-line-height: 1.6;
  --intro-gap: .45rem;
}
.order-intro p{
  margin: 0;
  margin-top: var(--intro-gap);
  font-size: var(--intro-font-size);
  line-height: var(--intro-line-height);
  color: var(--muted);
}
.order-intro p:first-child{ margin-top: 0; }
@media (min-width: 768px){
  .order-intro{ --intro-font-size: 1.4rem; }
}
/* About page — Our story image */
.story-photo{
  float:right;
  max-width:260px;
  width:100%;
  margin:0 0 1rem 1.25rem;
  border-radius:10px;
  display:block;
}
@media (max-width:700px){
  .story-photo{
    float:none;
    max-width:100%;
    margin:0 0 1rem 0;
  }
}

/* ── Order Cart (multi-item checkout) ───────────────────────────────────── */
.cart-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .5rem 0;
  border-bottom: 1px solid rgba(0,0,0,.07);
  gap: .75rem;
}
.cart-row:last-child { border-bottom: none; }
.cart-row-soldout { opacity: .45; }
.cart-row-name {
  flex: 1;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.cart-soldout-badge {
  font-size: .72rem;
  background: #f3f4f6;
  color: #6b7280;
  border-radius: 4px;
  padding: 1px 6px;
  font-weight: 500;
  letter-spacing: .02em;
}
.cart-row-controls {
  display: flex;
  align-items: center;
  gap: .4rem;
}
.cart-qty-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,.18);
  background: #fff;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background .12s;
  color: var(--espresso);
}
.cart-qty-btn:hover:not(:disabled) { background: #f3f4f6; }
.cart-qty-btn:disabled { opacity: .3; cursor: not-allowed; }
.cart-qty-display {
  min-width: 4rem;
  width: 4rem;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 600;
  border: 1px solid rgba(0,0,0,.18);
  border-radius: 6px;
  padding: .2rem .4rem;
  -moz-appearance: textfield;
}
.cart-qty-display::-webkit-inner-spin-button,
.cart-qty-display::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* ── Checkout page ──────────────────────────────────────────────────────── */
.checkout-page { max-width: 600px; }
.checkout-form { display: flex; flex-direction: column; gap: 0; }
.checkout-section { margin-bottom: 1.5rem; }
.checkout-section label {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  margin-bottom: .75rem;
}
.checkout-section-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 .75rem;
  padding-bottom: .35rem;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.checkout-total-row {
  display: flex;
  justify-content: flex-end;
  padding: .4rem 0 .1rem;
  font-size: 1.05rem;
  font-weight: 600;
}
.checkout-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: .5rem;
  padding-top: .75rem;
  border-top: 1px solid rgba(0,0,0,.08);
}
.checkout-back-link {
  color: var(--muted);
  text-decoration: none;
  font-size: .95rem;
}
.checkout-back-link:hover { text-decoration: underline; color: var(--espresso); }
.checkout-field-row { display: flex; gap: 1rem; margin-bottom: .75rem; }
.checkout-field-full { display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.checkout-field { display: flex; flex-direction: column; gap: .3rem; flex: 1; }
@media (max-width: 540px) { .checkout-field-row-split { flex-direction: column; } }

/* result messages */
.result-success { color: #1d6b36; font-weight: 600; }
.result-subtle  { color: var(--muted); font-size: .9rem; margin-top: .15rem; }

/* "Add more" dropdown */
.add-more-row {
  margin-top: .75rem;
}
.add-more-select {
  width: 100%;
  padding: .55rem .75rem;
  border: 1.5px dashed rgba(0,0,0,.22);
  border-radius: 10px;
  background: #faf9f7;
  font-size: .95rem;
  font-family: inherit;
  color: var(--espresso, #3b2a1a);
  cursor: pointer;
  appearance: auto;
  -webkit-appearance: auto;
}
.add-more-select:focus {
  outline: 2px solid var(--espresso, #3b2a1a);
  outline-offset: 2px;
}

/* Fade-in for progressively added rows */
@keyframes sl-row-in {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cart-row-new {
  animation: sl-row-in 0.2s ease forwards;
}
.add-more-row {
  animation: sl-row-in 0.15s ease forwards;
}
@media (prefers-reduced-motion: reduce) {
  .cart-row-new, .add-more-row { animation: none; }
}

/* =====================
   OUR BAKES — Product cards
   ===================== */

.bakes-subsection { margin: 2.25rem 0 1rem; }
.bakes-subsection-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--espresso);
  margin: 0 0 1rem;
  padding-bottom: .45rem;
  border-bottom: 2px solid var(--wheat);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.bakes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
@media (max-width: 640px) {
  .bakes-grid { grid-template-columns: 1fr; }
}

.bakes-card {
  background: var(--paper);
  border: 1px solid var(--espresso-20);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s ease;
}
.bakes-card:hover { box-shadow: var(--shadow-md); }

.bakes-card-img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--sand);
}
.bakes-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
@media (prefers-reduced-motion: no-preference) {
  .bakes-card:hover .bakes-card-img img { transform: scale(1.04); }
}

.bakes-card-body {
  padding: 1rem 1rem .9rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.bakes-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .5rem;
  margin-bottom: .1rem;
}
.bakes-card-name {
  margin: 0;
  font-size: .98rem;
  font-weight: 500;
  color: var(--espresso);
  line-height: 1.3;
}
.bakes-card-price {
  font-size: .95rem;
  font-weight: 600;
  color: var(--espresso);
  white-space: nowrap;
  flex-shrink: 0;
}
.bakes-card-desc {
  margin: 0;
  font-size: .87rem;
  line-height: 1.5;
  color: var(--muted);
}
.bakes-card-weight {
  margin: 0;
  font-size: .78rem;
  color: var(--muted);
  font-style: italic;
}
.bakes-card-ingr {
  margin: 0;
  font-size: .8rem;
  line-height: 1.5;
  color: var(--muted);
}
.bakes-card-ingr strong { color: var(--espresso); font-weight: 500; }
.bakes-nf-btn {
  background: none;
  border: none;
  padding: 0;
  margin-top: .4rem;
  color: var(--sage);
  font-size: .8rem;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  align-self: flex-start;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.bakes-nf-btn:hover { color: var(--espresso); }

.bakes-cta { margin: 2.5rem 0 1rem; text-align: center; }

/* =====================
   PAGE HERO (Cookies, Gallery, etc.)
   ===================== */
.page-hero {
  position: relative;
  width: 100%;
  height: 260px;
  overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: 1.75rem;
}
.page-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.1) 0%, rgba(0,0,0,.55) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 1.5rem 1rem;
  text-align: center;
}
.page-hero-title {
  color: #fff;
  font-size: clamp(1.3rem, 2vw + 1rem, 2rem);
  font-weight: 500;
  margin: 0 0 .35rem;
  letter-spacing: .02em;
  text-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.page-hero-sub {
  color: rgba(255,255,255,.88);
  font-size: .92rem;
  margin: 0;
  max-width: 480px;
  text-shadow: 0 1px 3px rgba(0,0,0,.35);
}
@media (min-width: 640px)  { .page-hero { height: 340px; } }
@media (min-width: 900px)  { .page-hero { height: 400px; } }

/* =====================
   ADAM'S STORY
   ===================== */
.adam-story {
  background: var(--sand);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem 1.2rem;
  margin: 0 0 2rem;
  line-height: 1.65;
}
.adam-story h2 { margin-top: 0; color: var(--espresso); }
.adam-story p  { margin: 0 0 .75rem; font-size: .92rem; }
.adam-story p:last-child { margin: 0; }
.adam-story em { font-style: italic; }

/* =====================
   COOKIES SUPPORT NOTE
   ===================== */
.cookies-support {
  text-align: center;
  background: var(--sand);
  border-radius: var(--radius);
  padding: .9rem 1.5rem;
  margin: 2rem 0 1rem;
  font-size: .88rem;
  color: var(--muted);
}

/* Active nav link */
.main-menu a[aria-current="page"] { border-color: var(--espresso); }

/* =====================
   NUTRITION MODAL
   ===================== */
/* <dialog> based modal */
#nf-dialog {
  border: none;
  border-radius: var(--radius);
  max-width: 420px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
  padding: 1.25rem 1.25rem 1.5rem;
  position: relative;
}
#nf-dialog::backdrop {
  background: rgba(0,0,0,.45);
}
.nf-modal-close {
  position: absolute;
  top: .6rem;
  right: .6rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding: 0;
}
.nf-modal-close:hover { background: var(--sand); }

.nf-table {
  border: 2px solid #000;
  padding: 8px 10px;
  font-family: Arial, Helvetica, sans-serif;
  color: #000;
  font-size: .84rem;
  margin-top: .5rem;
}
.nf-table-title { font-size: 1.45rem; font-weight: 800; border-bottom: 6px solid #000; padding-bottom: 3px; margin-bottom: 4px; }
.nf-table-sub   { font-size: .72rem; line-height: 1.4; margin: 3px 0 5px; }
.nf-table-row   { display: flex; justify-content: space-between; border-top: 1px solid #000; padding: 4px 0; gap: .5rem; }
.nf-table-row.bold { font-weight: 700; font-size: 1rem; }
.nf-table-row.indent { padding-left: 12px; }
.nf-table-row small { color: #555; }
.nf-table-note  { font-size: .68rem; margin-top: 5px; color: #444; line-height: 1.4; }

/* ── Gallery page ─────────────────────────────────────────────── */
.gallery-page-intro {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 580px;
  margin: 0 auto 2.25rem;
}
.gallery-page-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 768px) {
  .gallery-page-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}
@media (max-width: 420px) {
  .gallery-page-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
}
.gallery-thumb {
  display: block;
  background: var(--sand);
  border: none;
  padding: 0;
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1;
  position: relative;
  width: 100%;
}
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.gallery-thumb:hover img { transform: scale(1.05); }

/* -------- Mobile hamburger navigation -------- */
.hamburger-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  border-radius: 8px;
  color: var(--espresso);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 150ms ease;
}
.hamburger-btn:hover { background: rgba(62,47,35,.08); }
.hamburger-btn:focus-visible { outline: 2px solid var(--wheat); outline-offset: 2px; }
.hamburger-btn .close-icon { display: none; }
.hamburger-btn[aria-expanded="true"] .hamburger-icon { display: none; }
.hamburger-btn[aria-expanded="true"] .close-icon { display: flex; }

.mobile-nav {
  display: none;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 998;
  background: var(--sand);
  border-bottom: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 8px 24px rgba(62,47,35,.12);
  transform: translateY(calc(-100% - 2px));
  transition: transform 250ms ease;
  pointer-events: none;
}
.mobile-nav.is-open {
  transform: translateY(var(--topbar-h));
  pointer-events: auto;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  padding: 8px 0 12px;
}
.mobile-nav-links a {
  display: block;
  padding: 13px 24px;
  color: var(--espresso);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: background 150ms ease, border-color 150ms ease;
}
.mobile-nav-links a:hover { background: rgba(62,47,35,.06); }
.mobile-nav-links a[aria-current="page"] {
  border-left-color: var(--wheat);
  background: rgba(200,169,126,.12);
}
.mobile-nav-order {
  background: var(--espresso) !important;
  color: #fff !important;
  border-radius: 8px;
  margin: 10px 16px 4px;
  padding: 12px 20px !important;
  border-left: none !important;
  text-align: center;
}
.mobile-nav-order:hover { background: #2c2420 !important; }
.mobile-nav-order[aria-current="page"] {
  border-left-color: transparent !important;
  background: var(--espresso) !important;
}

.mobile-nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 997;
  background: rgba(62,47,35,.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease;
}
.mobile-nav-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

body.mobile-nav-open { overflow: hidden; }

@media (max-width: 768px) {
  :root { --topbar-h: 64px; }
  .hamburger-btn { display: flex; }
  .main-menu { display: none !important; }
  .mobile-nav { display: flex; }
  .mobile-nav-backdrop { display: block; }
  .topbar-inner { padding: 10px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-nav, .mobile-nav-backdrop { transition: none; }
}

/* -------- Adam story photo -------- */
.adam-story-photo {
  float: right;
  width: 100%;
  max-width: 260px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 14px;
  margin: 0 0 20px 28px;
  box-shadow: 0 4px 18px rgba(62,47,35,.13);
}
@media (max-width: 520px) {
  .adam-story-photo {
    float: none;
    display: block;
    max-width: 100%;
    aspect-ratio: 4/3;
    margin: 0 0 20px 0;
  }
}
.adam-story::after { content:''; display:table; clear:both; }
.gallery-thumb:focus-visible {
  outline: 3px solid var(--wheat);
  outline-offset: 3px;
}

/* Gallery lightbox dialog */
#gallery-dialog {
  background: #111;
  border: none;
  padding: 0;
  max-width: 95vw;
  max-height: 95vh;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
#gallery-dialog::backdrop { background: rgba(0,0,0,.78); }
#gallery-dialog-img {
  display: block;
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 6px;
}
.gallery-dialog-close {
  position: absolute;
  top: .55rem;
  right: .55rem;
  background: rgba(255,255,255,.18);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.4rem;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
  z-index: 1;
  transition: background .15s;
}
.gallery-dialog-close:hover { background: rgba(255,255,255,.32); }
.gallery-empty-note {
  text-align: center;
  color: var(--muted);
  padding: 3rem 0;
  font-size: 1rem;
}

/* ── Cookies full-width hero ──────────────────────────────────── */
.cookies-hero-wide {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
}
.cookies-hero-wide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}
@media (min-width: 640px)  { .cookies-hero-wide { height: 290px; } }
@media (min-width: 900px)  { .cookies-hero-wide { height: 350px; } }
@media (min-width: 1200px) { .cookies-hero-wide { height: 400px; } }

/* ── Bakes card clickable (overlay link) ─────────────────────── */
.bakes-card { position: relative; cursor: pointer; }
.bakes-card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: var(--radius);
}
.bakes-nf-btn { position: relative; z-index: 2; }
