/* ==========================================================================
   Bistro Borek — zamawiarka i panel obsługi
   Paleta: butelkowa zieleń + czerń, złoto jako akcent, krem/papier jako tło.
   Typografia: szeryf (karta dań) + systemowy sans (UI, ceny — tabular).
   ========================================================================== */

:root {
  --green: #0f3b2d;
  --green-dark: #082a1f;
  --green-deep: #061f17;
  --green-mid: #1d5a45;
  --green-hover: #174a38;
  --green-soft: #e5ede7;
  --gold: #c69a43;
  --gold-light: #e5c982;
  --gold-deep: #8a6727;
  --gold-wash: #f9f0da;
  --cream: #f4efe3;
  --paper: #fffdf8;
  --ink: #20241f;
  --muted: #5d635c;
  --line: #e4decd;
  --line-strong: #cfc7b0;
  --danger: #a63d20;
  --danger-deep: #872e14;

  --radius-s: 8px;
  --radius-m: 13px;
  --radius-l: 20px;
  --shadow-1: 0 1px 2px rgba(24, 30, 26, 0.05), 0 4px 14px rgba(24, 30, 26, 0.06);
  --shadow-2: 0 10px 34px rgba(8, 24, 17, 0.22);

  --font-display: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, "Times New Roman", serif;
  --font-body: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;

  --cart-width: 376px;
  --touch: 44px;
}

/* --------------------------------------------------------------------------
   Reset i baza
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--cream);
}

h1, h2, h3, h4, p, dl, dd, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
a { color: var(--green-mid); }

:focus-visible {
  outline: 3px solid var(--gold-deep);
  outline-offset: 2px;
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -48px;
  z-index: 200; padding: 10px 16px;
  background: var(--gold-light); color: var(--ink);
  border-radius: var(--radius-s); font-weight: 600; text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 12px; }

/* Widoki przełączane przez app.js */
.view[hidden] { display: none !important; }

/* --------------------------------------------------------------------------
   Przyciski bazowe
   -------------------------------------------------------------------------- */
.primary-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--touch); padding: 10px 22px;
  background: var(--green-mid); color: #fdfbf4;
  border: 1px solid transparent; border-radius: 10px;
  font-weight: 650; letter-spacing: 0.01em;
  transition: background-color 0.15s ease, transform 0.1s ease;
}
.primary-button:hover { background: var(--green-hover); }
.primary-button:active { transform: scale(0.985); }
.primary-button:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.primary-button.block { width: 100%; min-height: 52px; font-size: 17px; }

.secondary-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--touch); padding: 10px 18px;
  background: transparent; color: var(--green-mid);
  border: 1.5px solid var(--green-mid); border-radius: 10px;
  font-weight: 600;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.secondary-button:hover { background: var(--green-soft); }

.icon-button {
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--touch); height: var(--touch);
  border: 1px solid var(--line-strong); border-radius: 50%;
  background: var(--paper); color: var(--muted);
  font-size: 22px; line-height: 1;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.icon-button:hover { color: var(--ink); border-color: var(--muted); }

/* --------------------------------------------------------------------------
   Nagłówek strony
   -------------------------------------------------------------------------- */
.site-header {
  background: var(--green-dark);
  border-bottom: 1px solid rgba(198, 154, 67, 0.35);
}
.site-header-inner {
  max-width: 1160px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}

.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
/* Logotyp jest biały na przezroczystym tle — działa na zieleni i na czerni,
   ale ZNIKNĄŁBY na jasnym. Nie używać go poza ciemnymi pasami. */
.brand-logo { height: 34px; width: auto; display: block; }
@media (max-width: 420px) { .brand-logo { height: 28px; } }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1.5px solid var(--gold);
  box-shadow: inset 0 0 0 3px var(--green-dark), inset 0 0 0 4px rgba(198, 154, 67, 0.5);
  color: var(--gold-light);
  font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: 0.02em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { color: var(--cream); font-family: var(--font-display); font-size: 18px; letter-spacing: 0.02em; }
.brand-text small { color: rgba(244, 239, 227, 0.62); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; }

.header-actions { display: flex; align-items: center; gap: 14px; }
.header-link {
  color: rgba(244, 239, 227, 0.78); text-decoration: none; font-size: 14px;
  padding: 8px 2px; border-bottom: 1px solid transparent;
}
.header-link:hover { color: var(--gold-light); border-bottom-color: var(--gold-light); }

.view-switch {
  display: inline-flex; padding: 3px;
  background: rgba(6, 31, 23, 0.65); border: 1px solid rgba(244, 239, 227, 0.16);
  border-radius: 999px;
}
/* Bez tego atrybut hidden nic nie znaczy: display z klasy wygrywa i klient widzi
   wejscie do panelu. Ta sama pulapka co przy kaflach promocji. */
.view-switch[hidden] { display: none; }
.view-switch-button {
  min-height: 36px; padding: 4px 16px; border: 0; border-radius: 999px;
  background: transparent; color: rgba(244, 239, 227, 0.72); font-size: 14px; font-weight: 600;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.view-switch-button.is-active { background: var(--cream); color: var(--green-dark); }
.site-header :focus-visible { outline-color: var(--gold-light); }

@media (max-width: 519.98px) {
  .header-link { display: none; }
}

/* --------------------------------------------------------------------------
   Hero zamawiarki — konkrety: status, czasy, koszty, przełącznik
   -------------------------------------------------------------------------- */
.shop-hero {
  background:
    radial-gradient(120% 180% at 100% 0%, rgba(198, 154, 67, 0.14) 0%, rgba(198, 154, 67, 0) 46%),
    linear-gradient(168deg, var(--green) 0%, var(--green-dark) 78%);
  color: var(--cream);
  border-bottom: 1px solid rgba(198, 154, 67, 0.4);
}
.shop-hero :focus-visible { outline-color: var(--gold-light); }
.shop-hero-inner { max-width: 1160px; margin: 0 auto; padding: 26px 16px 20px; }

/* Zdjęcie w nagłówku pojawia się dopiero tam, gdzie jest na nie miejsce obok
   treści. Poniżej 1000 px go nie ma — hero i tak niesie godziny, koszty
   dostawy i przełącznik, a karta ma zaczynać się nad linią ekranu. */
.shop-hero-photo { display: none; }
@media (min-width: 1000px) {
  .shop-hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 32px; align-items: center; }
  .shop-hero-photo {
    display: block; width: 260px; height: 260px; object-fit: cover;
    border-radius: var(--radius-l);
    border: 1px solid rgba(198, 154, 67, 0.45);
    box-shadow: 0 18px 40px rgba(4, 16, 12, 0.45);
  }
}

/* --------------------------------------------------------------------------
   Pas promocji — firmowe banery Bistro Borek
   Kafle są linkiem do kategorii, a nie ozdobą: każdy prowadzi tam, gdzie
   promocję da się kliknąć. Na telefonie przewijają się w poziomie z zatrzaskiem.
   -------------------------------------------------------------------------- */
.promo-strip { background: var(--paper); border-bottom: 1px solid var(--line); }
.promo-strip[hidden] { display: none; }
.promo-strip-inner { max-width: 1160px; margin: 0 auto; padding: 18px 16px 20px; }
.promo-strip-title {
  font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-deep); margin-bottom: 10px;
}
/* Jeden kafel na ekran, z zajawką następnego — inaczej baner robi się tak mały,
   że napis „DRUGA PIZZA 50% TANIEJ" przestaje być czytelny. */
.promo-cards {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(86vw, 420px);
  gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 4px; margin: 0; list-style: none;
}
.promo-cards::-webkit-scrollbar { height: 6px; }
.promo-cards::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.promo-card {
  scroll-snap-align: start;
  display: flex; flex-direction: column; width: 100%; padding: 0; overflow: hidden;
  text-align: left; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius-m);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.promo-card:hover { transform: translateY(-2px); border-color: var(--green-dark); box-shadow: var(--shadow-1); }
/* Stała wysokość, bo banery mają różne proporcje (jeden jest przycięty) —
   bez tego kafle w rzędzie kończyłyby się na różnych wysokościach.
   Uwaga: bez `height` atrybut height="…" z HTML-a wygrywa z aspect-ratio
   i baner rozciąga się na pół ekranu. */
.promo-card img { width: 100%; height: 150px; object-fit: cover; object-position: center top; display: block; }
.promo-card-body { padding: 10px 14px 13px; }
.promo-card-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--green-dark); }
.promo-card-note { margin-top: 3px; font-size: 13px; color: var(--muted); line-height: 1.45; }
.promo-card-today {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--paper); background: var(--green-dark); border-radius: 999px; padding: 3px 8px;
}
@media (min-width: 760px) {
  .promo-cards { grid-auto-flow: row; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); overflow: visible; }
}

.shop-hero-head h1 {
  font-family: var(--font-display); font-size: clamp(28px, 5.4vw, 40px);
  line-height: 1.08; letter-spacing: 0.01em; color: #fbf7ec;
}
.shop-hero-sub {
  margin-top: 6px; color: var(--gold-light);
  font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600;
}

.status-chip {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 14px; padding: 7px 14px;
  border-radius: 999px; font-size: 14px; font-weight: 600;
  background: rgba(6, 31, 23, 0.55); border: 1px solid rgba(244, 239, 227, 0.18);
}
.status-chip::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  background: rgba(244, 239, 227, 0.4);
}
.status-chip.is-open { border-color: rgba(154, 205, 158, 0.5); }
.status-chip.is-open::before { background: #8fd39a; box-shadow: 0 0 0 4px rgba(143, 211, 154, 0.18); }
.status-chip.is-closed { color: #f4c9b4; border-color: rgba(244, 201, 180, 0.4); }
.status-chip.is-closed::before { background: #e08a63; }

.shop-facts {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  margin-top: 18px; border: 1px solid rgba(244, 239, 227, 0.16);
  border-radius: var(--radius-m); overflow: hidden;
  background: rgba(244, 239, 227, 0.16);
}
.shop-fact { background: rgba(6, 31, 23, 0.5); padding: 12px 14px; }
.shop-fact dt {
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(244, 239, 227, 0.6); margin-bottom: 3px;
}
.shop-fact dd { font-size: 15.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.shop-fact a { color: var(--gold-light); text-decoration: none; }
.shop-fact a:hover { text-decoration: underline; }

.order-bar { margin-top: 18px; }
.service-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 560px; }
.service-option {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  min-height: 62px; padding: 10px 16px; text-align: left;
  background: transparent; color: var(--cream);
  border: 1.5px solid rgba(244, 239, 227, 0.35); border-radius: var(--radius-m);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.service-option strong { font-size: 16px; }
.service-option small { font-size: 12.5px; opacity: 0.75; }
.service-option.is-selected {
  background: var(--cream); color: var(--green-dark);
  border-color: var(--cream);
  box-shadow: 0 6px 18px rgba(4, 16, 12, 0.35);
}
.service-option.is-selected small { opacity: 0.8; }
.service-option:disabled { opacity: 0.4; cursor: not-allowed; }
.order-bar-note { margin-top: 10px; font-size: 13.5px; color: rgba(244, 239, 227, 0.75); max-width: 560px; }
.order-bar-note strong { color: var(--gold-light); font-weight: 650; }

@media (min-width: 760px) {
  .shop-facts { grid-template-columns: repeat(4, 1fr); max-width: 880px; }
}

/* --------------------------------------------------------------------------
   Układ: kategorie + lista dań (+ stały koszyk na desktopie)
   -------------------------------------------------------------------------- */
.shop-layout { max-width: 1160px; margin: 0 auto; padding: 0 16px 48px; }

.category-rail {
  position: sticky; top: 0; z-index: 40;
  margin: 0 -16px; padding: 8px 16px;
  background: rgba(244, 239, 227, 0.95);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.category-rail-label { display: none; }

.category-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.category-tabs::-webkit-scrollbar { display: none; }

.category-tab {
  flex: 0 0 auto;
  min-height: 40px; padding: 7px 16px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--paper); color: var(--ink);
  font-size: 14px; font-weight: 600; white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.category-tab:hover { border-color: var(--green-mid); color: var(--green-mid); }
.category-tab.is-active {
  background: var(--green); color: var(--cream); border-color: var(--green);
}

.menu-toolbar { margin-top: 18px; }
.search-field { position: relative; display: block; max-width: 560px; }
.search-icon {
  position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  color: var(--muted); pointer-events: none;
}
.search-field input {
  width: 100%; min-height: 48px; padding: 10px 16px 10px 44px;
  background: var(--paper); border: 1px solid var(--line-strong); border-radius: 999px;
  font-size: 15.5px;
}
.search-field input::placeholder { color: #9aa096; }
.search-field input:focus { outline: none; border-color: var(--green-mid); box-shadow: 0 0 0 3px rgba(29, 90, 69, 0.16); }

.menu-category-title {
  margin: 22px 0 4px;
  font-family: var(--font-display); font-size: clamp(24px, 3.6vw, 30px);
  color: var(--green-dark); letter-spacing: 0.01em;
}
.menu-category-title::after {
  content: ""; display: block; width: 46px; height: 3px;
  margin-top: 7px; background: var(--gold); border-radius: 2px;
}

/* ---- Pozycja menu: karta dania bez zdjęcia jako stan domyślny ---- */
.product-grid { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; max-width: 760px; }

.product-card {
  display: flex; gap: 14px; align-items: stretch;
  padding: 15px 16px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m);
  box-shadow: var(--shadow-1);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.product-card:hover {
  border-color: rgba(138, 103, 39, 0.55);
  box-shadow: 0 3px 6px rgba(24, 30, 26, 0.06), 0 10px 26px rgba(24, 30, 26, 0.09);
  transform: translateY(-1px);
}

.product-content { flex: 1 1 auto; min-width: 0; }

/* Sygnatura karty: nazwa ···· cena (kropkowany prowadnik jak w drukowanym menu) */
.product-line { display: flex; align-items: baseline; gap: 10px; }
.product-line h3 {
  /* Nazwy w bazie są wersalikami — kapitaliki z rozstrzeleniem jak w drukowanej karcie */
  font-family: var(--font-display); font-size: 15.5px; font-weight: 700;
  color: var(--ink); line-height: 1.3; letter-spacing: 0.05em;
}
.product-leader {
  flex: 1 1 16px; min-width: 16px;
  border-bottom: 2px dotted rgba(138, 103, 39, 0.45);
  transform: translateY(-4px);
}
.price-block { display: flex; align-items: baseline; gap: 5px; white-space: nowrap; }
.price-block small { font-size: 12px; color: var(--muted); }
.price-block strong {
  font-size: 16.5px; font-weight: 700; color: var(--green-dark);
  font-variant-numeric: tabular-nums;
}

.product-description {
  margin-top: 5px; font-size: 13.8px; line-height: 1.45; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.product-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.product-tags:empty { display: none; }
.product-badge, .product-category {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2.5px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 650; letter-spacing: 0.03em;
}
.product-badge { background: var(--gold-wash); color: var(--gold-deep); border: 1px solid rgba(198, 154, 67, 0.45); }
.product-badge::before { content: "★"; font-size: 10px; }
.product-category { background: var(--green-soft); color: var(--green-mid); }

.product-side {
  flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: flex-end;
  justify-content: space-between; gap: 10px;
}
.product-thumb {
  width: 74px; height: 74px; object-fit: cover;
  border-radius: 10px;
  background: var(--green-soft); /* celowy placeholder, gdy zdjęcie się nie wczyta */
}
/* Przy miniaturze przycisk nachodzi na jej róg — wiersz zostaje zwarty */
.product-card.has-image .product-side { justify-content: flex-start; }
.product-card.has-image .add-button { margin-top: -24px; border: 2.5px solid var(--paper); }
.add-button {
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--touch); height: var(--touch);
  border: 0; border-radius: 50%;
  background: var(--green-mid); color: #fdfbf4;
  font-size: 0; /* ukrywa tekst „Dodaj” — etykieta w aria-label */
  box-shadow: 0 2px 8px rgba(15, 59, 45, 0.3);
  transition: background-color 0.15s ease, transform 0.12s ease;
}
.add-button span { font-size: 24px; line-height: 1; }
.add-button:hover { background: var(--green-hover); transform: scale(1.06); }
.add-button:active { transform: scale(0.94); }

.empty-state {
  margin-top: 20px; padding: 26px 20px; max-width: 760px;
  text-align: center; color: var(--muted);
  background: var(--paper); border: 1px dashed var(--line-strong); border-radius: var(--radius-m);
}

/* Baner blokady zamówień nad zamawiarką (wyłącznik lub dzień zamknięcia) */
.ordering-banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 6px 18px; padding: 14px 18px;
  text-align: center; font-size: 15px;
}
.ordering-banner[hidden] { display: none; }
.ordering-banner.is-closed { background: var(--gold); color: var(--green-deep); }
.ordering-banner.is-closed strong { font-size: 16px; }
.ordering-banner-phone { color: var(--green-deep); font-weight: 750; text-decoration: underline; white-space: nowrap; }
.ordering-banner.is-upcoming {
  background: var(--gold-wash); color: var(--gold-deep); font-weight: 600;
  border-bottom: 1px solid rgba(198, 154, 67, 0.35);
}

/* Telefon w podpowiedzi koszyka przy blokadzie zamówień */
.minimum-hint a { color: var(--gold-light); font-weight: 700; }

/* Awaria pobierania karty — uczciwy komunikat z telefonem zamiast kopii menu */
.menu-offline h3 { font-size: 18px; color: var(--ink); }
.menu-offline p { margin-top: 8px; }
.menu-offline-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 16px; }
.menu-offline-actions .secondary-button { text-decoration: none; }

/* Desktop: pionowa szyna kategorii z lewej */
@media (min-width: 960px) {
  .shop-layout {
    display: grid; grid-template-columns: 208px minmax(0, 1fr); gap: 34px;
    padding-top: 26px;
  }
  .category-rail {
    position: sticky; top: 18px; z-index: 10;
    align-self: start;
    margin: 0; padding: 0;
    background: transparent; border-bottom: 0; backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .category-rail-label {
    display: block; margin: 4px 0 10px 14px;
    font-size: 11.5px; font-weight: 700; letter-spacing: 0.16em;
    text-transform: uppercase; color: var(--gold-deep);
  }
  .category-tabs { flex-direction: column; gap: 2px; overflow: visible; padding: 0; }
  .category-tab {
    text-align: left; border: 0; border-left: 3px solid transparent; border-radius: 0 10px 10px 0;
    background: transparent; min-height: 42px; padding: 8px 14px;
    font-size: 15px; color: var(--muted);
  }
  .category-tab:hover { background: var(--green-soft); color: var(--green-mid); }
  .category-tab.is-active {
    background: var(--green-soft); color: var(--green-dark);
    border-left-color: var(--gold); font-weight: 700;
  }
  .menu-toolbar { margin-top: 0; }
}

/* --------------------------------------------------------------------------
   Koszyk: szuflada (mobile) / stały panel (desktop)
   -------------------------------------------------------------------------- */
.drawer { position: fixed; inset: 0; z-index: 90; pointer-events: none; }
.drawer-backdrop {
  position: absolute; inset: 0;
  background: rgba(6, 26, 19, 0.55);
  opacity: 0; transition: opacity 0.22s ease;
}
.drawer.is-open { pointer-events: auto; }
.drawer.is-open .drawer-backdrop { opacity: 1; }

.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(430px, 94vw);
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--green-dark) 0%, var(--green-deep) 100%);
  color: var(--cream);
  box-shadow: var(--shadow-2);
  transform: translateX(102%);
  transition: transform 0.26s cubic-bezier(0.32, 0.72, 0.35, 1);
}
.drawer.is-open .drawer-panel { transform: translateX(0); }
.drawer :focus-visible { outline-color: var(--gold-light); }

.drawer-header {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(198, 154, 67, 0.4);
}
.drawer-header h2 {
  font-family: var(--font-display); font-size: 21px; color: #fbf7ec; letter-spacing: 0.01em;
}
.drawer-close { background: transparent; border-color: rgba(244, 239, 227, 0.3); color: rgba(244, 239, 227, 0.8); }
.drawer-close:hover { color: var(--cream); border-color: var(--cream); }

.cart-items { flex: 1 1 auto; overflow-y: auto; padding: 4px 20px; }
.cart-items:empty { flex: 0 0 0; padding: 0; }
.cart-empty { margin: auto 0; }
.cart-item {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(244, 239, 227, 0.12);
}
.cart-item h3 { font-family: var(--font-display); font-size: 14px; font-weight: 700; letter-spacing: 0.045em; color: #fbf7ec; }
.cart-item p { margin-top: 3px; font-size: 12.5px; color: rgba(244, 239, 227, 0.62); }
.remove-item {
  margin-top: 7px; padding: 2px 0;
  background: none; border: 0;
  color: rgba(244, 239, 227, 0.55); font-size: 12.5px; text-decoration: underline;
}
.remove-item:hover { color: #f4c9b4; }
.cart-item > div:last-child { display: flex; flex-direction: column; align-items: flex-end; gap: 9px; }
.cart-item strong { font-size: 15.5px; color: var(--gold-light); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cart-item-actions { display: flex; align-items: center; gap: 10px; }
.cart-item-actions span { min-width: 18px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--cream); }
.quantity-button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: transparent; border: 1.5px solid rgba(244, 239, 227, 0.4);
  color: var(--cream); font-size: 17px; line-height: 1;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.quantity-button:hover { border-color: var(--gold-light); color: var(--gold-light); }

.cart-empty { text-align: center; padding: 44px 24px; }
.cart-empty[hidden] { display: none; }
/* Znak firmowy w pustym koszyku — ten sam plik co w favikonie. Panel koszyka
   jest ciemnozielony, więc biały znak leży na nim wprost, bez obwódki. */
.cart-empty-mark { display: block; width: 58px; height: auto; margin: 0 auto; opacity: 0.85; }
.cart-empty h3 { margin-top: 14px; font-family: var(--font-display); font-size: 19px; color: #fbf7ec; }
.cart-empty p { margin-top: 6px; font-size: 13.5px; color: rgba(244, 239, 227, 0.6); }

.cart-footer { padding: 14px 20px 20px; border-top: 1px solid rgba(198, 154, 67, 0.4); }
.cart-footer[hidden] { display: none; }
.cart-summary { display: flex; justify-content: space-between; align-items: baseline; }
.cart-summary span { font-size: 14px; color: rgba(244, 239, 227, 0.7); }
.cart-summary strong { font-size: 26px; color: var(--gold-light); font-variant-numeric: tabular-nums; }
.minimum-hint { margin: 6px 0 12px; font-size: 12.5px; color: rgba(244, 239, 227, 0.65); min-height: 1.2em; }
.cart-footer .primary-button {
  background: var(--gold); color: #241b06; font-weight: 700;
}
.cart-footer .primary-button:hover:not(:disabled) { background: var(--gold-light); }

/* Desktop ≥1200: koszyk jako stały panel po prawej */
@media (min-width: 1200px) {
  .page-shell { margin-right: var(--cart-width); }
  .drawer { left: auto; width: var(--cart-width); pointer-events: auto; }
  .drawer-backdrop { display: none; }
  .drawer-panel {
    width: 100%; transform: none; transition: none;
    border-left: 1px solid rgba(198, 154, 67, 0.45);
  }
  .drawer-close { display: none; }
  body.is-admin-view .page-shell { margin-right: 0; }
  body.is-admin-view .drawer { display: none; }
}

/* Pasek koszyka na telefonie */
.cart-bar {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 80;
  display: flex; align-items: center; gap: 10px;
  min-height: 56px; padding: 10px 18px;
  background: linear-gradient(120deg, var(--green-mid), var(--green));
  color: var(--cream);
  border: 1px solid rgba(198, 154, 67, 0.5); border-radius: 14px;
  box-shadow: var(--shadow-2);
  transform: translateY(calc(100% + 18px));
  transition: transform 0.24s cubic-bezier(0.32, 0.72, 0.35, 1);
}
.cart-bar.has-items { transform: translateY(0); }
.cart-bar[hidden] { display: none; }
.cart-bar-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 27px; height: 27px; padding: 0 7px; border-radius: 999px;
  background: var(--gold); color: #241b06;
}
.cart-bar-count strong { font-size: 14.5px; }
.cart-bar-label { font-weight: 650; font-size: 15.5px; }
.cart-bar-total { margin-left: auto; font-size: 17px; font-variant-numeric: tabular-nums; }

@media (max-width: 1199.98px) {
  body { padding-bottom: 88px; }
}
@media (min-width: 1200px) {
  .cart-bar { display: none; }
}

/* --------------------------------------------------------------------------
   Dialogi — wspólna skorupa
   -------------------------------------------------------------------------- */
dialog { border: 0; padding: 0; background: transparent; max-width: none; }
dialog::backdrop { background: rgba(6, 26, 19, 0.6); }

.dialog-shell {
  position: relative;
  width: min(560px, calc(100vw - 20px));
  max-height: min(88vh, 760px);
  overflow-y: auto;
  margin: 0;
  padding: 24px;
  background: var(--paper); color: var(--ink);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-2);
}
.dialog-close { position: absolute; top: 14px; right: 14px; z-index: 3; }

.dialog-eyebrow {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--gold-deep);
}
.dialog-shell h2 { font-family: var(--font-display); font-size: 22px; margin-top: 4px; color: var(--green-dark); letter-spacing: 0.03em; }
.dialog-description { margin-top: 8px; font-size: 14.5px; color: var(--muted); }

.dialog-shell label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.dialog-shell input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
.dialog-shell select,
.dialog-shell textarea {
  display: block; width: 100%; margin-top: 5px;
  min-height: 46px; padding: 10px 13px;
  background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius-s);
  font-size: 15.5px;
}
.dialog-shell textarea { min-height: 0; resize: vertical; }
.dialog-shell input:focus, .dialog-shell select:focus, .dialog-shell textarea:focus {
  outline: none; border-color: var(--green-mid);
  box-shadow: 0 0 0 3px rgba(29, 90, 69, 0.16);
}
.dialog-shell input[type="checkbox"], .dialog-shell input[type="radio"] {
  width: 19px; height: 19px; accent-color: var(--green-mid);
}

.input-unit { display: flex; align-items: center; gap: 8px; margin-top: 5px; }
.input-unit input { margin-top: 0 !important; flex: 1; }
.input-unit > span:last-child { color: var(--muted); font-size: 13.5px; white-space: nowrap; font-weight: 500; }

.form-error { color: var(--danger); font-size: 14px; font-weight: 600; min-height: 1.3em; margin-top: 10px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* --------------------------------------------------------------------------
   Okno dania
   -------------------------------------------------------------------------- */
.product-dialog .dialog-shell { padding: 0; }
.dialog-image {
  height: 224px;
  background-size: cover; background-position: center;
  border-radius: var(--radius-l) var(--radius-l) 0 0;
}
.dialog-image[hidden] { display: none; }
.product-dialog .dialog-content { padding: 22px 24px 24px; }

.variant-options { border: 0; padding: 0; margin: 18px 0 0; }
.variant-options legend {
  padding: 0; margin-bottom: 9px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.dialog-shell .variant-option {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; margin-bottom: 8px;
  border: 1.5px solid var(--line); border-radius: var(--radius-s);
  cursor: pointer; font-weight: 500;
  transition: border-color 0.14s ease, background-color 0.14s ease;
}
.variant-option:hover { border-color: var(--green-mid); }
.variant-option:has(input:checked) { border-color: var(--green-mid); background: var(--green-soft); }
.variant-option > span { display: inline-flex; align-items: center; gap: 10px; }
.variant-option strong { font-variant-numeric: tabular-nums; color: var(--green-dark); }

.modifier-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 2px; margin-top: 12px;
  border-top: 1px dashed var(--line-strong); border-bottom: 1px dashed var(--line-strong);
  font-size: 14px;
}
.modifier-row small { display: block; color: var(--muted); font-size: 12px; }
.modifier-row > span:last-child { font-weight: 700; font-variant-numeric: tabular-nums; }

.notes-label { margin-top: 16px; }
.product-dialog .primary-button.block { margin-top: 18px; }

/* --------------------------------------------------------------------------
   Checkout
   -------------------------------------------------------------------------- */
.checkout-shell { width: min(620px, calc(100vw - 20px)); }
.checkout-heading { margin-bottom: 6px; }

.checkout-section { margin-top: 18px; }
.checkout-section-title {
  font-size: 13px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: 10px; padding: 0;
}
fieldset.checkout-section { border: 0; padding: 0; margin-inline: 0; }
fieldset.checkout-section legend { margin-bottom: 10px; }
fieldset.checkout-section[hidden] { display: none; }

.checkout-grid { display: grid; gap: 12px; }
@media (min-width: 560px) { .checkout-grid { grid-template-columns: 1fr 1fr; } }
.checkout-grid .full { grid-column: 1 / -1; }

/* Konto klienta: wejście w hero (nagłówkowe linki znikają na telefonie). */
.account-chip {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 12px; margin-left: 8px; padding: 7px 14px; min-height: 40px;
  border-radius: 999px; font-size: 14px; font-weight: 650;
  background: rgba(244, 239, 227, 0.1); border: 1px solid rgba(244, 239, 227, 0.28);
  color: var(--cream);
}
.account-chip:hover { background: rgba(244, 239, 227, 0.18); border-color: var(--gold-light); color: var(--gold-light); }
.account-chip[hidden] { display: none; }
@media (max-width: 519.98px) { .account-chip { margin-left: 0; } }

/* Konto klienta: ostatnie zamówienia. */
.orders-shell { width: min(520px, calc(100vw - 20px)); }
.orders-list { display: grid; gap: 14px; margin-top: 16px; max-height: 60vh; overflow-y: auto; }
.past-order {
  padding: 14px 16px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-m);
  background: #fff;
}
.past-order-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.past-order-head strong { font-size: 15.5px; color: var(--green-dark); }
.past-order-date { font-size: 13px; color: var(--muted); }
.past-order-meta { margin-top: 4px; font-size: 13.5px; color: var(--muted); }
.past-order-items { margin: 10px 0 12px; display: grid; gap: 4px; font-size: 14.5px; }
.past-order-items li { line-height: 1.35; }
.past-order-items small { display: block; font-size: 12.5px; color: var(--muted); }
.past-order .secondary-button { width: 100%; }

/* Pytanie „dostawa czy odbiór" na wejściu. Dwa duże kafle zamiast przełącznika,
   bo to pierwsza rzecz, którą klient widzi — ma być klikalne kciukiem, nie
   celowane. Na wąskim ekranie kafle układają się jeden pod drugim. */
.service-shell { width: min(480px, calc(100vw - 20px)); text-align: center; }
.service-choice { display: grid; gap: 12px; margin-top: 20px; }
.service-card {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 18px 16px; text-align: center;
  background: var(--paper); color: var(--ink);
  border: 1.5px solid var(--line); border-radius: var(--radius-m);
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.service-card:hover { background: var(--green-soft); border-color: var(--green-dark); transform: translateY(-1px); }
.service-card-icon { font-size: 28px; line-height: 1; }
.service-card strong { font-size: 17px; color: var(--green-dark); }
.service-card small { font-size: 13px; color: var(--muted); }
.service-card.is-selected { border-color: var(--green-dark); background: var(--green-soft); }
.service-card:disabled { opacity: 0.4; cursor: not-allowed; }
.service-card:disabled:hover { background: var(--paper); border-color: var(--line); transform: none; }

@media (min-width: 520px) {
  .service-choice { grid-template-columns: 1fr 1fr; }
}

/* Potwierdzenie numeru telefonu kodem z SMS-a. Pole na kod jest duże i
   monospace'owe — sześć cyfr przepisywanych z powiadomienia musi być czytelne
   jednym rzutem oka, także starszym klientom. */
.phone-shell { width: min(420px, calc(100vw - 20px)); }
.phone-number-label { display: block; margin-top: 18px; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
#phone-number {
  margin-top: 8px; width: 100%;
  font-size: 22px; font-weight: 650; letter-spacing: 0.06em; text-align: center;
  font-variant-numeric: tabular-nums;
}
.phone-code-label { display: block; margin-top: 18px; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
#phone-code {
  margin-top: 8px; width: 100%;
  font-size: 30px; font-weight: 700; letter-spacing: 0.36em; text-align: center;
  font-variant-numeric: tabular-nums;
}
.phone-actions { display: grid; gap: 12px; justify-items: center; margin-top: 18px; }
.phone-actions .primary-button { width: 100%; }
.phone-actions .link-button { color: var(--muted); font-size: 14px; }
.phone-actions .link-button:disabled { opacity: 0.5; cursor: default; text-decoration: none; }

/* Godzina realizacji: „jak najszybciej" jest szersze i pierwsze, bo tak zamawia
   większość — konkretne godziny stoją obok, a dalsze chowa lista pod spodem. */
.slot-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.slot-chip {
  min-height: 44px; padding: 8px 14px;
  border: 1.5px solid var(--line-strong); border-radius: 999px;
  background: #fff; color: var(--green-dark);
  font-size: 15px; font-weight: 700;
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}
.slot-chip:first-child { flex: 1 1 100%; }
@media (min-width: 460px) { .slot-chip:first-child { flex: 0 0 auto; } }
.slot-chip:hover { border-color: var(--green-mid); }
.slot-chip.is-selected { background: var(--green-mid); border-color: var(--green-mid); color: #fdfbf4; }
.slot-more { display: block; margin-top: 12px; font-size: 13px; color: var(--muted); }
.slot-more[hidden] { display: none; }
.slot-more.is-selected select { border-color: var(--green-mid); }
#slot-status:empty { display: none; }

.address-input-row { display: flex; gap: 8px; margin-top: 5px; }
.address-input-row input { flex: 1; margin-top: 0 !important; }
.address-input-row .secondary-button { flex: 0 0 auto; }
@media (max-width: 479.98px) {
  .address-input-row { flex-wrap: wrap; }
  .address-input-row .secondary-button { width: 100%; }
}

.address-confirmation { display: block; margin-top: 8px; font-size: 14px; font-weight: 650; color: var(--green-mid); }
.address-confirmation:empty { display: none; }
.address-results { display: grid; gap: 6px; margin-top: 8px; }
.address-results:empty { display: none; }
.address-results > span { font-size: 13.5px; color: var(--muted); }
.address-result {
  text-align: left; padding: 11px 13px;
  background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius-s);
  font-size: 14.5px;
  transition: border-color 0.14s ease, background-color 0.14s ease;
}
.address-result:hover { border-color: var(--green-mid); background: var(--green-soft); }

.checkout-notes { margin-top: 2px; }

/* Rozbicie kwot nad „Do zapłaty": wartość zamówienia, rabat, dostawa. */
.checkout-totals { margin-top: 22px; }
.checkout-line {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 5px 0; font-size: 15px; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.checkout-line-discount { color: var(--success, #1f7a4d); font-weight: 700; }
.checkout-line[hidden] { display: none; }

.checkout-total {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 10px; padding-top: 14px;
  border-top: 2px solid var(--green-dark);
}
.checkout-total span { font-size: 15px; color: var(--muted); }
.checkout-total strong { font-size: 27px; color: var(--green-dark); font-variant-numeric: tabular-nums; }

.terms-note { margin-top: 14px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.terms-note a { color: var(--green-mid); font-weight: 600; }
.terms { display: flex !important; gap: 10px; align-items: flex-start; margin-top: 14px; font-weight: 500 !important; font-size: 13.5px !important; color: var(--muted); }
.terms input { margin-top: 2px; flex: 0 0 auto; }

.checkout-shell .primary-button.block { margin-top: 16px; min-height: 54px; }

/* --------------------------------------------------------------------------
   Status zamówienia — „bilet”, który klient zostawia otwarty
   -------------------------------------------------------------------------- */
.order-status-shell {
  width: min(430px, calc(100vw - 20px));
  text-align: center;
  background:
    radial-gradient(140% 90% at 50% 0%, rgba(198, 154, 67, 0.16) 0%, rgba(198, 154, 67, 0) 52%),
    linear-gradient(180deg, var(--green-dark) 0%, var(--green-deep) 100%);
  color: var(--cream);
  padding: 30px 26px 26px;
}
.order-status-shell :focus-visible { outline-color: var(--gold-light); }
.order-status-shell .dialog-close { background: transparent; border-color: rgba(244, 239, 227, 0.3); color: rgba(244, 239, 227, 0.8); }

.order-status-icon {
  width: 64px; height: 64px; margin: 4px auto 16px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 2px solid var(--gold);
  color: var(--gold-light); font-size: 28px;
  box-shadow: 0 0 0 7px rgba(198, 154, 67, 0.14);
}
.order-status-shell h2.order-status-number { font-family: var(--font-display); font-size: 26px; color: #fbf7ec; margin-top: 6px; letter-spacing: 0.02em; }
.order-status-title { margin-top: 12px; font-size: 17.5px; font-weight: 650; color: var(--gold-light); }
.order-status-detail { margin-top: 8px; font-size: 14px; color: rgba(244, 239, 227, 0.75); }

/* Odrzucone zamówienie. Na ciemnozielonym tle okna czerwień musi być jasna,
   inaczej napis znika — stąd własne odcienie zamiast --danger z jasnych ekranów. */
.order-status-shell.is-cancelled .order-status-icon {
  border-color: #ff8a73; color: #ff8a73;
  box-shadow: 0 0 0 7px rgba(255, 138, 115, 0.14);
}
.order-status-shell.is-cancelled .order-status-title { color: #ff9c86; }

.order-status-call {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 16px; padding: 13px 22px; min-height: 48px;
  border-radius: 999px;
  background: #ff8a73; color: #3a0f05;
  font-size: 16px; font-weight: 750; text-decoration: none;
}
.order-status-call:hover { background: #ffa08c; }
.order-status-call[hidden] { display: none; }
.order-status-call strong { font-variant-numeric: tabular-nums; }

.order-status-countdown {
  margin: 18px auto 0; padding: 14px 18px;
  max-width: 250px;
  background: rgba(6, 31, 23, 0.6);
  border: 1px solid rgba(198, 154, 67, 0.4); border-radius: var(--radius-m);
}
.order-status-countdown[hidden] { display: none; }
.order-status-countdown span { display: block; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(244, 239, 227, 0.6); }
.order-status-countdown strong {
  display: block; margin-top: 2px;
  font-size: 38px; line-height: 1.1; color: var(--gold-light);
  font-variant-numeric: tabular-nums; letter-spacing: 0.03em;
}

/* Zwijane „Szczegóły zamówienia” pod czasem realizacji */
.order-status-details {
  margin-top: 16px; text-align: left;
  border: 1px solid rgba(244, 239, 227, 0.2); border-radius: var(--radius-m);
  background: rgba(6, 31, 23, 0.45);
}
.order-status-details[hidden] { display: none; }
.order-status-details-summary {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 46px; padding: 10px 16px;
  cursor: pointer; list-style: none; user-select: none;
  font-weight: 650; font-size: 14px; color: var(--gold-light);
}
.order-status-details-summary::-webkit-details-marker { display: none; }
.order-status-details-summary::after {
  content: ""; flex: 0 0 auto;
  width: 8px; height: 8px; margin-right: 2px;
  border-right: 2px solid var(--gold-light); border-bottom: 2px solid var(--gold-light);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.15s ease;
}
.order-status-details[open] > .order-status-details-summary::after { transform: rotate(225deg) translateY(-2px); }
.order-status-details-body {
  padding: 2px 16px 14px;
  border-top: 1px solid rgba(244, 239, 227, 0.14);
  font-size: 13.5px; color: rgba(244, 239, 227, 0.85);
}
.order-details-items { list-style: none; margin: 0; padding: 10px 0; display: grid; gap: 10px; }
.order-details-line { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; color: #fbf7ec; }
.order-details-line strong { flex: 0 0 auto; white-space: nowrap; color: var(--gold-light); font-variant-numeric: tabular-nums; }
.order-details-sub { display: block; margin-top: 2px; font-size: 12.5px; color: rgba(244, 239, 227, 0.65); }
.order-details-info { margin: 0; padding: 10px 0; border-top: 1px dashed rgba(244, 239, 227, 0.18); display: grid; gap: 6px; }
.order-details-info div { display: flex; justify-content: space-between; gap: 14px; }
.order-details-info dt { flex: 0 0 auto; color: rgba(244, 239, 227, 0.6); }
.order-details-info dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.order-details-amounts {
  margin: 0; padding-top: 10px;
  border-top: 1px dashed rgba(244, 239, 227, 0.18);
  display: grid; gap: 5px; font-variant-numeric: tabular-nums;
}
.order-details-amounts div { display: flex; justify-content: space-between; gap: 14px; }
.order-details-amounts dt { color: rgba(244, 239, 227, 0.6); }
.order-details-amounts dd { margin: 0; font-weight: 600; }
.order-details-amounts .is-total { margin-top: 4px; padding-top: 8px; border-top: 1px solid rgba(198, 154, 67, 0.4); font-size: 15px; }
.order-details-amounts .is-total dt { color: var(--cream); font-weight: 650; }
.order-details-amounts .is-total dd { color: var(--gold-light); font-weight: 750; }

.order-status-hint { margin-top: 14px; font-size: 12.5px; color: rgba(244, 239, 227, 0.55); }
.order-status-shell .secondary-button {
  margin-top: 14px; border-color: rgba(244, 239, 227, 0.45); color: var(--cream);
}
.order-status-shell .secondary-button:hover { background: rgba(244, 239, 227, 0.1); }

/* Pływający skrót do statusu ostatniego zamówienia */
.last-order-button {
  position: fixed; left: 12px; bottom: 84px; z-index: 70;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: var(--green-dark); color: var(--cream);
  border: 1px solid var(--gold); border-radius: 999px;
  box-shadow: var(--shadow-2);
  text-align: left;
}
.last-order-button[hidden] { display: none; }
.last-order-pulse {
  width: 10px; height: 10px; border-radius: 50%; background: var(--gold-light);
  box-shadow: 0 0 0 0 rgba(229, 201, 130, 0.6);
  animation: order-pulse 2s ease-out infinite;
}
@keyframes order-pulse {
  0% { box-shadow: 0 0 0 0 rgba(229, 201, 130, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(229, 201, 130, 0); }
  100% { box-shadow: 0 0 0 0 rgba(229, 201, 130, 0); }
}
.last-order-text { display: flex; flex-direction: column; line-height: 1.2; }
.last-order-text span { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(244, 239, 227, 0.65); }
.last-order-text strong { font-size: 14px; }
@media (min-width: 1200px) { .last-order-button { bottom: 16px; } }

/* --------------------------------------------------------------------------
   Toast
   -------------------------------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: 84px; z-index: 120;
  transform: translate(-50%, 12px);
  max-width: min(92vw, 420px);
  padding: 12px 20px;
  background: var(--ink); color: var(--cream);
  border-radius: 999px; font-size: 14.5px; text-align: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 1200px) { .toast { bottom: 26px; left: calc(50% - var(--cart-width) / 2); } }
body.is-admin-view .toast { left: 50% !important; }

/* --------------------------------------------------------------------------
   Stopka zamawiarki
   -------------------------------------------------------------------------- */
.shop-footer {
  padding: 26px 16px 34px;
  text-align: center; font-size: 13.5px; color: var(--muted);
  border-top: 1px solid var(--line);
}
.shop-footer a { color: var(--green-mid); font-weight: 600; text-decoration: none; }
.shop-footer a:hover { text-decoration: underline; }
.shop-footer-note { margin-top: 4px; }
/* Ostatnia dostawa w strefie — siedem wąskich pól w jednym rzędzie, żeby cały
   tydzień był widoczny naraz i dało się porównać dni bez przewijania. */
.zone-cutoffs-box { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-m); background: rgba(229, 237, 231, 0.35); }
.zone-cutoffs-title { display: block; font-size: 13px; font-weight: 700; color: var(--green-dark); }
.zone-cutoffs { display: grid; grid-template-columns: repeat(auto-fit, minmax(78px, 1fr)); gap: 8px; margin: 10px 0 8px; }
.zone-cutoff { display: grid !important; gap: 3px; margin: 0 !important; font-size: 11.5px !important; text-align: center; }
.zone-cutoff span { font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.zone-cutoff input { width: 100% !important; padding: 6px 4px !important; text-align: center; font-size: 13px !important; }
.zone-cutoffs-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.zone-cutoffs-box small { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }

/* Godziny otwarcia w panelu: siedem wierszy, w każdym przełącznik dnia i dwa
   pola czasu. Wyłączony dzień wygasza godziny, żeby było widać, że nie liczą się
   do niczego. */
.opening-hours { display: grid; gap: 8px; margin-top: 10px; }
.opening-day { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.opening-day-switch { display: inline-flex !important; align-items: center; gap: 8px; font-weight: 600 !important; margin: 0 !important; }
.opening-day-switch input { width: auto !important; margin: 0; }
.opening-day-times { display: inline-flex; align-items: center; gap: 6px; }
.opening-day-times input { width: 108px !important; }
.opening-day-times input:disabled { opacity: 0.45; }

/* Media społecznościowe: ikony rysowane w SVG na miejscu, bez wtyczek i bez
   pobierania czegokolwiek z Facebooka — strona nie ma prawa wysyłać danych
   klienta do sieci reklamowych (patrz polityka prywatności). */
.shop-social { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.shop-social-label { width: 100%; font-size: 12.5px; color: var(--muted); }
.shop-social-link {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 13.5px; font-weight: 600; color: var(--green-mid) !important; text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.shop-social-link:hover { background: var(--green-dark); border-color: var(--green-dark); color: var(--paper) !important; text-decoration: none; }
.shop-footer-links { margin-top: 12px; }
body.is-admin-view .shop-footer { display: none; }

/* ==========================================================================
   PANEL OBSŁUGI — tablet w kuchni: duże cele, czytelność z odległości
   ========================================================================== */
body.is-admin-view { background: #edefe9; }

.admin-topbar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 12px 18px;
  background: var(--green-dark); color: var(--cream);
  border-bottom: 1px solid rgba(198, 154, 67, 0.4);
}
.admin-topbar :focus-visible { outline-color: var(--gold-light); }
.admin-topbar-head h1 { font-family: var(--font-display); font-size: 21px; color: #fbf7ec; }
.admin-topbar-sub { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(244, 239, 227, 0.6); }

.admin-nav { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.admin-nav::-webkit-scrollbar { display: none; }
.admin-tab {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 8px 18px;
  background: transparent; color: rgba(244, 239, 227, 0.8);
  border: 1.5px solid rgba(244, 239, 227, 0.28); border-radius: 11px;
  font-size: 15.5px; font-weight: 600; white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.admin-tab:hover { border-color: rgba(244, 239, 227, 0.6); }
.admin-tab.is-active { background: var(--cream); color: var(--green-dark); border-color: var(--cream); }
.admin-tab-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px;
  background: var(--gold); color: #241b06; font-size: 13.5px; font-weight: 800;
}

.admin-content { max-width: 1560px; margin: 0 auto; padding: 18px 16px 60px; }
.admin-panel[hidden] { display: none; }

.admin-panel-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.admin-panel-header h2 { font-family: var(--font-display); font-size: 24px; color: var(--green-dark); }

/* --- Tablica zamówień --- */
.order-columns { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.order-column-header {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; margin-bottom: 10px;
  border-radius: 11px;
  background: var(--paper); border: 1px solid var(--line);
}
.order-column-header h2 { font-size: 15px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; }
.column-new .order-column-header { background: var(--gold-wash); border-color: rgba(198, 154, 67, 0.55); }
.column-new .order-column-header h2 { color: var(--gold-deep); }
.column-active .order-column-header h2 { color: var(--green-mid); }
.column-ready .order-column-header h2 { color: var(--muted); }
.order-column-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; height: 30px; padding: 0 9px; border-radius: 999px;
  background: var(--green-soft); color: var(--green-dark); font-size: 16px; font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.column-new .order-column-count { background: var(--gold); color: #241b06; }

.order-list { display: flex; flex-direction: column; gap: 12px; }

.order-card {
  background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius-m);
  box-shadow: var(--shadow-1);
  padding: 15px 16px;
  font-size: 15px;
}
.order-card.status-new {
  border: 2px solid var(--gold);
  background: linear-gradient(180deg, #fdf7e6 0%, var(--paper) 60%);
  animation: new-order-glow 1.6s ease-in-out infinite alternate;
}
@keyframes new-order-glow {
  from { box-shadow: 0 0 0 0 rgba(198, 154, 67, 0), var(--shadow-1); }
  to { box-shadow: 0 0 0 5px rgba(198, 154, 67, 0.28), var(--shadow-1); }
}
.order-card.status-delivered { opacity: 0.68; }

.order-card-header { display: flex; align-items: center; gap: 10px; }
.order-number { font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--green-dark); }
.order-elapsed {
  margin-left: auto;
  padding: 3px 10px; border-radius: 999px;
  background: var(--green-soft); color: var(--green-dark);
  font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.order-elapsed:empty { display: none; }
.status-new .order-elapsed { background: var(--gold); color: #241b06; }
.order-elapsed.is-late { background: var(--danger); color: #fff; }
.order-time { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }

.order-meta { display: grid; gap: 3px; margin-top: 10px; }
.order-meta > strong:first-child { font-size: 16.5px; color: var(--green-dark); }
.order-meta span { color: var(--ink); }
.order-meta span strong { color: var(--gold-deep); }
/* Zamówienie na konkretną godzinę wygląda inaczej niż „jak najszybciej" —
   obsługa musi to wyłapać jednym spojrzeniem, zanim ustali czas realizacji. */
.order-cutlery { margin-top: 8px; font-size: 14.5px; font-weight: 700; color: var(--green-dark); }
.cutlery-option { margin-top: 4px; }
.order-requested { color: var(--muted); }
.order-requested.is-timed {
  justify-self: start;
  padding: 2px 10px; border-radius: 999px;
  background: rgba(200, 155, 60, 0.14); border: 1px solid rgba(200, 155, 60, 0.45);
  color: var(--ink);
}

.order-products { margin-top: 10px; border-top: 1px dashed var(--line-strong); }
.order-products li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--line-strong);
  font-size: 16px; font-weight: 600; line-height: 1.35;
}

.order-card .helper-text { margin-top: 8px; }

.order-total {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 10px;
}
.order-total span { color: var(--muted); font-size: 14px; }
.order-total strong { font-size: 21px; color: var(--green-dark); font-variant-numeric: tabular-nums; }

.order-card-actions { display: grid; grid-template-columns: 1fr; gap: 9px; margin-top: 13px; }
.order-card-actions:empty { display: none; }
.order-card-actions button {
  min-height: 56px;
  border-radius: 11px; border: 1.5px solid var(--line-strong);
  background: var(--paper); color: var(--ink);
  font-size: 17px; font-weight: 700;
  transition: background-color 0.15s ease, transform 0.1s ease;
}
.order-card-actions button:active { transform: scale(0.985); }
.order-card-actions button.accept {
  background: var(--green-mid); border-color: var(--green-mid); color: #fdfbf4;
}
.order-card-actions button.accept:hover { background: var(--green-hover); }
.order-card-actions button[data-status="cancelled"] {
  min-height: 44px;
  background: transparent; border-color: rgba(166, 61, 32, 0.5); color: var(--danger);
  font-size: 14.5px; font-weight: 600;
}
.order-card-actions button[data-status="cancelled"]:hover { background: rgba(166, 61, 32, 0.07); border-color: var(--danger); }

.empty-column {
  padding: 26px 16px; text-align: center;
  color: var(--muted); font-size: 14px;
  border: 1.5px dashed var(--line-strong); border-radius: var(--radius-m);
}

.helper-text { font-size: 13px; color: var(--muted); }

/* --- Menu i dostępność --- */
.admin-table-wrap {
  overflow-x: auto;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m);
  box-shadow: var(--shadow-1);
}
.admin-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.admin-table th {
  text-align: left; padding: 13px 16px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); border-bottom: 1.5px solid var(--line-strong);
}
.admin-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 15.5px; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table td:nth-child(3) { font-variant-numeric: tabular-nums; white-space: nowrap; }

.availability-toggle {
  position: relative; width: 54px; height: 31px;
  border-radius: 999px; border: 0;
  background: #c9cdc5;
  transition: background-color 0.18s ease;
}
.availability-toggle::after {
  content: ""; position: absolute; top: 3.5px; left: 4px;
  width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.18s ease;
}
.availability-toggle.is-on { background: var(--green-mid); }
.availability-toggle.is-on::after { transform: translateX(22px); }

.table-action {
  min-height: 38px; padding: 6px 14px;
  background: transparent; border: 1.5px solid var(--line-strong); border-radius: 9px;
  color: var(--green-mid); font-size: 14px; font-weight: 600;
}
.table-action:hover { border-color: var(--green-mid); background: var(--green-soft); }

/* --- Strefy dostawy --- */
.zone-layout { display: grid; gap: 16px; }
@media (min-width: 1000px) { .zone-layout { grid-template-columns: 360px minmax(0, 1fr); align-items: start; } }

.zone-editor-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m);
  box-shadow: var(--shadow-1); padding: 18px;
}
.zone-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.zone-form-grid label { display: block; font-size: 13px; font-weight: 600; }
.zone-form-grid input:not([type="checkbox"]):not([type="color"]) {
  display: block; width: 100%; margin-top: 4px;
  min-height: 44px; padding: 8px 12px;
  background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius-s);
  font-size: 15px;
}
.zone-form-grid input:focus { outline: none; border-color: var(--green-mid); box-shadow: 0 0 0 3px rgba(29, 90, 69, 0.16); }
.zone-form-grid input[type="color"] {
  display: block; width: 100%; height: 44px; margin-top: 4px; padding: 3px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: #fff;
}
.zone-form-grid .input-unit { margin-top: 4px; }
.zone-form-grid .input-unit input { margin-top: 0; }
.switch-row {
  grid-column: 1 / -1;
  display: flex !important; align-items: center; gap: 10px;
  min-height: var(--touch); font-size: 15px !important;
}
.switch-row input { width: 20px; height: 20px; accent-color: var(--green-mid); }
.zone-editor-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.zone-editor-card .helper-text { margin-top: 12px; }

.map-wrap { position: relative; z-index: 0; }
#delivery-map {
  height: 440px; border-radius: var(--radius-m);
  border: 1px solid var(--line-strong);
  background: var(--green-soft);
}
#delivery-map[hidden] { display: none; }
#map-fallback {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; text-align: center; color: var(--muted);
  background: var(--green-soft); border-radius: var(--radius-m);
}
#map-fallback[hidden] { display: none; }

.saved-zones { display: grid; gap: 10px; margin-top: 16px; }
.saved-zone {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m);
  padding: 13px 16px;
}
.saved-zone strong { display: flex; align-items: center; gap: 8px; font-size: 15.5px; }
.saved-zone small { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }
.zone-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.15); }
.zone-actions { display: flex; gap: 8px; }

/* --- Ustawienia --- */
.settings-form { display: grid; gap: 16px; max-width: 660px; }
.settings-form fieldset {
  margin: 0; padding: 18px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m);
  box-shadow: var(--shadow-1);
  display: grid; gap: 12px;
}
.settings-form legend {
  padding: 0 8px; margin-left: -8px;
  font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--green-dark);
}
.settings-form label { font-size: 14px; font-weight: 600; max-width: 340px; }
.settings-form .input-unit input { min-height: 44px; padding: 8px 12px; background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius-s); width: 120px; flex: 0 1 auto; }
.settings-form .input-unit input:focus { outline: none; border-color: var(--green-mid); box-shadow: 0 0 0 3px rgba(29, 90, 69, 0.16); }
.check-label {
  display: flex !important; align-items: center; gap: 11px;
  min-height: var(--touch); font-size: 15px !important; font-weight: 500 !important;
  max-width: none !important;
}
.check-label input { width: 20px; height: 20px; accent-color: var(--green-mid); flex: 0 0 auto; }
.settings-form .primary-button { justify-self: start; }
.settings-form code { background: var(--green-soft); padding: 1px 6px; border-radius: 4px; font-size: 12.5px; }

/* Sekcja „Przyjmowanie zamówień” (blokada świąteczna / awaryjna) */
.ordering-status {
  padding: 10px 14px; border-radius: var(--radius-s);
  background: var(--green-soft); color: var(--green-dark);
  font-weight: 650; font-size: 14.5px;
}
.ordering-status.is-blocked {
  background: rgba(166, 61, 32, 0.09); color: var(--danger-deep);
  border: 1px solid rgba(166, 61, 32, 0.3);
}
.ordering-switch span { font-weight: 700 !important; }
.ordering-fieldset label { max-width: 480px; }
.ordering-fieldset textarea { width: 100%; }
.closed-dates-add { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.closed-dates-add input[type="date"] {
  min-height: 44px; padding: 8px 12px;
  background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius-s);
}
.closed-dates-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.closed-date-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 6px 4px 12px; border-radius: 999px;
  background: var(--green-soft); color: var(--green-dark);
  font-weight: 600; font-size: 13.5px;
}
.closed-date-chip .icon-button { width: 26px; height: 26px; font-size: 15px; }
.closed-dates-empty { font-size: 13.5px; color: var(--muted); }

/* --- Edytor dania (dialog) --- */
.admin-product-shell { width: min(600px, calc(100vw - 20px)); }
.admin-variants { border: 0; padding: 0; margin: 18px 0 0; }
.admin-variants legend {
  padding: 0; margin-bottom: 9px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.variant-edit-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 110px var(--touch);
  gap: 10px; align-items: end; margin-bottom: 10px;
}
.variant-edit-row label { font-size: 12.5px; }
.admin-variants .secondary-button { margin-top: 4px; }

/* --------------------------------------------------------------------------
   Logowanie
   -------------------------------------------------------------------------- */
.login-shell { width: min(420px, calc(100vw - 20px)); }
.login-shell label { margin-top: 12px; }

/* ==========================================================================
   PANEL — menu pogrupowane po kategoriach
   ========================================================================== */
.admin-menu-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
  margin-bottom: 14px;
}
.admin-menu-toolbar .search-field { flex: 1 1 240px; max-width: 380px; }
.admin-menu-toolbar .search-field input { min-height: 46px; }
.admin-menu-only-off { flex: 0 0 auto; }
.admin-menu-fold { display: flex; gap: 8px; margin-left: auto; }

.menu-groups { display: grid; gap: 12px; }

.menu-group {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-m); box-shadow: var(--shadow-1);
}
.menu-group-summary {
  list-style: none;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  min-height: 58px; padding: 12px 16px;
  cursor: pointer; border-radius: var(--radius-m);
}
.menu-group-summary::-webkit-details-marker { display: none; }
.menu-group-summary::before {
  content: ""; flex: 0 0 auto; width: 9px; height: 9px;
  margin-top: -3px;
  border-right: 2.5px solid var(--gold-deep); border-bottom: 2.5px solid var(--gold-deep);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}
.menu-group[open] > .menu-group-summary::before { transform: rotate(45deg); margin-top: -6px; }
.menu-group[open] > .menu-group-summary { border-bottom: 1px solid var(--line); border-radius: var(--radius-m) var(--radius-m) 0 0; }
.menu-group-summary:hover .menu-group-name { color: var(--green-mid); }
.menu-group-name {
  font-family: var(--font-display); font-size: 17px; font-weight: 700;
  letter-spacing: 0.05em; color: var(--green-dark);
}
.menu-group-meta { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.menu-group-count {
  padding: 3px 11px; border-radius: 999px;
  background: var(--green-soft); color: var(--green-dark);
  font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.menu-group-off {
  padding: 3px 11px; border-radius: 999px;
  background: rgba(166, 61, 32, 0.09); color: var(--danger-deep);
  border: 1px solid rgba(166, 61, 32, 0.3);
  font-size: 13px; font-weight: 700;
}

.menu-row {
  display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap;
  min-height: 58px; padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}
.menu-row:last-child { border-bottom: 0; border-radius: 0 0 var(--radius-m) var(--radius-m); }
.menu-row.is-off { background: #f4f2ea; }
.menu-row-main { flex: 1 1 240px; min-width: 0; }
.menu-row-name { display: block; font-size: 15.5px; }
.menu-row.is-off .menu-row-name { color: var(--muted); }
.menu-row-variants { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.menu-row-badge {
  padding: 3px 10px; border-radius: 999px;
  background: rgba(166, 61, 32, 0.09); color: var(--danger-deep);
  border: 1px solid rgba(166, 61, 32, 0.3);
  font-size: 12px; font-weight: 700;
}

/* Kolejność kategorii (strzałki w nagłówku sekcji) i dań (strzałki w wierszu) */
.menu-group-order,
.menu-row-order { display: inline-flex; gap: 4px; flex: 0 0 auto; }
.menu-order-hint { padding: 10px 16px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); }
.order-arrow {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: #fff; color: var(--green-dark);
  font-size: 15px; font-weight: 700; line-height: 1;
  transition: border-color 0.12s ease, background-color 0.12s ease;
}
.order-arrow:hover:not(:disabled) { border-color: var(--green-mid); background: var(--green-soft); }
.order-arrow:disabled { opacity: 0.35; cursor: default; }
.category-hidden-badge { flex: 0 0 auto; }
.menu-group.is-hidden-category { border-style: dashed; background: rgba(244, 239, 227, 0.55); }
.menu-group.is-hidden-category > .menu-group-summary .menu-group-name { color: var(--muted); }

/* ==========================================================================
   PANEL — zakładka „Dodatki”
   ========================================================================== */
.admin-subtitle { font-family: var(--font-display); font-size: 20px; color: var(--green-dark); margin-bottom: 4px; }

.modifiers-layout { display: grid; gap: 18px; align-items: start; }
@media (min-width: 1080px) {
  .modifiers-layout { grid-template-columns: minmax(0, 1fr) 420px; }
  .bulk-assign-card { position: sticky; top: 86px; }
}

.modifier-groups-list { display: grid; gap: 10px; margin-top: 12px; }
.modifier-group-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m);
  box-shadow: var(--shadow-1);
  padding: 13px 16px;
}
.modifier-group-card.is-inactive { opacity: 0.72; }
.modifier-group-info { flex: 1 1 260px; min-width: 0; display: grid; gap: 3px; }
.modifier-group-info strong { font-size: 15.5px; }
.modifier-group-meta { color: var(--muted); font-size: 13px; }
.modifier-group-options { color: var(--muted); font-size: 12.5px; font-style: italic; }

.mini-badge {
  display: inline-block; padding: 2px 9px; border-radius: 999px; vertical-align: middle;
  background: #eceee9; color: var(--muted);
  font-size: 11.5px; font-weight: 700; font-style: normal; letter-spacing: 0.02em;
}
.mini-badge.is-warning { background: var(--gold-wash); color: var(--gold-deep); border: 1px solid rgba(198, 154, 67, 0.45); }

/* Karta przypisywania hurtowego — celowo wyróżniona złotą ramką. */
.bulk-assign-card {
  display: grid; gap: 12px;
  background: var(--paper);
  border: 1.5px solid rgba(198, 154, 67, 0.6); border-radius: var(--radius-m);
  box-shadow: var(--shadow-1);
  padding: 18px;
}
.bulk-assign-card h3 { font-family: var(--font-display); font-size: 20px; color: var(--green-dark); }
.bulk-assign-card > .dialog-eyebrow { margin-bottom: -8px; }
.bulk-category-label { font-size: 13.5px; font-weight: 600; }
.bulk-category-label select {
  display: block; width: 100%; margin-top: 5px;
  min-height: 46px; padding: 10px 12px;
  background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius-s);
  font-size: 15px;
}
.bulk-category-label select:focus { outline: none; border-color: var(--green-mid); box-shadow: 0 0 0 3px rgba(29, 90, 69, 0.16); }
.bulk-products-overview:empty { display: none; }
.bulk-overview-note { font-size: 13.5px; }
.bulk-overview-note strong { color: var(--danger-deep); }
.bulk-product-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; max-height: 148px; overflow-y: auto; }
.bulk-product-chip {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  background: var(--green-soft); color: var(--green-dark);
  font-size: 12.5px; font-weight: 600;
}
.bulk-product-chip small { font-size: 11px; color: var(--green-mid); }
.bulk-product-chip.is-missing { background: rgba(166, 61, 32, 0.09); color: var(--danger-deep); border: 1px solid rgba(166, 61, 32, 0.3); }
.bulk-product-chip.is-missing small { color: var(--danger); font-weight: 700; }
.bulk-groups-fieldset { margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-s); }
.bulk-groups-fieldset legend { padding: 0 6px; font-size: 12.5px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.bulk-group-checkboxes { display: grid; gap: 2px; max-height: 264px; overflow-y: auto; }
.bulk-group-choice { min-height: 40px; }
.bulk-count {
  margin-left: auto; padding: 2px 8px; border-radius: 999px;
  background: var(--gold-wash); color: var(--gold-deep);
  font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.bulk-count.is-full { background: var(--green-soft); color: var(--green-dark); }

.warning-note {
  padding: 10px 13px;
  background: rgba(166, 61, 32, 0.07);
  border: 1px solid rgba(166, 61, 32, 0.3); border-radius: var(--radius-s);
  font-size: 13px; line-height: 1.45; color: var(--danger-deep);
}

.bulk-confirm-shell { width: min(480px, calc(100vw - 20px)); }

/* --- Edytor grupy dodatków --- */
.modifier-group-shell { width: min(640px, calc(100vw - 20px)); }
.selection-fieldset { border: 0; padding: 0; margin: 0; }
.selection-fieldset legend { margin-bottom: 8px; font-size: 13.5px; font-weight: 600; padding: 0; }

.choice-option {
  display: flex !important; align-items: flex-start; gap: 10px;
  padding: 11px 13px; margin-bottom: 8px;
  border: 1.5px solid var(--line); border-radius: var(--radius-s);
  cursor: pointer; font-weight: 500 !important;
  transition: border-color 0.14s ease, background-color 0.14s ease;
}
.choice-option:hover { border-color: var(--green-mid); }
.choice-option:has(input:checked) { border-color: var(--green-mid); background: var(--green-soft); }
.choice-option input { margin-top: 2px; flex: 0 0 auto; }
.choice-option strong { display: block; font-size: 14.5px; }
.choice-option small { display: block; margin-top: 1px; color: var(--muted); font-size: 12.5px; }

.modifier-option-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 122px var(--touch);
  gap: 8px 10px; align-items: end;
  padding-bottom: 10px; margin-bottom: 10px;
  border-bottom: 1px dashed var(--line);
}
.modifier-option-row:last-child { border-bottom: 0; margin-bottom: 4px; }
.modifier-option-row label { font-size: 12.5px; }
.option-active-label { grid-column: 1 / -1; min-height: 30px !important; font-size: 13.5px !important; }
.modifier-dialog-actions { justify-content: space-between; }
.modifier-dialog-actions .primary-button:only-child { margin-left: auto; }

.danger-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--touch); padding: 10px 18px;
  background: transparent; color: var(--danger);
  border: 1.5px solid rgba(166, 61, 32, 0.5); border-radius: 10px;
  font-weight: 600;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.danger-button:hover { background: rgba(166, 61, 32, 0.07); border-color: var(--danger); }
.danger-button[hidden] { display: none; }

.table-action.is-danger { color: var(--danger); }
.table-action.is-danger:hover { border-color: var(--danger); background: rgba(166, 61, 32, 0.07); }

/* --- Sekcja „Dodatki” w edytorze dania --- */
.product-modifier-list { display: grid; gap: 2px; max-height: 236px; overflow-y: auto; }
.product-modifier-choice { min-height: 40px; }
.product-modifier-list .warning-note { margin-bottom: 8px; }
.admin-product-modifiers .helper-text { margin-bottom: 8px; }

/* ==========================================================================
   PANEL — zakładka „Promocje”
   ========================================================================== */
.promotions-intro { max-width: 720px; margin-bottom: 16px; }
.promotions-list { display: grid; gap: 12px; max-width: 920px; }

.promotion-card {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m);
  box-shadow: var(--shadow-1);
  padding: 15px 18px;
}
.promotion-card.is-inactive { background: #f6f4ee; }
.promotion-card.is-inactive .promotion-name,
.promotion-card.is-inactive .promotion-summary { color: var(--muted); }
.promotion-main { flex: 1 1 320px; min-width: 0; display: grid; gap: 6px; }
.promotion-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.promotion-name { font-family: var(--font-display); font-size: 17px; letter-spacing: 0.02em; color: var(--green-dark); }
.promotion-summary { font-size: 15px; font-weight: 600; }
.promotion-description { font-size: 13.5px; color: var(--muted); }
.promotion-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.promo-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.03em;
}
.promo-chip.is-live { background: var(--green-soft); color: var(--green-dark); border: 1px solid rgba(29, 90, 69, 0.4); }
.promo-chip.is-live::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--green-mid);
  animation: order-pulse 2s ease-out infinite;
}
.promo-chip.is-waiting { background: var(--gold-wash); color: var(--gold-deep); border: 1px solid rgba(198, 154, 67, 0.45); }
.promo-chip.is-off { background: #eceee9; color: var(--muted); border: 1px solid var(--line-strong); }
.promo-chip.is-code { background: #fff; color: var(--gold-deep); border: 1px dashed var(--gold-deep); }

/* --- Edytor promocji --- */
.promotion-shell { width: min(680px, calc(100vw - 20px)); }

.promo-step { margin: 20px 0 0; border: 0; padding: 0; min-width: 0; }
.promo-step-title {
  display: flex; align-items: center; gap: 9px;
  margin-bottom: 10px; padding: 0;
  font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.promo-step-number {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--green-soft); color: var(--green-dark);
  font-size: 12.5px; letter-spacing: 0;
}
.promo-choice-grid { display: grid; gap: 8px; }
@media (min-width: 560px) { .promo-choice-grid { grid-template-columns: repeat(3, 1fr); } .promo-choice-grid .choice-option { margin-bottom: 0; } }
.promo-value-field { margin-top: 10px; max-width: 260px; }
.promo-value-field[hidden] { display: none; }

.day-tiles { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.day-tile {
  min-width: 56px; min-height: 46px; padding: 6px 10px;
  border: 1.5px solid var(--line-strong); border-radius: 10px;
  background: #fff; color: var(--muted);
  font-weight: 700;
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}
.day-tile:hover { border-color: var(--green-mid); color: var(--green-mid); }
.day-tile.is-selected { background: var(--green-mid); border-color: var(--green-mid); color: #fdfbf4; }
.day-tile.is-selected:hover { background: var(--green-hover); color: #fdfbf4; }
.promo-time-grid { margin-top: 14px; }

.scope-list {
  margin-top: 10px; padding: 10px 14px;
  max-height: 250px; overflow-y: auto;
  background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius-s);
  display: grid; gap: 2px;
}
.scope-list[hidden] { display: none; }
.scope-group-title {
  margin: 8px 0 2px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-deep);
}
.scope-choice { min-height: 38px; }

.promotion-preview {
  margin-top: 22px; padding: 13px 16px;
  background: var(--green-soft);
  border-left: 3px solid var(--gold); border-radius: 8px;
}
.promotion-preview-label {
  display: block;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--green-mid);
}
#promotion-preview-text { display: block; margin-top: 3px; font-size: 15px; line-height: 1.45; color: var(--green-dark); }

.promotion-shell .primary-button.block { margin-top: 16px; }

/* --------------------------------------------------------------------------
   Dostępność: ograniczenie ruchu
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------------------------
   Dodatki do dania (grupy modyfikatorów) w oknie konfiguracji
   -------------------------------------------------------------------------- */
.dialog-modifier-groups { display: grid; gap: 10px; margin-top: 18px; }
.dialog-modifier-groups[hidden] { display: none; }

.dialog-mod-group {
  border: 1.5px solid var(--line); border-radius: var(--radius-s);
  background: #fff; overflow: hidden;
}
.dialog-mod-group.is-required { border-color: rgba(198, 154, 67, 0.6); }
.dialog-mod-group.is-complete { border-color: rgba(29, 90, 69, 0.45); }

.dialog-mod-summary {
  display: flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 10px 14px;
  cursor: pointer; list-style: none; user-select: none;
}
.dialog-mod-summary::-webkit-details-marker { display: none; }
.dialog-mod-summary::after {
  content: ""; flex: 0 0 auto;
  width: 8px; height: 8px; margin-left: 2px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.15s ease;
}
.dialog-mod-group[open] > .dialog-mod-summary::after { transform: rotate(225deg) translateY(-2px); }
.dialog-mod-name {
  flex: 1 1 auto; min-width: 0;
  font-weight: 650; font-size: 13.5px; letter-spacing: 0.02em; color: var(--ink);
}
.dialog-mod-chip {
  flex: 0 0 auto; padding: 3px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap;
  background: var(--green-soft); color: var(--muted);
}
.dialog-mod-group.is-required:not(.is-complete) .dialog-mod-chip {
  background: var(--gold-wash); color: var(--gold-deep);
  border: 1px solid rgba(198, 154, 67, 0.45);
}
.dialog-mod-group.is-complete .dialog-mod-chip { background: var(--green-soft); color: var(--green-mid); }

.dialog-mod-options { border-top: 1px solid var(--line); }
.dialog-shell .dialog-mod-option {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 44px; padding: 9px 14px;
  font-size: 14.5px; font-weight: 500;
  cursor: pointer;
  transition: background-color 0.12s ease;
}
.dialog-shell .dialog-mod-option + .dialog-mod-option { border-top: 1px dashed var(--line); }
.dialog-shell .dialog-mod-option:hover { background: rgba(229, 237, 231, 0.5); }
.dialog-shell .dialog-mod-option:has(input:checked) { background: var(--green-soft); }
.dialog-shell .dialog-mod-option:has(input:disabled) { opacity: 0.45; cursor: not-allowed; }
.dialog-mod-pick { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.dialog-mod-pick input { flex: 0 0 auto; }
.dialog-mod-price {
  flex: 0 0 auto; white-space: nowrap;
  font-size: 13.5px; font-weight: 700; color: var(--green-dark);
  font-variant-numeric: tabular-nums;
}
.dialog-mod-price.is-free { color: var(--muted); font-weight: 500; }

/* Ilości składników (grupy z allowQuantity) — stepper − 0 + zamiast checkboxa */
.dialog-shell .dialog-mod-option.is-qty { cursor: default; flex-wrap: wrap; }
.dialog-shell .dialog-mod-option.is-qty.is-picked { background: var(--green-soft); }
.dialog-mod-optname { flex: 1 1 120px; min-width: 0; overflow-wrap: anywhere; }
.dialog-qty-stepper {
  flex: 0 0 auto; display: inline-flex; align-items: center;
  border: 1.5px solid var(--line); border-radius: 999px; background: #fff;
}
.dialog-mod-option.is-picked .dialog-qty-stepper { border-color: var(--green-mid); }
.dialog-qty-button {
  width: 40px; height: 40px; padding: 0;
  border: 0; border-radius: 999px; background: transparent;
  font-size: 20px; font-weight: 600; line-height: 1; color: var(--green-dark);
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}
.dialog-qty-button:hover:not(:disabled) { background: var(--green-soft); }
.dialog-qty-button:disabled { color: var(--muted); opacity: 0.4; cursor: not-allowed; }
.dialog-qty-value {
  min-width: 22px; text-align: center;
  font-weight: 700; font-size: 15px; color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* Przycisk dodania przyklejony do dołu przewijanego okna dania */
.product-dialog .dialog-sticky-cta {
  position: sticky; bottom: 0; z-index: 2;
  margin: 18px -24px -24px; padding: 12px 24px 16px;
  background: var(--paper);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 18px rgba(24, 30, 26, 0.07);
}
.product-dialog .dialog-sticky-cta .primary-button.block { margin-top: 0; }

/* Dodatki pozycji w koszyku */
.cart-item-mods { margin-top: 3px !important; font-size: 12.5px; color: rgba(244, 239, 227, 0.78) !important; }
.cart-item-mods::before { content: "＋ "; color: var(--gold-light); }

/* Kod rabatowy w checkoucie */
.checkout-promo small { font-weight: 500; color: var(--muted); }
.checkout-promo input { text-transform: uppercase; max-width: 260px; }
.checkout-promo input::placeholder { text-transform: none; }
/* Pole i „Aktywuj" w jednej linii; na wąskim ekranie przycisk schodzi niżej. */
.promo-input-row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.promo-input-row input { flex: 1 1 12rem; min-width: 0; }
.promo-activate { flex: 0 0 auto; white-space: nowrap; padding-inline: 1.1rem; }
.promo-activate[disabled] { opacity: .6; cursor: progress; }
/* Wynik sprawdzenia kodu: zielony gdy naliczony, czerwony gdy nie wszedł. */
.promo-feedback { margin: .6rem 0 0; font-size: .95rem; font-weight: 600; line-height: 1.4; }
.promo-feedback.is-ok { color: var(--success, #1f7a4d); }
.promo-feedback.is-error { color: var(--danger, #a23d35); }
.promo-feedback[hidden] { display: none; }
.modifier-row[hidden] { display: none; }

/* Bramka adresowa: pytamy o adres przed kompletowaniem koszyka. */
.address-extra { display: grid; grid-template-columns: 1fr auto; gap: .75rem; margin-top: .75rem; }
.address-extra label { display: grid; gap: .35rem; font-size: .95rem; }
.address-extra small { font-weight: 400; opacity: .7; }
.address-extra input { width: 100%; }
.address-extra label:last-child { max-width: 9rem; }
.address-confirmation.is-error { color: var(--danger, #a23d35); }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.link-button:hover { opacity: .8; }
@media (max-width: 480px) {
  .address-extra { grid-template-columns: 1fr; }
  .address-extra label:last-child { max-width: none; }
}

/* Status agenta wydruku w ustawieniach panelu. */
.print-agent-state { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; margin: 0 0 .5rem; font-weight: 600; }
.print-agent-state small { font-weight: 400; opacity: .75; }
.print-agent-state.is-ok { color: var(--green-mid, #1d5a45); }
.print-agent-state.is-error { color: var(--danger, #a23d35); }

/* Podsumowanie zamówienia w ostatnim kroku — z możliwością poprawienia pozycji. */
.checkout-items { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.checkout-item { display: flex; gap: 1rem; justify-content: space-between; align-items: flex-start; padding: .75rem; border: 1px solid rgba(16, 61, 47, .14); border-radius: .6rem; background: var(--paper, #fffdf8); }
.checkout-item.is-empty { justify-content: center; color: var(--muted, #5d635c); }
.checkout-item-main { display: grid; gap: .15rem; }
.checkout-item-main small { color: var(--muted, #5d635c); }
.checkout-item-mods { font-size: .85em; }
.checkout-item-side { display: grid; gap: .4rem; justify-items: end; text-align: right; white-space: nowrap; }
.checkout-item-actions { display: inline-flex; align-items: center; gap: .5rem; }
.checkout-item-count { min-width: 1.5rem; text-align: center; font-variant-numeric: tabular-nums; }
.checkout-item-links { display: inline-flex; gap: .75rem; font-size: .9em; }

/* Przyciski ilości w podsumowaniu stoją na jasnym tle, a bazowy styl jest
   pisany pod ciemny panel koszyka — bez tego są praktycznie niewidoczne. */
.checkout-items .quantity-button {
  border-color: rgba(16, 61, 47, .45);
  color: var(--green, #103d2f);
  background: #fff;
  font-weight: 700;
}
.checkout-items .quantity-button:hover:not(:disabled) { border-color: var(--green, #103d2f); background: var(--cream, #f4efe3); color: var(--green-dark, #08291f); }
.checkout-items .quantity-button:focus-visible { outline: 2px solid var(--gold-deep, #8a6727); outline-offset: 2px; }
.checkout-items .link-button { color: var(--green-mid, #1d5a45); }

/* Kolejność grup dodatków w edytorze dania — decyduje, co klient widzi najpierw. */
.product-modifier-order { display: grid; gap: .35rem; margin-bottom: .75rem; }
.product-modifier-row { display: flex; align-items: center; gap: .5rem; padding: .3rem .5rem; border: 1px solid rgba(16, 61, 47, .12); border-radius: .45rem; background: var(--paper, #fffdf8); }
.product-modifier-row .product-modifier-choice { margin: 0; flex: 1; }
.product-modifier-move { display: inline-flex; flex-direction: column; gap: .15rem; }
.product-modifier-move .table-action { padding: 0 .4rem; line-height: 1.3; min-width: 1.6rem; }
.product-modifier-move .table-action:disabled { opacity: .35; cursor: default; }
