/* =====================================================================
   Rustica - stilovi javnog dijela aplikacije
   Boje, razmaci i fontovi definirani su jednom ovdje gore (varijable),
   pa se cijeli izgled mijenja na jednom mjestu.
   ===================================================================== */
:root {
    --bg: #faf7f2;            /* topla bjelokost */
    --surface: #ffffff;
    --surface-2: #f5efe5;
    --ink: #1d1814;           /* gotovo crna, topla */
    --ink-2: #4a3f36;
    --muted: #8b7e71;
    --line: #ebe3d6;
    --dark: #15110e;          /* tamno drvo */
    --dark-2: #241d18;
    --gold: #b8893b;          /* zlatna iz logotipa */
    --gold-2: #d4ac62;
    --gold-soft: #f6eddc;
    --green: #2f7a4f;
    --red: #b2402f;

    --radius: 18px;
    --radius-sm: 12px;
    --shadow-sm: 0 1px 2px rgba(29, 24, 20, .05), 0 2px 8px rgba(29, 24, 20, .04);
    --shadow: 0 2px 6px rgba(29, 24, 20, .05), 0 12px 32px rgba(29, 24, 20, .08);
    --shadow-lg: 0 24px 64px rgba(21, 17, 14, .22);
    --serif: "Playfair Display", Georgia, serif;
    --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    --ease: cubic-bezier(.2, .8, .2, 1);
    --header-h: 64px;
    --tabbar-h: 64px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--sans);
    font-size: 15px;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
[x-cloak] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { flex: none; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- Tipografija ---------- */
.display, .h1, .h2, .menu-heading, .brand-text, .drawer-head h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; }
.display { font-size: clamp(2.3rem, 7vw, 4.2rem); line-height: 1.06; margin: 0 0 18px; }
.display em { font-style: italic; color: var(--gold-2); font-weight: 500; }
.h1 { font-size: clamp(1.9rem, 5.5vw, 2.7rem); line-height: 1.05; margin: 0; }
.h2 { font-size: clamp(1.55rem, 4vw, 2.1rem); line-height: 1.1; margin: 0; }
.lead { font-size: 1.05rem; color: var(--ink-2); margin: 10px 0 0; max-width: 46ch; }
.muted { color: var(--muted); }
.small-gap { margin-top: 12px; }
.center { text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: .74rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-2); }
.eyebrow.dark { color: var(--gold); margin-bottom: 8px; }
.eyebrow .line { width: 28px; height: 1px; background: currentColor; }
.link { color: var(--gold); font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; }
.fine { font-size: .8rem; color: var(--muted); margin: 12px 0 0; }

/* ---------- Zaglavlje ---------- */
.topbar {
    position: sticky; top: 0; z-index: 40;
    background: rgba(21, 17, 14, .92);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    padding-top: env(safe-area-inset-top);
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.topbar-inner { max-width: 1120px; margin: 0 auto; height: var(--header-h); padding: 0 16px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--gold-2); }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border: 1.5px solid currentColor; border-radius: 50%; font-family: var(--serif); font-size: 1.15rem; font-weight: 700; }
.brand-mark.big { width: 56px; height: 56px; font-size: 1.7rem; color: var(--gold); margin: 0 auto 14px; }
.brand-text { font-size: 1.4rem; letter-spacing: .04em; line-height: 1; }
.brand-text.small { font-size: 1.4rem; color: var(--gold-2); }
.topnav { display: none; gap: 4px; margin: 0 auto; }
.topnav a { padding: 8px 14px; border-radius: 999px; color: #d9d0c3; text-decoration: none; font-weight: 500; font-size: .92rem; transition: color .2s, background .2s; }
.topnav a:hover { color: #fff; }
.topnav a.active { color: var(--dark); background: var(--gold-2); }
.topbar-actions { display: flex; gap: 6px; margin-left: auto; }
.icon-btn { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .07); color: #f1ebe2; cursor: pointer; text-decoration: none; transition: background .2s, transform .15s; }
.icon-btn:hover { background: rgba(255, 255, 255, .14); }
.icon-btn:active { transform: scale(.94); }
.icon-btn.light { background: var(--surface-2); color: var(--ink); }
.badge { position: absolute; top: -3px; right: -3px; min-width: 19px; height: 19px; padding: 0 5px; display: grid; place-items: center; border-radius: 10px; background: var(--gold-2); color: var(--dark); font-size: .7rem; font-weight: 700; border: 2px solid var(--dark); }
.cart-btn { display: none; }

/* ---------- Donja navigacija (mobitel) ---------- */
.tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: grid; grid-template-columns: repeat(4, 1fr);
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(21, 17, 14, .96);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid rgba(255, 255, 255, .06);
}
.tabbar a, .tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: none; color: #9d9183; text-decoration: none; font-size: .68rem; font-weight: 500; cursor: pointer; transition: color .2s; }
.tabbar .active { color: var(--gold-2); }
.tabbar .active::before { content: ""; position: absolute; top: 0; width: 28px; height: 2px; border-radius: 2px; background: var(--gold-2); }
.tabbar .badge { top: 6px; right: calc(50% - 22px); }

@media (min-width: 860px) {
    body { padding-bottom: 0; }
    .topnav { display: flex; }
    .cart-btn { display: grid; }
    .tabbar { display: none; }
}

/* ---------- Stranica ---------- */
.page { max-width: 1120px; margin: 0 auto; padding: 22px 16px 56px; min-height: 70vh; }
.page-in { animation: pageIn .45s var(--ease); }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.page-head { margin: 8px 0 26px; }
.page-head.compact { margin-bottom: 18px; }
.head-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; color: var(--muted); text-decoration: none; font-weight: 500; font-size: .9rem; }
.back-link:hover { color: var(--ink); }
.section { margin-top: 48px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; }

.footer { background: var(--dark); color: #a99d8f; text-align: center; padding: 40px 16px calc(28px + var(--tabbar-h)); }
.footer-inner p { margin: 8px 0 0; font-size: .85rem; }
.footer .muted { color: #6f655b; }
@media (min-width: 860px) { .footer { padding-bottom: 32px; } }

/* ---------- Gumbi ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 46px; padding: 0 22px; border-radius: 999px; border: 1.5px solid transparent;
    font-weight: 600; font-size: .93rem; text-decoration: none; cursor: pointer; white-space: nowrap;
    transition: background .2s, color .2s, border-color .2s, transform .15s, box-shadow .2s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 1rem; }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn-gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #1b140c; box-shadow: 0 6px 18px rgba(184, 137, 59, .3); }
.btn-gold:hover:not(:disabled) { box-shadow: 0 8px 26px rgba(184, 137, 59, .45); }
.btn-dark { background: var(--dark); color: #f3ece2; }
.btn-dark:hover { background: var(--dark-2); }
.btn-line { border-color: var(--line); background: var(--surface); color: var(--ink); }
.btn-line:hover { border-color: var(--gold); }
.btn-ghost { border-color: rgba(255, 255, 255, .25); color: #f3ece2; background: rgba(255, 255, 255, .04); }
.btn-ghost:hover { border-color: var(--gold-2); color: var(--gold-2); }
.btn-icon { width: 38px; padding: 0; border-color: var(--line); background: var(--surface); }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(0, 0, 0, .2); border-top-color: currentColor; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Naslovni dio ---------- */
.hero {
    position: relative; overflow: hidden;
    margin: -22px -16px 0; padding: 64px 22px 56px;
    background:
        radial-gradient(1200px 500px at 85% -10%, rgba(212, 172, 98, .22), transparent 60%),
        radial-gradient(700px 400px at -10% 110%, rgba(178, 64, 47, .18), transparent 60%),
        linear-gradient(180deg, #1b1511, var(--dark));
    color: #f3ece2;
}
.hero::after { /* fina tekstura */
    content: ""; position: absolute; inset: 0; opacity: .07; pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero-glow { position: absolute; right: -80px; top: 40px; width: 360px; height: 360px; border-radius: 50%; border: 1px solid rgba(212, 172, 98, .18); box-shadow: 0 0 0 40px rgba(212, 172, 98, .04), 0 0 0 90px rgba(212, 172, 98, .025); }
.hero-content { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; }
.hero-lead { font-size: 1.08rem; color: #cbbfb0; max-width: 44ch; margin: 0 0 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px 22px; list-style: none; padding: 0; margin: 40px 0 0; color: #b5a898; font-size: .86rem; }
.hero-facts li { display: flex; align-items: center; gap: 8px; }
.hero-facts .icon { color: var(--gold-2); }
@media (min-width: 860px) { .hero { padding: 110px 40px 96px; border-radius: 0 0 32px 32px; margin: -22px 0 0; } }

/* ---------- Kartice restorana ---------- */
.location-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.location-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), box-shadow .25s; }
.location-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.location-cover { position: relative; display: grid; place-items: center; height: 118px; text-decoration: none; overflow: hidden; }
.cover-0 { background: radial-gradient(circle at 30% 20%, #4a3424, #1d1510); }
.cover-1 { background: radial-gradient(circle at 70% 30%, #2f4a32, #121a13); }
.cover-2 { background: radial-gradient(circle at 40% 70%, #463048, #18111a); }
.cover-3 { background: radial-gradient(circle at 60% 40%, #5a3020, #1f110b); }
.location-initial { font-family: var(--serif); font-size: 3.6rem; font-weight: 600; color: rgba(212, 172, 98, .85); line-height: 1; }
.status-pill { position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, .45); color: #e6ddd1; font-size: .72rem; font-weight: 600; backdrop-filter: blur(6px); }
.status-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: #a08f7f; }
.status-pill.open .dot { background: #5fd38c; box-shadow: 0 0 0 3px rgba(95, 211, 140, .25); }
.location-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.location-body h3 { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; margin: 0 0 4px; }
.location-body h3 a { text-decoration: none; }
.meta { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--ink-2); font-size: .88rem; }
.meta .icon { color: var(--gold); }
.location-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 14px; }
.location-actions .btn:first-child { flex: 1; }

.steps { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.step { padding: 22px; border-radius: var(--radius); background: var(--surface-2); }
.step h3 { font-family: var(--serif); font-size: 1.2rem; margin: 10px 0 4px; }
.step p { margin: 0; color: var(--ink-2); font-size: .9rem; }
.step-n { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--dark); color: var(--gold-2); font-weight: 700; font-size: .9rem; }
.step-n.sm { width: 26px; height: 26px; font-size: .78rem; }

/* ---------- Paneli / info ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.panel + .panel { margin-top: 14px; }
.panel-title { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: 1rem; font-weight: 700; }
.panel-title .icon { color: var(--gold); }
.panel p { margin: 4px 0; }
.info-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.info-grid .panel + .panel { margin-top: 0; }
.hours div, .facts div { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: .92rem; }
.hours div:last-child, .facts div:last-child { border-bottom: 0; }
.hours dt, .facts dt { color: var(--muted); }
.hours dd, .facts dd { margin: 0; font-weight: 600; text-align: right; }
.hours .today dt, .hours .today dd { color: var(--gold); font-weight: 700; }
.hours, .facts { margin: 0; }

/* ---------- Jelovnik ---------- */
.segmented-scroll { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 12px; padding: 2px 16px 6px; scrollbar-width: none; }
.segmented-scroll::-webkit-scrollbar, .cat-tabs::-webkit-scrollbar, .days::-webkit-scrollbar { display: none; }
.seg { flex: none; padding: 10px 18px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 600; font-size: .9rem; cursor: pointer; transition: all .2s var(--ease); }
.seg:hover { border-color: var(--gold); }
.seg.active { background: var(--dark); border-color: var(--dark); color: var(--gold-2); box-shadow: var(--shadow-sm); }
.delivery-note { display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: space-between; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--gold-soft); color: #6a5023; font-size: .86rem; font-weight: 500; animation: pageIn .35s var(--ease); }
.delivery-note > span:first-child { display: flex; align-items: center; gap: 8px; }
.delivery-note .muted { color: #9a7f52; }

.menu-toolbar { position: sticky; top: calc(var(--header-h) + env(safe-area-inset-top)); z-index: 20; margin: 0 -16px; padding: 12px 16px 8px; background: linear-gradient(var(--bg) 85%, rgba(250, 247, 242, 0)); }
.search { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line); color: var(--muted); transition: border-color .2s, box-shadow .2s; }
.search:focus-within { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(184, 137, 59, .12); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 16px; color: var(--ink); }
.search input::-webkit-search-cancel-button { display: none; }
.search-clear { display: grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 50%; background: var(--surface-2); cursor: pointer; }
.cat-tabs { display: flex; gap: 4px; overflow-x: auto; margin-top: 10px; scrollbar-width: none; }
.cat-tabs a { flex: none; padding: 7px 13px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-size: .86rem; font-weight: 500; transition: all .2s; }
.cat-tabs a:hover { background: var(--surface-2); }
.cat-tabs a.active { background: var(--ink); color: #fff; }

.menu { transition: opacity .2s; }
.is-loading { opacity: .45; pointer-events: none; }
.menu-section { padding-top: 18px; scroll-margin-top: 170px; }
.menu-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; font-size: 1.6rem; margin: 0 0 10px; }
.menu-heading small { font-family: var(--sans); font-size: .72rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.menu-list { display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.dish + .dish { border-top: 1px solid var(--line); }
@media (min-width: 860px) {
    .menu-list { grid-template-columns: 1fr 1fr; }
    .dish + .dish { border-top: 0; }
    .dish:nth-child(n+3) { border-top: 1px solid var(--line); }
    .dish:nth-child(odd) { border-right: 1px solid var(--line); }
}
.dish { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--surface); transition: background .2s; }
.dish:hover { background: #fffdf9; }
.dish-img { width: 84px; height: 84px; border-radius: 12px; object-fit: cover; }
.dish-text { flex: 1; min-width: 0; }
.dish-text h3 { margin: 0; font-size: .98rem; font-weight: 600; line-height: 1.3; }
.dish-desc { margin: 3px 0 0; color: var(--muted); font-size: .84rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dish-meta { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.price { font-weight: 700; font-size: .95rem; }
.allergens { font-size: .68rem; font-weight: 600; letter-spacing: .04em; color: var(--muted); padding: 2px 7px; border-radius: 6px; background: var(--surface-2); cursor: help; }
.dish-action { flex: none; }
.add-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; transition: all .2s var(--ease); }
.add-btn:hover { background: var(--dark); border-color: var(--dark); color: var(--gold-2); transform: rotate(90deg); }
.add-btn:active { transform: scale(.9); }

.stepper { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; background: var(--dark); color: #fff; animation: pop .25s var(--ease); }
.stepper button { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; transition: background .15s; }
.stepper button:hover:not(:disabled) { background: rgba(255, 255, 255, .14); }
.stepper button:disabled { opacity: .35; cursor: not-allowed; }
.stepper span { min-width: 22px; text-align: center; font-weight: 700; font-size: .92rem; }
.stepper.small button { width: 30px; height: 30px; }
.stepper.tiny { background: var(--surface-2); color: var(--ink); padding: 2px; animation: none; }
.stepper.tiny button { width: 24px; height: 24px; }
.stepper.tiny button:hover { background: var(--line); }
.stepper.tiny span { min-width: 18px; font-size: .82rem; }
.stepper.big { background: var(--surface-2); color: var(--ink); animation: none; }
.stepper.big button { width: 40px; height: 40px; background: var(--surface); box-shadow: var(--shadow-sm); }
.stepper.big span { min-width: 40px; font-size: 1.15rem; }
@keyframes pop { from { transform: scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }

.empty-state { display: grid; justify-items: center; gap: 8px; padding: 48px 16px; text-align: center; color: var(--muted); }
.legend { margin-top: 28px; padding: 14px 18px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: .85rem; }
.legend summary { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; list-style: none; }
.legend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px 14px; margin-top: 12px; color: var(--ink-2); }
.legend-grid b { display: inline-block; width: 18px; color: var(--gold); }

/* ---------- Košarica (traka i bočni panel) ---------- */
.cart-bar { position: fixed; left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 10px); z-index: 35; display: flex; justify-content: center; pointer-events: none; }
.cart-bar-btn { pointer-events: auto; display: flex; align-items: center; gap: 12px; width: 100%; max-width: 480px; height: 56px; padding: 0 8px 0 8px; border: 0; border-radius: 999px; background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #1b140c; font-weight: 600; cursor: pointer; box-shadow: 0 10px 30px rgba(120, 85, 30, .35); animation: rise .35s var(--ease); }
.cart-bar-btn strong { margin-left: auto; padding-right: 14px; }
.cart-bar-count { display: grid; place-items: center; min-width: 40px; height: 40px; border-radius: 50%; background: var(--dark); color: var(--gold-2); font-weight: 700; }
@keyframes rise { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 860px) { .cart-bar { bottom: 24px; } }

.drawer-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(15, 11, 8, .5); backdrop-filter: blur(2px); }
.drawer {
    position: fixed; z-index: 61; left: 0; right: 0; bottom: 0;
    display: flex; flex-direction: column; max-height: 88vh;
    background: var(--bg); border-radius: 24px 24px 0 0; box-shadow: var(--shadow-lg);
    padding-bottom: env(safe-area-inset-bottom);
}
.drawer::before { content: ""; align-self: center; width: 40px; height: 4px; margin-top: 10px; border-radius: 2px; background: var(--line); }
.drawer-enter, .drawer-leave { transition: transform .38s var(--ease), opacity .25s; }
.drawer-from { transform: translateY(100%); opacity: .6; }
.drawer-to { transform: none; opacity: 1; }
@media (min-width: 860px) {
    .drawer { left: auto; top: 0; width: 420px; max-height: none; border-radius: 24px 0 0 24px; }
    .drawer::before { display: none; }
    .drawer-from { transform: translateX(100%); }
}
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 18px 20px 12px; }
.drawer-head h2 { font-size: 1.6rem; margin: 0; line-height: 1; }
.drawer-head p { margin: 4px 0 0; font-size: .85rem; }
.drawer-body { flex: 1; overflow-y: auto; padding: 0 20px; overscroll-behavior: contain; }
.drawer-empty { display: grid; justify-items: center; gap: 4px; padding: 40px 24px 48px; text-align: center; }
.drawer-empty p { margin: 0; }
.drawer-empty .btn { margin-top: 16px; }
.empty-icon { display: grid; place-items: center; width: 70px; height: 70px; margin-bottom: 12px; border-radius: 50%; background: var(--gold-soft); color: var(--gold); }
.cart-line { display: grid; grid-template-columns: 1fr auto 72px; grid-template-areas: "text step total"; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-line-text { grid-area: text; display: flex; flex-direction: column; font-size: .92rem; }
.cart-line-text .muted { font-size: .82rem; }
.cart-line .stepper { grid-area: step; }
.cart-line-total { grid-area: total; font-weight: 700; text-align: right; }
.drawer-foot { padding: 16px 20px 20px; border-top: 1px solid var(--line); background: var(--surface); }
.min-order { margin-bottom: 14px; font-size: .84rem; color: var(--ink-2); }
.min-order p { margin: 0 0 8px; }
.progress { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--gold-2), var(--gold)); transition: width .4s var(--ease); }
.total-row { display: flex; justify-content: space-between; margin-bottom: 14px; font-size: 1.05rem; }

/* ---------- Obrasci (narudžba, rezervacija, prijava) ---------- */
.checkout { display: grid; gap: 16px; align-items: start; grid-template-columns: minmax(0, 1fr); }
.checkout-main, .checkout-side { min-width: 0; }
@media (min-width: 960px) {
    .checkout { grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; }
    .checkout-side { position: sticky; top: calc(var(--header-h) + 20px); }
}
.checkout-main .panel + .panel { margin-top: 14px; }
.step-title { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 1.02rem; font-weight: 700; }
.choice-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.choice { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 14px 40px 14px 16px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); text-align: left; cursor: pointer; transition: border-color .2s, background .2s, box-shadow .2s; }
.choice:hover { border-color: #d8c6a6; }
.choice.selected { border-color: var(--gold); background: #fffaf1; box-shadow: 0 0 0 3px rgba(184, 137, 59, .12); }
.choice-title { font-weight: 600; }
.choice-sub { font-size: .8rem; color: var(--muted); line-height: 1.35; }
.choice-check { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line); color: transparent; transition: all .2s; }
.choice.selected .choice-check { background: var(--gold); border-color: var(--gold); color: #fff; }
.toggle-group { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.toggle { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; transition: all .2s; }
.toggle span { display: flex; flex-direction: column; font-weight: 600; line-height: 1.25; }
.toggle small { font-weight: 400; font-size: .78rem; color: var(--muted); }
.toggle .icon { color: var(--muted); }
.toggle.selected { border-color: var(--gold); background: #fffaf1; box-shadow: 0 0 0 3px rgba(184, 137, 59, .12); }
.toggle.selected .icon { color: var(--gold); }
.toggle.disabled { opacity: .45; cursor: not-allowed; }

.fields { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .fields:not(.single) { grid-template-columns: 1fr 1fr; } .span-2 { grid-column: 1 / -1; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: .84rem; font-weight: 600; color: var(--ink-2); }
.field-label small { font-weight: 400; color: var(--muted); margin-left: 4px; }
.field input, .field textarea {
    width: 100%; padding: 13px 15px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
    background: var(--surface); font: inherit; font-size: 16px; color: var(--ink); resize: vertical;
    transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus { outline: 0; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(184, 137, 59, .12); }
.field.has-error input, .field.has-error textarea { border-color: var(--red); }
.field-error { color: var(--red); font-size: .8rem; font-weight: 500; animation: pageIn .25s; }
.check-row { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.check-row input { accent-color: var(--gold); width: 18px; height: 18px; }

.summary .panel-title { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; }
.summary-lines { list-style: none; padding: 0; margin: 0 0 12px; }
.summary-lines li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: .9rem; }
.summary-lines.plain li span:first-child { color: var(--muted); min-width: 24px; }
.summary-name { flex: 1; min-width: 0; }
.summary-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: .92rem; color: var(--ink-2); }
.summary-row.total { margin: 6px 0 16px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 1.15rem; color: var(--ink); }
.summary.narrow { max-width: 560px; margin: 24px auto 0; }
.summary .facts { margin-bottom: 18px; }
.alert { margin: 0 0 14px; padding: 12px 14px; border-radius: var(--radius-sm); background: #fbeae6; color: var(--red); font-size: .88rem; font-weight: 500; }

/* Rezervacija */
.days { display: flex; gap: 8px; overflow-x: auto; margin: 0 -20px 18px; padding: 2px 20px 4px; scrollbar-width: none; scroll-snap-type: x proximity; }
.day { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 66px; padding: 10px 0; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; scroll-snap-align: center; transition: all .2s var(--ease); }
.day:hover:not(:disabled) { border-color: var(--gold); }
.day-name { font-size: .74rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.day-date { font-weight: 700; }
.day.selected { background: var(--dark); border-color: var(--dark); color: #fff; box-shadow: var(--shadow); }
.day.selected .day-name { color: var(--gold-2); }
.day.closed { opacity: .4; cursor: not-allowed; text-decoration: line-through; }
.guests { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); }
.guests-label { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.guests-label .icon { color: var(--gold); }
.slot-group + .slot-group { margin-top: 16px; }
.slot-group-title { margin: 0 0 8px; font-size: .74rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.slot { padding: 11px 0; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); font-weight: 600; cursor: pointer; transition: all .18s var(--ease); }
.slot:hover { border-color: var(--gold); }
.slot.selected { background: var(--gold); border-color: var(--gold); color: #fff; transform: scale(1.04); box-shadow: 0 6px 16px rgba(184, 137, 59, .35); }

/* Potvrde */
.success { display: grid; justify-items: center; text-align: center; padding: 24px 0 8px; }
.success .lead { margin-left: auto; margin-right: auto; }
.success-mark { display: grid; place-items: center; width: 84px; height: 84px; margin-bottom: 18px; border-radius: 50%; background: var(--green); color: #fff; box-shadow: 0 0 0 10px rgba(47, 122, 79, .12); animation: popIn .6s var(--ease); }
.success-mark.pending { background: var(--gold); box-shadow: 0 0 0 10px rgba(184, 137, 59, .14); }
.success-mark.cancelled { background: var(--red); box-shadow: 0 0 0 10px rgba(178, 64, 47, .12); }
@keyframes popIn { 0% { transform: scale(.3); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } 100% { transform: none; } }
.timeline { display: flex; justify-content: center; gap: 0; list-style: none; padding: 0; margin: 28px auto 8px; max-width: 620px; }
.timeline li { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: .76rem; color: var(--muted); text-align: center; }
.timeline li::before { content: ""; position: absolute; top: 11px; left: -50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.timeline li:first-child::before { display: none; }
.timeline li.done::before, .timeline li.current::before { background: var(--gold); }
.tl-dot { position: relative; z-index: 1; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); color: #fff; }
.timeline .done .tl-dot { background: var(--gold); border-color: var(--gold); }
.timeline .current .tl-dot { border-color: var(--gold); box-shadow: 0 0 0 5px rgba(184, 137, 59, .18); animation: pulse 1.8s infinite; }
.timeline .current { color: var(--ink); font-weight: 700; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(184, 137, 59, .06); } }
.center-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 28px; }
.ticket { max-width: 460px; margin: 24px auto 0; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.ticket-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 14px; border-bottom: 1px dashed var(--line); }
.ticket-head .eyebrow { margin: 0; }
.ticket-code { font-family: ui-monospace, monospace; font-weight: 700; letter-spacing: .08em; }
.ticket-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 18px 0 14px; text-align: center; }
.ticket-grid small { display: block; color: var(--muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; }
.ticket-grid strong { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; }
.ticket .muted { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0; font-size: .85rem; }

/* Prijava i račun */
.auth { display: grid; place-items: center; min-height: 60vh; }
.auth-card { width: 100%; max-width: 420px; padding: 32px 24px; }
.auth-card .fields { margin-top: 22px; }
.account-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.account-head .h1 { font-size: 2.1rem; }
.account-head p { margin: 2px 0 0; }
.avatar { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: var(--dark); color: var(--gold-2); font-family: var(--serif); font-size: 1.8rem; font-weight: 600; }
.push-right { margin-left: auto; }
.list-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.list-row:last-child { border-bottom: 0; }
.list-row > span:first-child { display: flex; flex-direction: column; }
.list-row small { font-size: .8rem; }
.list-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.pill { padding: 3px 10px; border-radius: 999px; background: var(--gold-soft); color: #8a6526; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.pill-completed, .pill-confirmed { background: #e3f1e8; color: var(--green); }
.pill-cancelled { background: #fbeae6; color: var(--red); }

/* ---------- Obavijesti ---------- */
.toasts { position: fixed; left: 0; right: 0; top: calc(var(--header-h) + env(safe-area-inset-top) + 10px); z-index: 80; display: grid; justify-items: center; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px); padding: 11px 18px; border-radius: 999px; background: var(--dark); color: #f3ece2; font-size: .88rem; font-weight: 500; box-shadow: var(--shadow-lg); }
.toast-dot { width: 8px; height: 8px; border-radius: 50%; background: #5fd38c; }
.toast.error .toast-dot { background: #f07a64; }
.toast-enter { animation: toastIn .3s var(--ease); }
.toast-leave { transition: opacity .25s, transform .25s; opacity: 0; transform: translateY(-8px); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px) scale(.96); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Traka košarice se ne prikazuje na stranicama narudžbe i rezervacije */
main[data-page="checkout"] ~ [x-persist] .cart-bar,
main[data-page^="order."] ~ [x-persist] .cart-bar,
main[data-page^="reservation."] ~ [x-persist] .cart-bar,
main[data-page="account"] ~ [x-persist] .cart-bar { display: none !important; }
@media (max-width: 859px) { main[data-page="menu"], main[data-page="home"] { padding-bottom: 96px; } }
