/* Σελίδα παραγγελιών – mobile first (από 360px), γραμματοσειρές συστήματος. */
:root {
  --bg: #f4f6f5;
  --surface: #ffffff;
  --text: #17201d;
  --muted: #55605c;          /* 6.4:1 σε λευκό */
  --border: #d5dcd9;
  --accent: #0f6e5a;         /* 6.0:1 με λευκό κείμενο */
  --accent-strong: #0a5444;
  --accent-soft: #e3f1ec;
  --danger: #b3261e;
  --danger-soft: #fbe9e7;
  --warn: #8a5300;
  --warn-soft: #fff3dc;
  --info-soft: #e8f0fb;
  --info: #1f4f8f;
  --focus: #1a73e8;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 14px rgba(0,0,0,.06);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --topbar-h: 60px;
  --nav-h: 64px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1413;
    --surface: #1a2120;
    --text: #e8eeec;
    --muted: #a8b4b0;
    --border: #33403c;
    --accent: #3fb595;
    --accent-strong: #62c9ad;
    --accent-soft: #173a31;
    --danger: #ff8a80;
    --danger-soft: #3a1d1b;
    --warn: #ffcc80;
    --warn-soft: #3a2e17;
    --info-soft: #182a40;
    --info: #9cc3ff;
    --focus: #8ab4f8;
    --shadow: none;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.sheet-open, html.sheet-open body { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: anywhere;
}
h1, .h1 { font-size: 1.6rem; line-height: 1.25; margin: .2em 0 .5em; }
h2, .h2 { font-size: 1.3rem; line-height: 1.3; margin: .2em 0 .5em; }
.h3 { font-size: 1.1rem; margin: 0 0 .6em; }
p { margin: 0 0 .75em; }
a { color: var(--accent); }
small, .small { font-size: .9rem; }
.muted { color: var(--muted); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
[tabindex="-1"]:focus { outline: none; }

.ic { width: 1.25em; height: 1.25em; fill: currentColor; flex: none; vertical-align: -0.25em; }
.ic--lg { width: 48px; height: 48px; }

/* Layout */
.page { max-width: 640px; margin: 0 auto; padding: 16px 16px calc(32px + var(--safe-b)); }
.page.has-cart-bar { padding-bottom: calc(110px + var(--safe-b)); }
.page--center { min-height: 80vh; display: flex; align-items: center; }
.loading { color: var(--muted); text-align: center; padding: 48px 0; }
.empty { color: var(--muted); text-align: center; padding: 32px 8px; font-size: 1.05rem; }

.demo-banner { background: #5b2c83; color: #fff; text-align: center; font-size: .9rem; padding: 6px 12px; font-weight: 600; }
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 8px;
  padding: 0 12px; height: var(--topbar-h);
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.brand { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; color: var(--text); text-decoration: none; }
.brand__logo { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; background: #fff; flex: none; }
.brand__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Κάρτες / ειδοποιήσεις */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin: 0 0 16px; box-shadow: var(--shadow); }
.hero { padding: 8px 0 16px; }
.banner { display: flex; gap: 10px; align-items: flex-start; border-radius: var(--radius); padding: 14px 16px; margin: 0 0 16px; font-weight: 600; }
.banner p { margin: 0; }
.banner--closed { background: var(--danger-soft); color: var(--danger); border: 2px solid var(--danger); }
.notice { border-radius: var(--radius); padding: 16px; margin: 0 0 16px; }
.notice--error { background: var(--danger-soft); color: var(--text); border: 1px solid var(--danger); text-align: center; }
.notice--error .ic { color: var(--danger); }
.notice--warn { background: var(--warn-soft); color: var(--warn); border: 1px solid currentColor; font-weight: 600; }
.note { background: var(--bg); border-left: 4px solid var(--border); padding: 8px 12px; border-radius: 6px; font-size: .95rem; color: var(--muted); }
.note--info { background: var(--info-soft); border-left-color: var(--info); color: var(--text); }
.footer { text-align: center; padding: 24px 0 8px; }

/* Κουμπιά */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 18px; border-radius: 12px;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; background: var(--surface); color: var(--text);
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-strong); }
.btn--secondary { background: var(--accent-soft); color: var(--accent-strong); border-color: var(--accent); }
.btn--ghost { background: transparent; color: var(--accent); border-color: var(--border); }
.btn--sm { min-height: 44px; padding: 6px 12px; font-size: .95rem; }
.btn--lg { min-height: 56px; font-size: 1.1rem; }
.btn--block { display: flex; width: 100%; margin: 0 0 12px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
@media (prefers-color-scheme: dark) { .btn--primary { color: #07221b; } }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: var(--text); cursor: pointer; flex: none;
}
.icon-btn .ic { width: 26px; height: 26px; }
.link-btn { background: none; border: 0; padding: 10px 6px; min-height: 44px; font: inherit; font-weight: 600; color: var(--accent); cursor: pointer; text-decoration: underline; }
.link-btn--danger { color: var(--danger); }

/* Ωράριο */
.hours table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.hours th, .hours td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--border); font-weight: 400; vertical-align: top; }
.hours th { width: 40%; color: var(--muted); }
.hours tr.today th, .hours tr.today td { font-weight: 700; color: var(--text); }

/* Οι παραγγελίες μου */
.my-orders { list-style: none; margin: 0; padding: 0; }
.my-orders a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; min-height: 56px; color: var(--text); text-decoration: none; border-top: 1px solid var(--border); }
.pill { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: .85rem; font-weight: 700; background: var(--bg); white-space: nowrap; }
.pill--pending { background: var(--warn-soft); color: var(--warn); }
.pill--accepted { background: var(--accent-soft); color: var(--accent-strong); }
.pill--rejected, .pill--cancelled { background: var(--danger-soft); color: var(--danger); }

/* Αναζήτηση / κατάλογος */
.search { position: relative; margin: 0 0 12px; }
.search .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 46px !important; }
.category__title { margin: 20px 0 8px; padding-bottom: 4px; border-bottom: 2px solid var(--accent); display: inline-block; }
.products { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.product {
  width: 100%; display: flex; align-items: center; gap: 12px; text-align: left;
  min-height: 64px; padding: 12px 14px; border-radius: var(--radius);
  background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow);
  font: inherit; cursor: pointer;
}
.product__info { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.product__name { font-weight: 600; }
.product__price { color: var(--muted); font-size: .95rem; }
.product__add { display: inline-flex; width: 40px; height: 40px; border-radius: 50%; align-items: center; justify-content: center; background: var(--accent); color: #fff; flex: none; }
@media (prefers-color-scheme: dark) { .product__add { color: #07221b; } }
.badge { min-width: 26px; height: 26px; border-radius: 13px; background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; font-size: .85rem; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; }

/* Κάτω μπάρα πλοήγησης */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -2px 10px rgba(0,0,0,.06);
}
.bottom-nav__item {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 48px; color: var(--muted); text-decoration: none; font-size: .78rem; font-weight: 600;
}
.bottom-nav__icon { font-size: 1.4rem; line-height: 1; }
.bottom-nav__item.is-active { color: var(--accent-strong); }
.bottom-nav__item.is-active::before { content: ""; position: absolute; top: 0; left: 22%; right: 22%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
.bottom-nav__badge {
  position: absolute; top: 6px; left: calc(50% + 6px); min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 10px; background: #c62828; color: #fff; font-size: .75rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.page.has-bottom-nav { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 24px); }
.page.has-bottom-nav.has-cart-bar { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 84px); }

/* Μπάρα καλαθιού: συμπαγής συντόμευση πάνω από την κάτω μπάρα (μόνο στον Κατάλογο) */
.cart-bar {
  position: fixed; left: 12px; right: 12px; bottom: calc(var(--nav-h) + var(--safe-b) + 8px); z-index: 25;
  max-width: 616px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 8px 14px;
  background: var(--accent); color: #fff; border-radius: 12px; text-decoration: none; font-weight: 700;
  box-shadow: 0 4px 14px rgba(0,0,0,.22);
}
@media (prefers-color-scheme: dark) { .cart-bar { color: #07221b; } }
.cart-bar__text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-bar__go { flex: none; }

/* Κουμπιά κατηγοριών (sticky κάτω από την πάνω μπάρα) */
.cat-chips-wrap { position: sticky; top: var(--topbar-h); z-index: 9; margin: 0 -16px 8px; padding: 0 16px; background: var(--bg); }
.cat-chips { display: flex; gap: 8px; overflow-x: auto; padding: 8px 0; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.cat-chips::-webkit-scrollbar { display: none; }
.cat-chip {
  flex: none; min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-size: .95rem; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.cat-chip.is-active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.category { scroll-margin-top: calc(var(--topbar-h) + 64px); }

/* Κατάστημα / παραγγελίες */
.store-card { text-align: center; }
.store-card__logo { display: block; margin: 0 auto 8px; max-width: 160px; max-height: 180px; object-fit: contain; }
.h4 { font-size: 1rem; margin: 12px 0 6px; }
.privacy-text.privacy-text--full { max-height: none; overflow: visible; }
details.older summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.pill--pay { background: var(--warn-soft); color: var(--warn); margin-top: 4px; }
.pill--none { background: var(--bg); color: var(--muted); }
ul.my-orders.card { padding: 0 16px; }
ul.my-orders.card li:first-child a { border-top: 0; }

/* IRIS: τελικό ποσό */
.amount-due-label { margin: 4px 0 0; font-weight: 600; color: var(--muted); text-align: center; }
.amount-due { margin: 0 0 8px; font-size: 2.6rem; font-weight: 800; text-align: center; color: var(--accent-strong); }
.iris__paid { font-size: 1.25rem; font-weight: 700; color: var(--accent-strong); }

/* Φόρμες */
.field { margin: 0 0 16px; border: 0; padding: 0; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
label, legend { display: block; font-weight: 600; margin: 0 0 6px; padding: 0; }
.req { font-size: .78rem; font-weight: 700; color: var(--danger); background: var(--danger-soft); padding: 1px 6px; border-radius: 6px; margin-left: 4px; white-space: nowrap; }
.opt { font-size: .8rem; font-weight: 500; color: var(--muted); margin-left: 4px; }
.hint { color: var(--muted); font-size: .88rem; margin: 6px 0 0; }
input:not([type=radio]):not([type=checkbox]), select, textarea {
  width: 100%; min-height: 50px; padding: 12px 14px;
  font: inherit; font-size: 17px; /* ≥16px: χωρίς zoom στο iPhone */
  color: var(--text); background: var(--surface);
  border: 1.5px solid #8a9692; border-radius: 12px;
}
textarea { min-height: 80px; resize: vertical; }
select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
[aria-invalid="true"] { border-color: var(--danger) !important; border-width: 2px !important; }
.field-error { color: var(--danger); font-weight: 600; font-size: .92rem; margin: 6px 0 0; }
.form-error { color: var(--danger); font-weight: 700; margin: 8px 0; }
.form-error:empty { display: none; }
input[type=radio], input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--accent); margin: 0; flex: none; }

.choice { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 12px; margin: 0 0 8px; font-weight: 500; cursor: pointer; background: var(--surface); }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice__end { margin-left: auto; font-weight: 700; white-space: nowrap; }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; margin: 12px 0 0; cursor: pointer; }
.check input { margin-top: 2px; }

.radio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.radio-card { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 14px 12px; min-height: 64px; border: 2px solid var(--border); border-radius: 12px; cursor: pointer; font-weight: 500; margin: 0; background: var(--surface); }
.radio-card span { display: flex; flex-direction: column; }
.radio-card small { color: var(--muted); }
.radio-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg__opt { position: relative; margin: 0; }
.seg__opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.seg__opt span { display: inline-flex; align-items: center; min-height: 48px; padding: 8px 18px; border: 2px solid var(--border); border-radius: 999px; font-weight: 600; }
.seg__opt input:checked + span { border-color: var(--accent); background: var(--accent); color: #fff; }
.seg__opt input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; margin: 0; font-weight: 500; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border: 1.5px solid var(--border); border-radius: 999px; background: var(--surface); }
.chip input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; }
.chip input:checked + span::before { content: "✓ "; white-space: pre; }
.chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

.stepper { display: flex; align-items: stretch; gap: 8px; max-width: 280px; }
.stepper input { text-align: center; font-size: 1.25rem !important; font-weight: 700; }
.stepper__btn { width: 56px; min-height: 52px; border-radius: 12px; border: 2px solid var(--accent); background: var(--accent-soft); color: var(--accent-strong); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.stepper__btn .ic { width: 24px; height: 24px; }

/* Bottom sheet */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 40; animation: fade .15s ease-out; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41;
  max-width: 640px; margin: 0 auto; max-height: 92vh; max-height: 92dvh;
  display: flex; flex-direction: column;
  background: var(--surface); border-radius: 20px 20px 0 0; box-shadow: 0 -8px 30px rgba(0,0,0,.25);
  animation: up .2s ease-out;
}
.sheet__handle { width: 44px; height: 5px; border-radius: 3px; background: var(--border); margin: 8px auto 0; }
.sheet__head { display: flex; align-items: flex-start; gap: 8px; padding: 8px 12px 0 16px; }
.sheet__head h2 { flex: 1; margin-top: 8px; }
.sheet__body { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 0 16px 8px; }
.sheet__foot { display: flex; align-items: center; gap: 12px; padding: 12px 16px calc(12px + var(--safe-b)); border-top: 1px solid var(--border); background: var(--surface); }
.sheet__foot .btn { flex: 1; min-height: 54px; }
.line-total { font-weight: 700; max-width: 45%; }
@keyframes up { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sheet, .sheet-backdrop { animation: none; } }

/* Καλάθι / σύνοψη */
.cart-lines { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.cart-line { display: flex; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.cart-line__main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.cart-line__name { font-weight: 700; }
.cart-line__qty { color: var(--muted); font-size: .95rem; }
.cart-line__details { font-size: .9rem; margin-top: 4px; }
.cart-line__side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; text-align: right; }
.cart-line__total { font-weight: 700; white-space: nowrap; font-size: .95rem; }
.cart-line__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; }
.totals { margin: 0 0 12px; }
.totals div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; font-weight: 700; }
.totals__sum { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 8px !important; font-size: 1.1rem; }
.totals__sum dt { color: var(--text); font-weight: 700; }
.summary { list-style: none; margin: 0 0 12px; padding: 0; }
.summary li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.summary small { color: var(--muted); }
.summary li > span:last-child { white-space: nowrap; font-weight: 600; }
.privacy-text { max-height: 180px; overflow-y: auto; font-size: .92rem; padding: 10px 12px; background: var(--bg); border-radius: 8px; border: 1px solid var(--border); }
.submit-area { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 16px); padding: 16px 0 calc(4px + var(--safe-b)); }

/* Κατάσταση */
.status { text-align: center; padding: 24px 16px; border-radius: var(--radius); margin: 0 0 16px; border: 2px solid; }
.status--pending { background: var(--warn-soft); border-color: var(--warn); }
.status--pending .ic { color: var(--warn); }
.status--accepted { background: var(--accent-soft); border-color: var(--accent); }
.status--accepted .ic { color: var(--accent); }
.status--rejected { background: var(--danger-soft); border-color: var(--danger); }
.status--rejected .ic { color: var(--danger); }
.order-no-label { margin: 12px 0 0; font-weight: 600; color: var(--muted); }
.order-no { font-size: 4rem; line-height: 1.1; font-weight: 800; margin: 0 0 12px; color: var(--accent-strong); letter-spacing: .02em; }
.iris__qr { display: block; margin: 12px auto 0; width: 220px; max-width: 100%; height: auto; background: #fff; padding: 8px; border-radius: 8px; }
.steps { padding-left: 1.3em; margin: 0; }
.steps li { margin: 0 0 6px; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 68px); transform: translate(-50%, 20px);
  z-index: 60; max-width: calc(100% - 32px);
  background: #1f2725; color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 380px) {
  body { font-size: 16px; }
  .radio-cards { grid-template-columns: 1fr; }
  .order-no { font-size: 3.4rem; }
}

/* Ειδοποιήσεις και κινητό IRIS */
.push-card .h3 { margin-top: 0; }
.push-card__on { margin: 0; font-weight: 600; color: var(--accent-strong); }
.note--error { background: #fdecec; border-left-color: #b42318; color: #7a1a12; margin-top: 12px; }
.iris__phone { display: inline-block; font-size: 1.25rem; font-weight: 800; letter-spacing: .03em; white-space: nowrap; }
.iris__copy { display: flex; margin: 8px 0 0; }
