/* Top bar, header, drawers, cart order form, search, footer, mobile tab bar. */

.topbar { display: flex; justify-content: center; align-items: center; gap: 0.5rem 1.5rem; flex-wrap: wrap; min-height: 38px; padding: 0.4rem var(--pad); background: var(--text); color: rgb(255 255 255 / 0.88); font-size: 0.73rem; text-align: center; }
.topbar a { color: #e8c675; }
@media (max-width: 700px) { .topbar { font-size: 0.66rem; } .topbar a { display: none; } }

.header { position: sticky; top: 0; z-index: 30; height: var(--header-h); background: rgb(255 255 255 / 0.9); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); transition: box-shadow 0.3s; }
.header.is-scrolled { box-shadow: 0 10px 30px -22px rgb(28 23 20 / 0.45); }
.header__inner { height: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; }
.brand { display: block; justify-self: center; }
.brand img { height: 52px; width: auto; }
.nav { display: flex; gap: 2rem; }
.nav a { font-size: 0.84rem; white-space: nowrap; padding-block: 0.35rem; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.35s var(--ease); }
.nav a:hover, .nav a[aria-current='page'] { background-size: 100% 1px; }
.header__actions { display: flex; justify-content: end; align-items: center; gap: 0.35rem; }
.icon-btn { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; transition: background 0.25s; }
.icon-btn:hover { background: var(--soft); }
.icon-btn svg { width: 22px; height: 22px; }
.badge { position: absolute; top: 3px; right: 2px; display: grid; place-items: center; min-width: 18px; height: 18px; padding-inline: 4px; border-radius: 99px; background: var(--gold); color: var(--white); font-size: 0.62rem; font-weight: 500; font-style: normal; line-height: 1; }
.badge.is-bump { animation: bump 0.55s var(--ease); }
@keyframes bump { 40% { scale: 1.45; } }
.menu-btn { display: none; margin-left: -10px; }
@media (max-width: 960px) { .nav { display: none; } .menu-btn { display: grid; } }
@media (max-width: 700px) { :root { --header-h: 64px; } .brand img { height: 42px; } }

/* Dialog based drawers keep focus inside and close with Escape. */
.sheet { position: fixed; inset: 0 0 0 auto; margin: 0 0 0 auto; width: min(460px, 100%); max-width: 100%; height: 100dvh; max-height: 100dvh; border: 0; padding: 0; background: var(--white); color: var(--text); translate: 100% 0; transition: translate 0.45s var(--ease), overlay 0.45s allow-discrete, display 0.45s allow-discrete; }
.sheet--left { inset: 0 auto 0 0; margin: 0 auto 0 0; translate: -100% 0; }
.sheet[open] { display: flex; flex-direction: column; translate: 0 0; }
@starting-style { .sheet[open] { translate: 100% 0; } .sheet--left[open] { translate: -100% 0; } }
.sheet::backdrop, .search::backdrop { background: rgb(28 23 20 / 0.45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.sheet__head { display: flex; align-items: center; justify-content: space-between; padding: 0.85rem 1.25rem; border-bottom: 1px solid var(--line); }
.sheet__head h2 { font-size: 1.75rem; }
.sheet__body { flex: 1; overflow-y: auto; padding: 1.25rem; overscroll-behavior: contain; }
.sheet__foot { padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: grid; gap: 0.7rem; }

.line { display: grid; grid-template-columns: 82px 1fr; gap: 1rem; padding-block: 0.9rem; border-bottom: 1px solid var(--line); }
.line:first-child { padding-top: 0; }
.line > a { align-self: start; background: var(--soft); border-radius: 10px; }
.line img { width: 82px; aspect-ratio: 1; object-fit: contain; padding: 4px; }
.line__brand { font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.line__name { font: 400 1.15rem/1.25 var(--serif); }
.line__row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: 0.5rem; flex-wrap: wrap; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 99px; }
.qty button { width: 38px; height: 36px; font-size: 1.1rem; }
.qty button:disabled { opacity: 0.3; cursor: default; }
.qty output { min-width: 26px; text-align: center; font-size: 0.85rem; }
.text-btn { font-size: 0.74rem; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.text-btn:hover { color: var(--text); }

.order { display: grid; gap: 0.8rem; padding-top: 1.5rem; }
.order h3 { font-size: 1.45rem; }
.field { display: grid; gap: 0.3rem; font-size: 0.76rem; font-weight: 500; }
.field input, .field select, .field textarea { width: 100%; min-height: 46px; padding: 0.6rem 0.85rem; border: 1px solid var(--line); border-radius: 10px; background: var(--white); font-size: 1rem; font-weight: 400; transition: border-color 0.25s; }
.field textarea { resize: vertical; min-height: 76px; }
.field :is(input, select, textarea):focus { border-color: var(--text); outline: none; }
.order__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
@media (max-width: 400px) { .order__pair { grid-template-columns: 1fr; } }

.totals { display: grid; gap: 0.15rem; font-size: 0.82rem; }
.totals div { display: flex; justify-content: space-between; color: var(--muted); }
.totals div:last-child { color: var(--text); font-size: 1.15rem; font-weight: 500; padding-top: 0.25rem; }
.fine { font-size: 0.72rem; color: var(--muted); text-align: center; }

.empty { height: 100%; display: grid; place-content: center; justify-items: center; text-align: center; gap: 0.8rem; padding: 2rem 0; }
.empty img { width: 72px; border-radius: 16px; }
.empty h3 { font-size: 1.9rem; }
.empty p { color: var(--muted); max-width: 30ch; }

.menu-list a { display: flex; justify-content: space-between; align-items: center; padding: 0.95rem 0; border-bottom: 1px solid var(--line); font: 400 1.6rem var(--serif); }
.menu-list svg { width: 19px; height: 19px; }

.search { margin: 0 auto; width: 100%; max-width: 100%; max-height: min(86dvh, 720px); height: fit-content; top: 0; border: 0; padding: 0; background: var(--white); color: var(--text); overflow: hidden; translate: 0 -100%; transition: translate 0.45s var(--ease), overlay 0.45s allow-discrete, display 0.45s allow-discrete; }
.search[open] { display: flex; flex-direction: column; translate: 0 0; }
@starting-style { .search[open] { translate: 0 -100%; } }
.search__bar, .search__body { width: min(960px, 100%); margin-inline: auto; padding: 1rem 1.25rem; }
.search__bar { display: flex; align-items: center; gap: 0.75rem; border-bottom: 1px solid var(--line); }
.search__bar > svg { width: 21px; height: 21px; flex: none; }
.search__bar input { flex: 1; min-width: 0; border: 0; background: none; font: 400 1.6rem var(--serif); padding: 0.35rem 0; outline: none; }
.search__bar input::-webkit-search-cancel-button { display: none; }
.search__body { overflow-y: auto; }
.search__body .chips { margin-bottom: 1rem; }
.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 0.5rem; }
.result { display: grid; grid-template-columns: 72px 1fr; gap: 0.85rem; align-items: center; padding: 0.5rem; border-radius: var(--radius); transition: background 0.25s; }
.result:hover { background: var(--soft); }
.result img { width: 72px; aspect-ratio: 1; object-fit: contain; padding: 4px; border-radius: 10px; background: var(--soft); }
.result b { display: block; font: 400 1.1rem/1.2 var(--serif); }
.result small { color: var(--muted); }

.footer { background: var(--text); color: var(--white); padding-block: clamp(3.5rem, 6vw, 5rem) 1.75rem; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 2.5rem; }
.footer__lead { display: grid; gap: 1.1rem; align-content: start; justify-items: start; }
.footer__lead img { height: 80px; width: auto; }
.footer__lead p { color: rgb(255 255 255 / 0.65); font-weight: 300; max-width: 32ch; }
.footer h2 { font-size: 1.35rem; margin-bottom: 1.1rem; }
.footer li { margin-bottom: 0.6rem; }
.footer li a, .footer address, .footer__phone { color: rgb(255 255 255 / 0.65); font-weight: 300; font-size: 0.84rem; transition: color 0.25s; }
.footer li a:hover, .footer__phone:hover { color: var(--white); }
.footer__phone { display: block; margin-top: 0.6rem; }
.footer__pay { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1.2rem; }
.footer__pay span { border: 1px solid rgb(255 255 255 / 0.25); border-radius: 6px; padding: 0.15rem 0.65rem; font-size: 0.7rem; }
.footer__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; margin-top: 3rem; padding-top: 1.4rem; border-top: 1px solid rgb(255 255 255 / 0.14); font-size: 0.74rem; color: rgb(255 255 255 / 0.55); }
@media (min-width: 701px) { .footer__base { padding-right: 4.5rem; } }
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; } .footer__grid > :first-child, .footer__grid > :last-child { grid-column: 1 / -1; } }

/* Help chat */
.chat-toggle { position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 40; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--text); color: var(--white); box-shadow: 0 14px 28px -10px rgb(28 23 20 / 0.55); transition: scale 0.3s var(--ease); }
.chat-toggle:hover { scale: 1.07; }
.chat-toggle svg { width: 28px; height: 28px; }
.chat { position: fixed; right: 1.2rem; bottom: 5.9rem; z-index: 40; display: flex; flex-direction: column; width: min(380px, calc(100% - 2rem)); height: min(580px, calc(100dvh - 7.5rem)); border: 1px solid var(--line); border-radius: 20px; background: var(--white); box-shadow: 0 30px 60px -24px rgb(28 23 20 / 0.4); overflow: hidden; animation: chat-in 0.35s var(--ease); }
@keyframes chat-in { from { opacity: 0; translate: 0 18px; } }
.chat__head { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 0.75rem 0.75rem 1rem; background: var(--text); color: var(--white); }
.chat__head > div { flex: 1; }
.chat__head img { border-radius: 50%; border: 1px solid rgb(255 255 255 / 0.2); }
.chat__head h2 { font-size: 1.3rem; }
.chat__head p { font-size: 0.7rem; color: rgb(255 255 255 / 0.65); }
.chat__head .icon-btn:hover { background: rgb(255 255 255 / 0.14); }
.chat__log { position: relative; flex: 1; display: flex; flex-direction: column; gap: 0.7rem; overflow-y: auto; overscroll-behavior: contain; padding: 1rem; background: #fbf9f6; }
.chat__msg { flex: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.55rem; max-width: 92%; padding: 0.7rem 0.9rem; border-radius: 16px; font-size: 0.84rem; animation: chat-in 0.3s var(--ease); }
.chat__msg--bot { align-self: flex-start; background: var(--white); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.chat__msg--me { align-self: flex-end; background: var(--text); color: var(--white); border-bottom-right-radius: 4px; }
.chat__msg:has(.chat__products) { width: 100%; max-width: 100%; }
.chat__products li { display: flex; align-items: center; gap: 0.5rem; padding-block: 0.5rem; border-top: 1px solid var(--line); }
.chat__products li > a:first-child { flex: 1; min-width: 0; display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: center; gap: 0.65rem; }
.chat__products img { width: 56px; aspect-ratio: 1; object-fit: contain; padding: 3px; border-radius: 10px; background: var(--soft); }
.chat__products small { display: block; font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); }
.chat__products b { display: block; font-weight: 400; font-size: 0.8rem; line-height: 1.35; }
.chat__products .price { font-size: 0.8rem; }
.chat__add { flex: none; min-width: 58px; padding: 0.35rem 0.8rem; border: 1px solid var(--text); border-radius: 99px; font-size: 0.74rem; font-weight: 500; text-align: center; transition: background 0.25s, color 0.25s; }
button.chat__add:hover, a.chat__add:hover { background: var(--text); color: var(--white); }
.chat__note { font-size: 0.72rem; color: var(--muted); }
.chat__steps { list-style: decimal; padding-left: 1.1rem; display: grid; gap: 0.35rem; }
.chat__link { display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.6rem 0.9rem; border: 1px solid var(--text); border-radius: 99px; font-size: 0.8rem; font-weight: 500; }
.chat__link svg { width: 17px; height: 17px; }
.chat__link--green { background: var(--green); border-color: var(--green); color: var(--white); }
.chat__options { display: flex; flex-wrap: wrap; gap: 0.4rem; max-height: 40%; overflow-y: auto; padding: 0.75rem; border-top: 1px solid var(--line); }
.chat__options .chip { padding: 0.45rem 0.85rem; font-size: 0.76rem; }

.tabbar { display: none; }
@media (max-width: 700px) {
  .footer { padding-bottom: calc(5.75rem + env(safe-area-inset-bottom)); }
  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; inset: auto 0 0; z-index: 28; background: var(--white); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar > * { position: relative; display: grid; justify-items: center; gap: 1px; padding: 0.55rem 0 0.4rem; font-size: 0.64rem; }
  .tabbar svg { width: 21px; height: 21px; }
  .tabbar .badge { top: 3px; right: calc(50% - 22px); }
  .chat-toggle { right: 0.9rem; bottom: calc(72px + env(safe-area-inset-bottom)); width: 52px; height: 52px; }
  .chat-open .chat-toggle { display: none; }
  .chat { inset: auto 0 calc(58px + env(safe-area-inset-bottom)); width: 100%; height: min(600px, calc(100dvh - 90px)); border-radius: 20px 20px 0 0; }
}

.toast-stack { position: fixed; left: 50%; bottom: 5.6rem; translate: -50% 0; z-index: 60; display: grid; gap: 0.5rem; justify-items: center; width: max-content; max-width: calc(100% - 2rem); pointer-events: none; }
.toast { background: var(--text); color: var(--white); border-radius: 99px; padding: 0.7rem 1.35rem; font-size: 0.82rem; box-shadow: 0 14px 30px -12px rgb(0 0 0 / 0.45); animation: toast-in 0.45s var(--ease); }
@keyframes toast-in { from { opacity: 0; translate: 0 14px; } }
