/* FORNO 120 — online ordering (uses the variables defined in index.html) */
/* Anything with the HTML `hidden` attribute stays hidden, even when a class below sets display (drawer, sheet, badges, photos). */
[hidden] { display: none !important; }

.menu-state { grid-column: 1 / -1; text-align: center; color: var(--ink-muted); font-size: 17px; padding: 24px 0; }
.menu-state.error { color: var(--accent); }
.menu-state .btn { margin-top: 14px; }
.menu-cat-desc { font-size: 14px; color: var(--ink-muted); margin: -2px 0 6px; }
.item { align-items: flex-start; }
.item-body { flex: 1; min-width: 0; }
.item-photo { width: 84px; height: 84px; object-fit: cover; border-radius: 2px; flex: none; background: var(--flour-deep); }
.item-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; flex: none; }
.item .price .was { font-family: var(--body); font-weight: 600; font-size: 15px; color: var(--ink-muted); margin-right: 2px; }
.item .price.is-out { color: var(--ink-muted); }
.item.sold-out h4, .item.sold-out .item-body p, .item.sold-out .item-photo { opacity: .55; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag { font-weight: 700; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; padding: 3px 8px; border: 1px solid rgba(33,30,27,.25); border-radius: 2px; color: var(--ink-soft); line-height: 1.3; }
.tag-out { background: var(--oven); border-color: var(--oven); color: var(--flour); }
.tag-promo { border-color: var(--accent); color: var(--accent); }
.add-btn { font-family: var(--body); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: 13px; padding: 8px 16px; min-height: 40px; min-width: 76px; background: var(--accent); color: var(--flour); border: 0; border-radius: 2px; cursor: pointer; transition: opacity .15s ease; }
.add-btn:hover { opacity: .86; }
.add-btn:disabled { background: transparent; color: var(--ink-muted); border: 1.5px solid rgba(33,30,27,.2); cursor: not-allowed; opacity: 1; }
.menu-cta-note { margin-top: 12px; font-size: 14px; color: var(--ink-muted); letter-spacing: .04em; }
.order-banner { margin: 0 auto 40px; max-width: 640px; text-align: center; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; padding: 10px 16px; border: 1px solid rgba(33,30,27,.15); color: var(--ink-soft); }
.order-banner.closed { border-color: var(--accent); color: var(--accent); }
.order-banner:empty { display: none; }
.basket-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 2px; border-radius: 10px; background: var(--flour); color: var(--accent); font-size: 12px; letter-spacing: 0; }

/* Sticky mobile basket */
.sticky-basket { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(to top, rgba(247,237,227,1) 60%, rgba(247,237,227,0)); }
.sticky-basket .btn { width: 100%; justify-content: space-between; box-shadow: 0 6px 20px rgba(33,30,27,.25); }
.sticky-basket .btn > span:first-child { display: inline-flex; align-items: center; gap: 10px; }
@media (min-width: 861px) { .sticky-basket { display: none; } }
body.has-basket .site-footer { padding-bottom: 104px; }
@media (min-width: 861px) { body.has-basket .site-footer { padding-bottom: 48px; } }

/* Overlay, product sheet, basket drawer */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(26,23,19,.55); }
body.modal-open { overflow: hidden; }
.sheet, .drawer { position: fixed; z-index: 70; background: var(--flour); color: var(--oven); display: flex; flex-direction: column; }
.sheet { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); overflow: auto; border-radius: 2px; }
.sheet-inner { padding: 28px; position: relative; }
.sheet-close { position: absolute; right: 12px; top: 10px; width: 44px; height: 44px; border: 0; background: none; font-size: 30px; line-height: 1; cursor: pointer; color: var(--oven); }
.drawer-head .sheet-close { position: static; }
.ps-photo { width: calc(100% + 56px); max-width: none; margin: -28px -28px 20px; aspect-ratio: 16 / 10; object-fit: cover; }
.ps-title { font-family: var(--display); font-weight: 400; font-size: 28px; line-height: 1.05; text-transform: uppercase; padding-right: 40px; }
.ps-desc { color: var(--ink-muted); font-size: 16px; margin-top: 8px; }
.ps-foot { display: flex; gap: 14px; align-items: center; margin-top: 20px; }
.ps-foot .btn { flex: 1; }
fieldset.opt { border: 0; padding: 0; margin: 20px 0 0; }
fieldset.opt legend { font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 13px; padding: 0; margin-bottom: 8px; display: flex; gap: 8px; width: 100%; }
fieldset.opt legend em { font-style: normal; color: var(--ink-muted); font-weight: 600; letter-spacing: .06em; }
.choice { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(33,30,27,.12); cursor: pointer; font-size: 17px; }
.choice input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; margin: 0; }
.choice span { flex: 1; }
.choice b { font-weight: 600; color: var(--ink-muted); font-size: 15px; }

.qty { display: inline-flex; align-items: center; border: 1.5px solid rgba(33,30,27,.3); border-radius: 2px; flex: none; }
.qty button { width: 44px; height: 46px; border: 0; background: none; font-size: 22px; cursor: pointer; color: var(--oven); font-family: var(--body); }
.qty button:disabled { opacity: .3; cursor: default; }
.qty output { min-width: 28px; text-align: center; font-family: var(--display); font-size: 18px; }
.qty.sm button { width: 36px; height: 36px; font-size: 19px; }
.qty.sm output { min-width: 22px; font-size: 16px; }

.drawer { top: 0; right: 0; bottom: 0; width: min(460px, 100vw); box-shadow: -10px 0 40px rgba(0,0,0,.2); }
.drawer-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 12px 24px; border-bottom: 1px solid rgba(33,30,27,.12); }
.drawer-head h2 { flex: 1; font-family: var(--display); font-weight: 400; font-size: 24px; text-transform: uppercase; }
.drawer-back { width: 44px; height: 44px; margin-left: -16px; border: 0; background: none; font-size: 24px; cursor: pointer; color: var(--oven); }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 24px 24px; -webkit-overflow-scrolling: touch; }
.drawer-foot { padding: 16px 24px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(33,30,27,.12); background: var(--flour); }
.drawer-foot:empty { display: none; }
.drawer-foot .btn { width: 100%; }
.drawer-foot .total-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: 14px; }
.drawer-foot .total-row b { font-family: var(--display); font-weight: 400; font-size: 26px; letter-spacing: 0; color: var(--accent); }
@media (max-width: 560px) {
  .drawer { width: 100vw; }
  .sheet { left: 0; right: 0; top: auto; bottom: 0; transform: none; width: 100vw; max-height: 92dvh; }
  .sheet-inner { padding: 24px 20px calc(20px + env(safe-area-inset-bottom)); }
  .ps-photo { width: calc(100% + 40px); margin: -24px -20px 18px; }
}

.empty { text-align: center; padding: 48px 8px; color: var(--ink-muted); }
.empty .anton { font-size: 30px; color: var(--oven); text-transform: uppercase; display: block; margin-bottom: 8px; }
.empty .btn { margin-top: 20px; }

.line { padding: 16px 0; border-bottom: 1px solid rgba(33,30,27,.12); }
.line-top { display: flex; justify-content: space-between; gap: 12px; }
.line h4 { font-weight: 600; font-size: 18px; line-height: 1.25; }
.line .opts { font-size: 14px; color: var(--ink-muted); margin-top: 2px; }
.line .lprice { font-family: var(--display); font-size: 17px; white-space: nowrap; }
.line-ctl { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.line-ctl .link { background: none; border: 0; padding: 8px 0; font-family: var(--body); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: 12px; color: var(--ink-muted); cursor: pointer; }
.line-ctl .link:hover { color: var(--accent); }
.line textarea { margin-top: 10px; }
.line .note { font-size: 14px; color: var(--accent); margin-top: 4px; font-style: italic; }
.line.invalid { background: rgba(168,56,25,.06); margin: 0 -12px; padding: 16px 12px; }
.line .line-err { color: var(--accent); font-weight: 600; font-size: 15px; margin-top: 6px; }

.notice { padding: 12px 14px; border-left: 3px solid var(--accent); background: rgba(168,56,25,.07); font-size: 15px; margin: 16px 0; color: var(--oven); }
.notice.info { border-color: var(--oven); background: rgba(33,30,27,.05); }

/* Forms */
.field { display: block; margin-top: 18px; }
.field > span { display: block; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 13px; margin-bottom: 6px; }
.field > span em { font-style: normal; font-weight: 600; color: var(--ink-muted); letter-spacing: .06em; }
.field input, .field select, .field textarea, textarea.input, input.input, select.input { width: 100%; font: inherit; font-size: 17px; color: var(--oven); background: #fffaf4; border: 1.5px solid rgba(33,30,27,.25); border-radius: 2px; padding: 12px 14px; min-height: 48px; }
.field textarea, textarea.input { min-height: 0; resize: vertical; font-size: 16px; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.field.has-error input, .field.has-error select { border-color: var(--accent); }
.field-error { color: var(--accent); font-size: 14px; font-weight: 600; margin-top: 4px; }
.form-error { color: var(--accent); font-weight: 600; margin-top: 14px; }
.section-label { font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: 14px; border-bottom: 2px solid var(--oven); padding-bottom: 8px; margin: 28px 0 4px; }
.section-label:first-child { margin-top: 16px; }

.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-top: 8px; }
.slot { font-family: var(--body); font-weight: 700; font-size: 16px; letter-spacing: .04em; padding: 10px 4px; min-height: 48px; border: 1.5px solid rgba(33,30,27,.25); background: #fffaf4; color: var(--oven); border-radius: 2px; cursor: pointer; line-height: 1.1; }
.slot small { display: block; font-weight: 600; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); margin-top: 2px; }
.slot[aria-pressed="true"] { background: var(--oven); border-color: var(--oven); color: var(--flour); }
.slot[aria-pressed="true"] small { color: rgba(247,237,227,.7); }
.slot:disabled { opacity: .4; cursor: not-allowed; text-decoration: line-through; }
.slots-state { color: var(--ink-muted); font-size: 15px; padding: 8px 0; }

.pay { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1.5px solid rgba(33,30,27,.2); border-radius: 2px; margin-top: 10px; cursor: pointer; background: #fffaf4; }
.pay input { width: 20px; height: 20px; accent-color: var(--accent); margin: 2px 0 0; flex: none; }
.pay b { display: block; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: 15px; }
.pay small { display: block; color: var(--ink-muted); font-size: 14px; margin-top: 2px; line-height: 1.35; }
.pay:has(input:checked) { border-color: var(--oven); box-shadow: inset 0 0 0 1px var(--oven); }

.summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 16px; }
.summary-row span:last-child { white-space: nowrap; }
.legal { font-size: 13px; color: var(--ink-muted); margin-top: 10px; text-align: center; }

.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2s; } }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 90; background: var(--oven); color: var(--flour); padding: 12px 20px; font-weight: 600; letter-spacing: .04em; border-radius: 2px; box-shadow: 0 8px 24px rgba(0,0,0,.25); max-width: calc(100vw - 32px); }
@media (min-width: 861px) { .toast { bottom: 32px; } }

/* Delivery map */
.dmap { height: 260px; width: 100%; margin-top: 10px; border: 1.5px solid rgba(33,30,27,.2); border-radius: 2px; background: var(--flour-deep, #ece0d2); z-index: 0; }
.dmap-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 10px; font-size: 15px; }
.dmap-ctl .muted { color: var(--ink-muted); }
