/* Default storefront theme. Colors come from CSS variables set in layouts/main.php
   from the theme settings (main and secondary color). */

:root {
    --ink: #1F2328;
    --muted: #6B7280;
    --line: #ECEDEF;
    --tile: #F6F6F7;
    --ok: #1B7A45;
    --bs-body-font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --bs-body-color: var(--ink);
}

body {
    font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: .93rem;
    background: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1; padding-bottom: 1rem; }
h1, h2, h3, h4, h5 { font-weight: 700; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-d); }
.wrap { max-width: 1170px; }
.text-brand { color: var(--brand); }
.min-w-0 { min-width: 0; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.page-title { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0; }
.breadcrumb a { color: var(--muted); }

/* Buttons */
.pillbtn { border: 0; border-radius: 99px; font-weight: 600; font-size: .84rem; padding: .55rem 1.05rem; display: inline-flex; align-items: center; gap: .5rem; white-space: nowrap; text-decoration: none; }
.pb-brand { background: var(--brand); color: var(--on-brand); }
.pb-brand:hover, .pb-brand:focus { background: var(--brand-d); color: var(--on-brand); }
.pb-dark { background: var(--ink); color: #fff; }
.pb-dark:hover { background: #000; color: #fff; }
.pb-soft { background: var(--tile); color: var(--ink); }
.pb-soft:hover { background: #EBEBED; color: var(--ink); }
.pb-tint { background: var(--tint); color: var(--brand); }
.pb-tint:hover { background: var(--brand); color: var(--on-brand); }
.pillbtn:disabled { opacity: .55; cursor: not-allowed; }
.btn-brand { background: var(--brand); color: var(--on-brand); border: 0; border-radius: 99px; padding: .6rem 1.4rem; font-weight: 600; }
.btn-brand:hover, .btn-brand:focus { background: var(--brand-d); color: var(--on-brand); }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: var(--brand); box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--brand) 18%, transparent); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }

/* Header */
.site-header { background: #fff; position: sticky; top: 0; z-index: 1030; }
.logo { font-weight: 800; font-size: 1.4rem; color: var(--brand); display: flex; align-items: center; gap: .45rem; letter-spacing: -.02em; white-space: nowrap; }
.logo:hover { color: var(--brand-d); }
.logo i { font-size: 1.1rem; }
.logo img { max-height: 44px; width: auto; }
@media (max-width: 575px) { .logo span { max-width: 9.5rem; overflow: hidden; text-overflow: ellipsis; font-size: 1.15rem; } }
.navl a { font-weight: 500; padding: .4rem .8rem; color: var(--ink); }
.navl a.on, .navl a:hover { color: var(--brand); }
.choice-btn { border: 0; background: none; align-items: center; gap: .6rem; padding: .3rem .5rem; border-radius: 12px; color: var(--ink); max-width: 260px; }
.choice-btn:hover { background: var(--tile); }
.choice-btn > i:first-child { width: 36px; height: 36px; border-radius: 50%; background: var(--tint); color: var(--brand); display: grid; place-items: center; flex-shrink: 0; }
.choice-btn small { display: block; color: var(--muted); font-size: .7rem; line-height: 1.1; }
.choice-btn b { font-size: .84rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.choice-strip { display: flex; width: 100%; justify-content: space-between; align-items: center; border: 0; background: var(--tint); color: var(--brand); padding: .55rem 1rem; font-size: .82rem; text-align: left; }
.closed-strip { background: #FFF6DB; color: #6B4E00; font-size: .84rem; padding: .55rem 0; border-bottom: 1px solid #F3E2AE; }
.search { background: var(--tile); border-radius: 99px; display: flex; align-items: center; padding: 0 1rem; gap: .5rem; min-width: 220px; position: relative; }
.search input { border: 0; background: none; padding: .55rem 0; outline: 0; width: 100%; font-size: .86rem; }
.search input::-webkit-search-cancel-button { cursor: pointer; }
.search:focus-within { box-shadow: 0 0 0 2px var(--brand); }
.search-page { max-width: 560px; padding-right: .3rem; }
.search-page .pillbtn { padding: .4rem 1rem; }
.search-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; min-width: 320px; background: #fff; border-radius: 14px; box-shadow: 0 12px 34px rgba(0, 0, 0, .16); z-index: 1050; overflow: hidden; }
.search-results a, .search-results .sr-empty { display: flex; gap: .7rem; align-items: center; padding: .55rem .8rem; color: var(--ink); font-size: .85rem; }
.search-results a:hover, .search-results a.active { background: var(--tile); }
.search-results .sr-ph { width: 42px; height: 42px; border-radius: 8px; background: var(--tile); flex-shrink: 0; overflow: hidden; display: grid; place-items: center; color: #C9CDD3; }
.search-results .sr-ph img { width: 100%; height: 100%; object-fit: cover; }
.search-results .sr-all { justify-content: center; font-weight: 600; color: var(--brand); border-top: 1px solid var(--line); }
.search-results .sr-price { margin-left: auto; font-weight: 600; white-space: nowrap; }
.basket-btn { position: relative; }
.basket-count { position: absolute; top: -6px; right: -6px; background: var(--brand); color: var(--on-brand); border: 2px solid #fff; border-radius: 99px; font-size: .68rem; min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 4px; }
.mobile-nav a, .mobile-nav button { color: var(--ink); font-weight: 500; padding: .7rem .4rem; border: 0; background: none; border-bottom: 1px solid var(--line); }
.mobile-nav a.on { color: var(--brand); }
.lang-switch { display: inline-flex; background: var(--tile); border-radius: 99px; padding: 3px; }
.lang-switch a { padding: .3rem .8rem; border-radius: 99px; font-weight: 600; font-size: .78rem; color: var(--muted); }
.lang-switch a.on { background: var(--brand); color: var(--on-brand); }

/* Photo placeholder: shows an icon until the photo loads, or when there is none */
.ph { position: relative; background: linear-gradient(135deg, #F6E9EA, #EAD3D6); overflow: hidden; display: block; }
.ph::after { content: "\f2e7"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; inset: 0; display: grid; place-items: center; color: #D3AFB3; font-size: 2.4rem; }
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.ph picture { position: absolute; inset: 0; z-index: 1; }

/* Home slider (pictures only) */
.slider { position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 21 / 8; min-height: 200px; background: #EAD3D6; touch-action: pan-y; }
.slider .track { display: flex; height: 100%; transition: transform .6s cubic-bezier(.4, 0, .2, 1); }
.slider .slide { flex: 0 0 100%; height: 100%; }
.slider .slide .ph { height: 100%; }
.snav { position: absolute; top: 50%; margin-top: -21px; width: 42px; height: 42px; border: 0; border-radius: 50%; background: #fff; color: var(--brand); box-shadow: 0 4px 14px rgba(0, 0, 0, .2); z-index: 5; display: grid; place-items: center; }
.snav:hover { background: var(--brand); color: var(--on-brand); }
.snav.prev { left: 14px; }
.snav.next { right: 14px; }
.sdots { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; gap: 7px; z-index: 5; }
.sdots button { width: 10px; height: 10px; border: 0; padding: 0; border-radius: 9px; background: rgba(255, 255, 255, .65); transition: width .3s, background .3s; }
.sdots button.on { width: 30px; background: #fff; }
.snav:focus-visible, .sdots button:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
@media (max-width: 767px) { .slider { aspect-ratio: 16 / 9; } .snav { display: none; } }
.welcome { border-radius: 20px; background: linear-gradient(120deg, #fff, var(--tint)); border: 1px solid var(--line); padding: 2.5rem; display: flex; align-items: center; justify-content: space-between; gap: 2rem; min-height: 260px; }
.welcome h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; color: var(--brand); line-height: 1.1; }
.welcome p { color: var(--muted); max-width: 32rem; }
.welcome-art { font-size: 8rem; color: color-mix(in srgb, var(--brand) 25%, transparent); }
@media (max-width: 767px) { .welcome { padding: 1.6rem; } .welcome-art { display: none; } }

/* Sections and categories */
.sec-h { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 2.4rem 0 1.1rem; }
.sec-h h2 { font-size: 1.35rem; margin: 0; }
.sec-h h2 a { color: inherit; }
.cats { display: flex; gap: .8rem; overflow-x: auto; scrollbar-width: none; padding: .2rem .1rem .4rem; scroll-snap-type: x proximity; }
.cats::-webkit-scrollbar { display: none; }
.cat { flex: 0 0 120px; background: var(--tile); border-radius: 16px; padding: .85rem .5rem; text-align: center; font-size: .78rem; font-weight: 600; color: var(--ink); scroll-snap-align: start; }
.cat:hover { background: #EDEDEF; color: var(--ink); }
.cat .cat-ph { width: 62px; height: 62px; border-radius: 50%; margin: 0 auto .5rem; }
.cat .cat-ph::after { font-size: 1rem; }
.cat .cat-all { background: var(--tint); display: grid; place-items: center; color: var(--brand); font-size: 1.3rem; }
.cat .cat-all::after { content: none; }
.cat.on { background: var(--tint); outline: 2px solid var(--brand); }

/* Item cards */
.fc { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; height: 100%; display: flex; flex-direction: column; transition: box-shadow .2s; }
.fc:hover { box-shadow: 0 8px 24px rgba(0, 0, 0, .07); }
.fc .ph { aspect-ratio: 4 / 3; }
.fc .b { padding: .85rem .95rem .95rem; display: flex; flex-direction: column; flex: 1; }
.fc h3 { font-size: .93rem; margin: 0 0 .2rem; line-height: 1.3; }
.fc h3 a { color: var(--ink); }
.fc h3 a:hover { color: var(--brand); }
.fc p { color: var(--muted); font-size: .78rem; margin: 0 0 .7rem; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tag-icons { display: flex; gap: .4rem; color: var(--ok); font-size: .78rem; margin-bottom: .3rem; }
.pr { font-weight: 700; font-size: 1.02rem; white-space: nowrap; }
.pr small { font-weight: 500; color: var(--muted); font-size: .72rem; }
.addb { background: var(--tint); color: var(--brand); border: 0; border-radius: 99px; padding: .38rem .85rem; font-weight: 600; font-size: .78rem; display: inline-flex; gap: .4rem; align-items: center; white-space: nowrap; }
.addb:hover { background: var(--brand); color: var(--on-brand); }
.addb.disabled { background: var(--tile); color: var(--muted); }
.addb.busy { opacity: .6; pointer-events: none; }
.is-sold-out .ph img { filter: grayscale(.85); opacity: .7; }
.sold-badge { position: absolute; z-index: 2; left: .6rem; top: .6rem; background: rgba(20, 22, 27, .85); color: #fff; font-size: .72rem; font-weight: 600; padding: .2rem .6rem; border-radius: 99px; }
@media (max-width: 575px) {
    .fc .b { padding: .7rem; }
    .fc .b > .d-flex { flex-direction: column; align-items: stretch !important; }
    .addb { justify-content: center; }
}

/* Promo banners */
.promo { border-radius: 16px; overflow: hidden; min-height: 200px; position: relative; color: #fff; display: flex; align-items: center; }
.promo .ph { position: absolute; inset: 0; }
.promo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20, 20, 22, .78), rgba(20, 20, 22, .1)); z-index: 2; }
.promo .t { position: relative; z-index: 3; padding: 1.6rem; max-width: 65%; }
.promo h2 { margin: .2rem 0 .8rem; }

/* Menu page */
.menu-section + .menu-section { margin-top: 2.2rem; }
.filters-panel { --bs-offcanvas-width: 300px; }
@media (min-width: 992px) { .filters-panel { position: sticky; top: 90px; } }
.filter-block { border: 0; padding: 0; margin: 0 0 1.4rem; }
.filter-block h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: .6rem; }
.filter-link { display: flex; justify-content: space-between; padding: .38rem .6rem; border-radius: 8px; color: var(--ink); font-size: .87rem; }
.filter-link:hover { background: var(--tile); color: var(--ink); }
.filter-link.on { background: var(--tint); color: var(--brand); font-weight: 600; }
.filter-link .count { color: var(--muted); font-size: .78rem; }
.filters .form-check { margin-bottom: .25rem; font-size: .87rem; }
.empty-state { text-align: center; color: var(--muted); padding: 3rem 1rem; border: 1px dashed var(--line); border-radius: 16px; }
.empty-state i { font-size: 2rem; margin-bottom: .8rem; display: block; }

/* Item page and popup */
.item-photo { border-radius: 18px; aspect-ratio: 4 / 3; }
.item-modal { border: 0; border-radius: 18px; }
.item-modal-photo { border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 9; background: var(--tile); }
.item-modal-photo img { width: 100%; height: 100%; object-fit: cover; }
.tag-pill { background: #E8F5EE; color: var(--ok); border-radius: 99px; padding: .25rem .7rem; font-size: .76rem; font-weight: 600; display: inline-flex; gap: .35rem; align-items: center; }
.allergen-box { background: #FFF9EC; border: 1px solid #F6E3B4; border-radius: 12px; padding: .7rem .9rem; color: #5E4700; }
.opt-group { border: 1px solid var(--line); border-radius: 14px; padding: .3rem .9rem .5rem; margin-bottom: .9rem; }
.opt-group.has-error { border-color: #DC3545; }
.opt-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .2rem 1rem; font-size: .95rem; font-weight: 700; padding: .55rem 0 .35rem; margin: 0; width: 100%; float: none; }
.opt-rule { font-size: .74rem; font-weight: 500; color: var(--muted); text-align: right; }
.opt-rule .req { background: var(--tint); color: var(--brand); border-radius: 99px; padding: .1rem .5rem; margin-left: .3rem; font-weight: 600; }
.opt { display: flex; align-items: center; gap: .7rem; padding: .55rem 0; border-top: 1px solid var(--line); cursor: pointer; font-size: .9rem; margin: 0; }
.opt:first-of-type { border-top: 0; }
.opt .form-check-input { margin: 0; flex-shrink: 0; width: 1.15em; height: 1.15em; }
.opt .opt-name { flex: 1; }
.opt .opt-price { color: var(--muted); font-size: .84rem; }
.opt.is-disabled { opacity: .45; cursor: not-allowed; }
.note-box summary { cursor: pointer; font-size: .86rem; font-weight: 600; color: var(--brand); padding: .3rem 0; }
.add-bar { display: flex; gap: .8rem; align-items: center; margin-top: 1rem; }
.modal .add-bar { position: sticky; bottom: -1rem; background: #fff; padding: .8rem 0 .2rem; margin-bottom: -.2rem; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 99px; background: #fff; }
.qty button { border: 0; background: none; width: 38px; height: 42px; font-weight: 700; color: var(--ink); }
.qty input { width: 36px; border: 0; text-align: center; font-weight: 600; -moz-appearance: textfield; background: none; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-sm button { width: 30px; height: 30px; font-size: .75rem; }
.qty-sm span { min-width: 20px; text-align: center; font-weight: 600; font-size: .85rem; }

/* Basket drawer */
.basket { --bs-offcanvas-width: 420px; }
.basket-choice { display: flex; align-items: center; gap: .7rem; background: var(--tile); border-radius: 12px; padding: .65rem .8rem; margin-bottom: .8rem; }
.basket-choice > i { color: var(--brand); }
.line { display: flex; gap: .75rem; align-items: flex-start; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.line .line-ph { width: 56px; height: 56px; border-radius: 10px; flex-shrink: 0; }
.line .line-ph::after { font-size: 1rem; }
.line-opts { font-size: .76rem; }
.line.has-problem { opacity: .75; }
.basket-totals { border-top: 1px solid var(--line); }
.basket-body-busy { opacity: .5; pointer-events: none; }

/* Branch popup */
.choice-modal { border: 0; border-radius: 20px; }
.service-switch { display: flex; background: var(--tile); border-radius: 99px; padding: 4px; }
.service-switch button { flex: 1; border: 0; background: none; border-radius: 99px; padding: .6rem; font-weight: 600; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: .5rem; }
.service-switch button.on { background: #fff; color: var(--brand); box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
.branch-opt { width: 100%; display: flex; align-items: center; gap: .8rem; border: 1.5px solid var(--line); background: #fff; border-radius: 14px; padding: .8rem 1rem; color: var(--ink); }
.branch-opt:hover { border-color: var(--brand); }
.branch-opt.on { border-color: var(--brand); background: var(--tint); }
.status-dot { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; white-space: nowrap; }
.status-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-dot.open { color: var(--ok); }
.status-dot.closed { color: var(--muted); }

/* Toast messages */
.toast-zone { position: fixed; top: 84px; right: 16px; z-index: 1090; display: flex; flex-direction: column; gap: .5rem; pointer-events: none; }
.toast-msg { pointer-events: auto; min-width: 260px; max-width: 360px; background: #fff; border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); padding: .8rem 1rem; display: flex; gap: .7rem; align-items: flex-start; font-size: .87rem; border-left: 4px solid var(--ok); transform: translateX(120%); transition: transform .35s cubic-bezier(.2, .9, .3, 1.2); }
.toast-msg.show { transform: none; }
.toast-msg.error { border-left-color: #DC3545; }
.toast-msg > i { margin-top: .15rem; color: var(--ok); }
.toast-msg.error > i { color: #DC3545; }
.toast-msg .toast-action { margin-left: auto; font-weight: 600; white-space: nowrap; border: 0; background: none; color: var(--brand); padding: 0; }
@media (max-width: 575px) { .toast-zone { left: 12px; right: 12px; top: 70px; } .toast-msg { max-width: none; } }

/* Footer */
.site-footer { background: var(--secondary); color: color-mix(in srgb, var(--on-secondary) 68%, transparent); margin-top: 3rem; }
.site-footer a { color: inherit; }
.site-footer a:hover { color: var(--on-secondary); }
.site-footer h2 { color: var(--on-secondary); font-weight: 700; margin-bottom: 1rem; }
.site-footer .footer-logo { color: var(--on-secondary); }
.site-footer .footer-logo i { color: var(--brand); }
.footer-bottom { border-top: 1px solid color-mix(in srgb, var(--on-secondary) 12%, transparent); }
.site-footer .lang-switch { background: color-mix(in srgb, var(--on-secondary) 10%, transparent); }
.site-footer .lang-switch a { color: inherit; }
.site-footer .lang-switch a.on { color: var(--on-brand); }
.soc a { width: 36px; height: 36px; border-radius: 50%; background: color-mix(in srgb, var(--on-secondary) 10%, transparent); color: var(--on-secondary); display: grid; place-items: center; }
.soc a:hover { background: var(--brand); color: var(--on-brand); }

/* Error pages */
.error-page .code { font-size: clamp(4rem, 12vw, 7rem); font-weight: 800; color: var(--tint); line-height: 1; -webkit-text-stroke: 2px var(--brand); }

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
    .slider .track { transition: none; }
}

/* Checkout and order pages */
.co-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 1.3rem 1.4rem; margin-bottom: 1rem; }
.co-card h2 { font-size: 1.05rem; margin-bottom: 1rem; display: flex; align-items: center; gap: .6rem; }
.co-step { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-size: .8rem; display: inline-grid; place-items: center; flex-shrink: 0; }
@media (min-width: 992px) { .co-summary { position: sticky; top: 96px; } }
.when-opt { display: flex; gap: .8rem; align-items: flex-start; border: 1.5px solid var(--line); border-radius: 12px; padding: .8rem 1rem; cursor: pointer; margin: 0; }
.when-opt:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--tint) 45%, #fff); }
.when-opt .form-check-input { margin-top: .2rem; flex-shrink: 0; }
.when-opt.is-disabled { opacity: .55; cursor: not-allowed; }
.order-hero { display: flex; gap: 1rem; align-items: center; background: #E8F5EE; border-radius: 18px; padding: 1.4rem 1.6rem; }
.order-hero > i { font-size: 2.6rem; color: var(--ok); }
.order-hero h1 { font-size: 1.4rem; margin: 0 0 .2rem; }
.order-hero p { margin: 0; color: var(--muted); }
.order-hero.is-waiting { background: var(--tile); }
.order-hero.is-waiting .spinner-border { color: var(--brand); flex-shrink: 0; }
.order-hero.is-cancelled { background: #FDECEC; }
.order-hero.is-cancelled > i { color: #DC3545; }
.order-steps { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; counter-reset: s; }
.order-steps li { font-size: .78rem; color: var(--muted); text-align: center; position: relative; padding-top: 1.6rem; }
.order-steps li span { position: absolute; top: 0; left: 50%; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%; background: var(--line); }
.order-steps li::before { content: ""; position: absolute; top: 10px; left: -50%; right: 50%; height: 3px; background: var(--line); z-index: -1; }
.order-steps li:first-child::before { content: none; }
.order-steps li.done { color: var(--ink); font-weight: 600; }
.order-steps li.done span, .order-steps li.done::before { background: var(--ok); }
.order-steps li.now span { box-shadow: 0 0 0 5px color-mix(in srgb, var(--ok) 25%, transparent); }
.btn-link { color: var(--brand); text-decoration: none; font-weight: 600; } .btn-link:hover { color: var(--brand-d); }
