/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; }
html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100%;
}
body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    overflow-y: auto;
    width: 100%;
    min-height: 100dvh;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
}
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--font); }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3 { margin: 0; }

/* ── CSS Variables ── */
:root {
    --accent:           #FF6B35;
    --accent-dark:      #e05520;
    --accent-light:     rgba(255,107,53,.12);
    --accent-secondary: #2C2C2C;
    --font:             'Inter', -apple-system, sans-serif;
    --bg:               #F5F5F7;
    --surface:          #FFFFFF;
    --border:           #E8E8EC;
    --text:             #111827;
    --text-muted:       #6B7280;
    --radius:           16px;
    --radius-sm:        10px;
    --shadow:           0 2px 12px rgba(0,0,0,.07);
    --shadow-md:        0 4px 20px rgba(0,0,0,.10);
    --shadow-lg:        0 8px 32px rgba(0,0,0,.14);
    --transition:       .2s ease;
    --safe-bottom:      env(safe-area-inset-bottom, 0px);
    --bar-h:            62px;
}

/* ═══════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════ */
.menu-header {
    background: linear-gradient(160deg, var(--accent), var(--accent-dark));
    color: #fff;
    position: relative;
    overflow: hidden;
}
.menu-header.menu-header--image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
    border-bottom: none;
}
.menu-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23fff' fill-opacity='.05'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/svg%3E");
}
.menu-header--image::before {
    background: linear-gradient(rgba(0,0,0,.08), rgba(0,0,0,.18));
}
.menu-header__inner {
    text-align: center;
    padding: 40px 20px 24px;
    position: relative;
    z-index: 1;
}
.menu-header__logo {
    width: 80px; height: 80px;
    border-radius: 50%;
    margin: 0 auto 14px;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,.5);
    box-shadow: 0 4px 20px rgba(0,0,0,.25);
}
.menu-header__title {
    font-size: clamp(1.5rem, 5vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -.02em;
    margin-bottom: 6px;
    text-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.menu-header.menu-header--image .menu-header__title {
    color: #fff;
    text-shadow: 0 2px 14px rgba(0,0,0,.45);
}
.menu-header__sub {
    font-size: .8rem;
    opacity: .75;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.menu-header.menu-header--image .menu-header__sub {
    color: #fff;
    opacity: .88;
    text-shadow: 0 1px 8px rgba(0,0,0,.45);
}
.menu-header__wave { display: block; line-height: 0; margin-top: -2px; }
.menu-header__wave svg { width: 100%; height: 40px; display: block; }
.menu-header__wave svg path { fill: var(--bg); }

/* ═══════════════════════════════════════════════
   SEARCH BAR
═══════════════════════════════════════════════ */
.search-bar-wrap {
    background: var(--bg);
    padding: 14px 16px 12px;
    position: sticky;
    top: 0;
    z-index: 90;
}
body.has-menu-header-image .search-bar-wrap,
body.has-menu-header-image .cat-home,
body.has-menu-header-image .cat-items-panel,
body.has-menu-header-image .search-view {
    background: #fff;
}
.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 99px;
    padding: 0 16px;
    max-width: 520px;
    margin: 0 auto;
    transition: border-color var(--transition), box-shadow var(--transition);
    box-shadow: var(--shadow);
    height: 46px;
}
.search-bar:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}
.search-bar__icon { color: var(--text-muted); font-size: .9rem; flex-shrink: 0; }
.search-bar__input {
    flex: 1; border: none; background: transparent;
    font-size: .93rem; color: var(--text); outline: none;
    font-family: var(--font); min-width: 0;
}
.search-bar__input::placeholder { color: var(--text-muted); }
.search-bar__clear {
    background: none; border: none;
    color: var(--text-muted); padding: 6px; border-radius: 50%;
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: background var(--transition);
}
.search-bar__clear:hover { background: var(--border); }

/* ═══════════════════════════════════════════════
   LAYOUT TOGGLE WIDGET
═══════════════════════════════════════════════ */
.layout-toggle {
    display: inline-flex;
    align-items: center;
    background: var(--border);
    border-radius: 10px;
    padding: 3px;
    gap: 2px;
    flex-shrink: 0;
}
.layout-toggle__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: 7px;
    color: var(--text-muted);
    font-size: .8rem;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
    flex-shrink: 0;
}
.layout-toggle__btn.active {
    background: var(--surface);
    color: var(--accent);
    box-shadow: 0 1px 4px rgba(0,0,0,.14), 0 0 0 1px rgba(0,0,0,.04);
}
.layout-toggle__btn:not(.active):hover { background: rgba(255,255,255,.5); color: var(--text); }

/* ═══════════════════════════════════════════════
   CATEGORY HOME
═══════════════════════════════════════════════ */
.cat-home {
    padding: 18px 16px calc(var(--bar-h) + var(--safe-bottom) + 16px);
    max-width: 640px;
    width: 100%;
    margin: 0 auto;
    overflow: visible;
}
.cat-home__header {
    display: flex;
    align-items: center;
    margin-bottom: 14px;
    padding: 0 2px;
    gap: 8px;
}
.cat-home__label {
    flex: 1;
    min-width: 0;
}
.cat-home__label {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

/* ── Category Grid (base) ── */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
}

/* ── Category Card (base) ── */
.cat-card {
    background: var(--surface);
    border: none;
    border-radius: 18px;
    padding: 22px 16px 18px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
    text-align: left;
    position: relative;
    overflow: hidden;
    opacity: 0;
    animation: catCardIn .45s cubic-bezier(.22,.61,.36,1) forwards;
    min-height: unset;
    aspect-ratio: 1.16 / 1;
    width: 100%;
    min-width: 0;
    cursor: pointer;
}
.cat-card::after {
    content: '';
    position: absolute;
    top: -30px; right: -30px;
    width: 90px; height: 90px;
    border-radius: 50%;
    background: var(--accent-light);
    transition: transform .3s ease;
    pointer-events: none;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.cat-card:hover::after { transform: scale(1.5); }
.cat-card:active { transform: translateY(-1px) scale(.98); }
.cat-card__placeholder {
    width: 56px; height: 56px;
    border-radius: 14px;
    background: var(--accent-light);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem; font-weight: 800;
    color: var(--accent);
    margin-bottom: 8px;
    position: relative; z-index: 1;
    flex-shrink: 0;
}
.cat-card__name { font-size: .95rem; font-weight: 700; color: var(--text); line-height: 1.25; position: relative; z-index: 1; }
.cat-card__count { font-size: .75rem; color: var(--text-muted); position: relative; z-index: 1; }
.cat-card__arrow { position: absolute; bottom: 16px; right: 16px; color: var(--accent); font-size: .75rem; opacity: .6; }

@keyframes catCardIn {
    from { opacity: 0; transform: translateY(22px) scale(.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Category Card — has image ── */
.cat-card--has-img { padding: 0; }

/* Grid modunda resimli kategori kartı tam kare */
.cat-grid:not(.cat-grid--list) .cat-card--has-img {
    min-height: unset;
    aspect-ratio: 1.16 / 1;
}
.cat-card__bg-img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.cat-card--has-img:hover .cat-card__bg-img { transform: scale(1.06); }
.cat-card__img-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.72) 0%, rgba(0,0,0,.15) 60%, transparent 100%);
    z-index: 1;
}
.cat-card__img-text {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 12px 14px 14px; z-index: 2;
    display: flex; flex-direction: column; gap: 3px;
}
.cat-card--has-img .cat-card__name  { color: #fff; font-size: .9rem; z-index: 2; }
.cat-card--has-img .cat-card__count { color: rgba(255,255,255,.75); z-index: 2; }
.cat-card--has-img .cat-card__arrow { color: rgba(255,255,255,.8); z-index: 2; }

/* ── Category Grid — LIST mode (AFTER base, higher specificity wins) ── */
.cat-grid--list { grid-template-columns: 1fr; gap: 8px; }

.cat-grid--list .cat-card {
    flex-direction: row;
    align-items: center;
    min-height: 96px;
    height: 96px;
    aspect-ratio: auto;
    padding: 0 16px 0 0;
    gap: 0;
}
.cat-grid--list .cat-card::after { display: none; }
.cat-grid--list .cat-card:hover { transform: translateX(2px); }

.cat-grid--list .cat-card__placeholder {
    width: 96px; min-width: 96px; height: 96px;
    font-size: 2rem;
    border-radius: 14px 0 0 14px;
    margin-bottom: 0;
}
.cat-grid--list .cat-card__name  { margin-left: 16px; font-size: .95rem; }
.cat-grid--list .cat-card__count { margin-left: 16px; font-size: .78rem; }
.cat-grid--list .cat-card__arrow { position: static; margin-left: auto; opacity: .45; }

/* has-image card in list mode */
.cat-grid--list .cat-card--has-img { padding: 0 16px 0 0; }

.cat-grid--list .cat-card--has-img .cat-card__bg-img {
    position: static;
    width: 96px; min-width: 96px; height: 96px;
    object-fit: cover; flex-shrink: 0;
    border-radius: 14px 0 0 14px;
    transition: none;
}
.cat-grid--list .cat-card--has-img:hover .cat-card__bg-img { transform: none; }
.cat-grid--list .cat-card--has-img .cat-card__img-overlay { display: none; }
.cat-grid--list .cat-card--has-img .cat-card__img-text {
    position: static; padding: 0 0 0 16px;
    flex: 1; flex-direction: column; justify-content: center;
}
.cat-grid--list .cat-card--has-img .cat-card__name  { color: var(--text); }
.cat-grid--list .cat-card--has-img .cat-card__count { color: var(--text-muted); }
.cat-grid--list .cat-card--has-img .cat-card__arrow { position: static; color: var(--accent); margin-left: auto; }

/* ═══════════════════════════════════════════════
   ITEMS VIEW
═══════════════════════════════════════════════ */
.items-view { min-height: 60dvh; }

.items-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--bg);
    position: sticky;
    top: 72px;
    z-index: 80;
    border-bottom: 1px solid var(--border);
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
}
.back-btn {
    width: 38px; height: 38px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: var(--surface);
    display: flex; align-items: center; justify-content: center;
    color: var(--text); font-size: .85rem; flex-shrink: 0;
    transition: all var(--transition);
    box-shadow: var(--shadow);
}
.back-btn:hover { border-color: var(--accent); color: var(--accent); transform: scale(1.05); }
.back-btn:active { transform: scale(.95); }
.items-header__icon { font-size: 1.3rem; flex-shrink: 0; }
.items-header__title {
    font-size: .92rem; font-weight: 700; color: var(--text);
    flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    min-width: 0;
}

/* ── Category Tabs Strip ── */
.cat-tabs-strip {
    display: flex;
    gap: 8px;
    padding: 10px 16px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 130px;
    z-index: 75;
    width: 100%;
    max-width: 100vw;
}
.cat-tabs-strip::-webkit-scrollbar { display: none; }

.cat-tab {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border: 1.5px solid var(--border);
    border-radius: 99px;
    background: var(--surface);
    color: var(--text-muted);
    font-size: .8rem;
    font-weight: 600;
    font-family: var(--font);
    white-space: nowrap;
    cursor: pointer;
    flex-shrink: 0;
    transition: all .15s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.cat-tab__icon { font-size: .9rem; line-height: 1; }
.cat-tab__name { line-height: 1; }
.cat-tab:hover:not(.active) { border-color: var(--accent); color: var(--accent); }
.cat-tab.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 2px 10px rgba(255,107,53,.35);
}

/* ── Item Panel + Grid ── */
.cat-items-panel {
    padding: 16px 16px calc(var(--bar-h) + var(--safe-bottom) + 16px);
    max-width: 640px;
    width: 100%;
    margin: 0 auto;
}
.search-view {
    padding: 12px 16px calc(var(--bar-h) + var(--safe-bottom) + 16px);
    max-width: 640px;
    width: 100%;
    margin: 0 auto;
}
.search-view__header { font-size: .8rem; color: var(--text-muted); margin-bottom: 12px; }

.item-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

/* ── Item Card (base) ── */
.item-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    cursor: pointer;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    opacity: 0;
    animation: itemIn .4s cubic-bezier(.22,.61,.36,1) forwards;
    will-change: transform, opacity;
    transition: transform var(--transition), box-shadow var(--transition);
    border: 1.5px solid transparent;
}
.item-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border); }
.item-card:active { transform: scale(.97); }
.item-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@keyframes itemIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

.item-card__img-wrap {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--border);
    position: relative;
    flex-shrink: 0;
}
.item-card__img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.item-card:hover .item-card__img { transform: scale(1.07); }
.item-card__no-img {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.4rem;
    background: var(--accent-light);
}

.blurred { filter: blur(8px) scale(1.05); transition: filter .4s ease; }
.blurred.loaded, .lazy-img.loaded { filter: none; transform: none; }

.item-card__body { padding: 12px; flex: 1; display: flex; flex-direction: column; }
.item-card__name {
    font-size: .88rem; font-weight: 700; color: var(--text);
    margin-bottom: 4px; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.item-card__desc {
    font-size: .74rem; color: var(--text-muted); flex: 1;
    margin-bottom: 8px; line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.item-card__footer { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; }
.item-card__price { font-size: .98rem; font-weight: 800; color: var(--accent); }
.item-card__add {
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--accent); color: #fff; border: none;
    display: flex; align-items: center; justify-content: center;
    font-size: .82rem; flex-shrink: 0;
    transition: all var(--transition);
    box-shadow: 0 2px 8px rgba(255,107,53,.35);
}
.item-card__add:hover { transform: scale(1.15); box-shadow: 0 4px 12px rgba(255,107,53,.45); }
.item-card__add:active { transform: scale(.9); }
.item-card__tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.tag { font-size: .67rem; padding: 2px 7px; border-radius: 99px; background: var(--accent-light); color: var(--accent); font-weight: 600; }

/* ── Item Grid — LIST mode (AFTER base styles) ── */
.item-grid--list { grid-template-columns: 1fr; gap: 8px; }

.item-grid--list .item-card {
    flex-direction: row;
    height: 176px;
}
.item-grid--list .item-card:hover { transform: translateX(2px); }
.item-grid--list .item-card__img-wrap {
    width: 176px; min-width: 176px; height: 176px;
    aspect-ratio: unset;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    flex-shrink: 0;
}
.item-grid--list .item-card__no-img {
    width: 176px; min-width: 176px; height: 176px;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    font-size: 3rem; flex-shrink: 0;
    aspect-ratio: unset;
}
.item-grid--list .item-card__body {
    padding: 14px 16px; display: flex; flex-direction: column;
    justify-content: center; min-width: 0;
}
.item-grid--list .item-card__name {
    -webkit-line-clamp: 2; margin-bottom: 4px; font-size: .93rem;
}
.item-grid--list .item-card__desc {
    -webkit-line-clamp: 2; margin-bottom: 8px; flex: 1;
}
.item-grid--list .item-card__footer { margin-top: auto; }
.item-grid--list .item-card__tags  { display: flex; margin-top: 6px; }

/* ═══════════════════════════════════════════════
   MODAL
═══════════════════════════════════════════════ */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.55); z-index: 500;
    opacity: 0; pointer-events: none;
    transition: opacity .3s ease;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal-sheet {
    position: fixed; bottom: 0; left: 0; right: 0;
    max-height: 92dvh;
    background: var(--surface);
    border-radius: 26px 26px 0 0;
    z-index: 501;
    transform: translateY(100%);
    transition: transform .38s cubic-bezier(.32,.72,0,1);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--safe-bottom);
}
.modal-sheet.open { transform: translateY(0); }

.modal-sheet__handle {
    width: 40px; height: 4px; background: var(--border); border-radius: 2px;
    margin: 14px auto 0; flex-shrink: 0;
}
.modal-sheet__close {
    position: absolute; top: 16px; right: 16px;
    background: var(--bg); border: none; border-radius: 50%;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    font-size: .9rem; color: var(--text-muted); z-index: 10;
    transition: all var(--transition);
}
.modal-sheet__close:hover { background: var(--border); color: var(--text); }

.modal-img-wrap { width: 100%; max-height: 280px; overflow: hidden; border-radius: 26px 26px 0 0; }
.modal-img { width: 100%; height: 100%; object-fit: cover; }
.modal-body { padding: 22px 20px 36px; }
.modal-title { font-size: 1.25rem; font-weight: 800; margin-bottom: 8px; line-height: 1.3; color: var(--text); }
.modal-desc { color: var(--text-muted); margin-bottom: 14px; line-height: 1.65; font-size: .9rem; }
.modal-meta { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.modal-price { font-size: 1.6rem; font-weight: 800; color: var(--accent); }
.modal-cal { font-size: .78rem; color: var(--text-muted); background: var(--bg); padding: 3px 10px; border-radius: 99px; }

.allergens { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.allergen {
    font-size: .75rem; padding: 3px 10px; border-radius: 99px;
    background: #FFF3CD; color: #856404; font-weight: 500;
    display: flex; align-items: center; gap: 4px;
}

/* ── Qty + Add Row ── */
.modal-cart-row { display: flex; align-items: center; gap: 12px; margin-top: 20px; }
.qty-control {
    display: flex; align-items: center; gap: 10px;
    background: var(--bg); border: 1.5px solid var(--border);
    border-radius: 99px; padding: 8px 14px; flex-shrink: 0;
}
.qty-control--sm { padding: 5px 10px; gap: 8px; }
.qty-btn {
    background: none; border: none; font-size: 1.1rem; font-weight: 700;
    color: var(--accent); width: 26px; height: 26px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; transition: background var(--transition);
}
.qty-btn:hover { background: var(--accent-light); }
.qty-num { font-weight: 700; min-width: 24px; text-align: center; font-size: 1rem; color: var(--text); }
.btn-add-cart {
    flex: 1; padding: 13px 18px; background: var(--accent);
    color: #fff; border: none; border-radius: 99px;
    font-size: .95rem; font-weight: 700; font-family: var(--font);
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: all var(--transition);
    box-shadow: 0 4px 16px rgba(255,107,53,.35);
}
.btn-add-cart:hover { filter: brightness(1.08); }
.btn-add-cart:active { transform: scale(.97); }
.btn-add-cart--added { background: #10B981; box-shadow: 0 4px 16px rgba(16,185,129,.35); }

@keyframes qtyBump {
    0%  { transform: scale(1); }
    40% { transform: scale(1.6); }
    100%{ transform: scale(1); }
}
.qty-bump { animation: qtyBump .25s ease; }

/* ═══════════════════════════════════════════════
   CART BAR (persistent bottom bar)
═══════════════════════════════════════════════ */
.cart-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    height: var(--bar-h);
    padding: 0 20px;
    padding-bottom: var(--safe-bottom);
    z-index: 200;
    background: var(--accent);
    color: #fff;
    border: none;
    font-family: var(--font);
    cursor: pointer;
    box-shadow: 0 -4px 24px rgba(0,0,0,.16), 0 -1px 0 rgba(255,255,255,.1) inset;
    transition: filter .15s ease, background .25s ease, color .25s ease;
    will-change: filter;
}
.cart-bar:hover:not(.cart-bar--empty) { filter: brightness(1.07); }
.cart-bar:active:not(.cart-bar--empty) { filter: brightness(.95); }

.cart-bar--empty {
    background: var(--surface);
    color: var(--text-muted);
    box-shadow: 0 -1px 0 var(--border);
    cursor: default;
}

.cart-bar__icon-wrap {
    position: relative;
    width: 38px; height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,.18);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}
.cart-bar--empty .cart-bar__icon-wrap {
    background: var(--border);
    color: var(--text-muted);
}

.cart-bar__badge {
    position: absolute;
    top: -4px; right: -4px;
    background: #EF4444; color: #fff;
    font-size: .6rem; font-weight: 800;
    min-width: 18px; height: 18px;
    border-radius: 99px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 4px;
    border: 2px solid white;
    box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.cart-bar__info { flex: 1; text-align: left; min-width: 0; }
.cart-bar__text {
    display: block;
    font-size: .88rem; font-weight: 700;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    line-height: 1.2;
}
.cart-bar__sub {
    display: block;
    font-size: .7rem; opacity: .75; margin-top: 1px;
    white-space: nowrap;
}
.cart-bar__total {
    font-size: .98rem; font-weight: 800;
    letter-spacing: -.02em; flex-shrink: 0;
}
.cart-bar__chevron {
    font-size: .7rem; opacity: .65;
    flex-shrink: 0;
    transition: transform .2s ease;
}
.cart-bar--empty .cart-bar__chevron { opacity: .25; }

@keyframes barBump {
    0%   { transform: scaleY(1); }
    30%  { transform: scaleY(1.05) translateY(-3px); }
    65%  { transform: scaleY(.97); }
    100% { transform: scaleY(1); }
}
.cart-bar--bump { animation: barBump .32s ease; }

/* ═══════════════════════════════════════════════
   CART SHEET
═══════════════════════════════════════════════ */
.cart-sheet__content { padding: 0 20px calc(24px + var(--safe-bottom)); }
.cart-sheet__title {
    font-size: 1.1rem; font-weight: 700; margin: 20px 0 16px;
    display: flex; align-items: center; gap: 10px; color: var(--text);
}
.cart-list { list-style: none; margin: 0; padding: 0; }
.cart-empty {
    text-align: center; padding: 36px 0; color: var(--text-muted);
    font-size: .9rem; display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.cart-empty i { font-size: 2.4rem; opacity: .3; }
.cart-item {
    display: flex; align-items: center; padding: 12px 0;
    border-bottom: 1px solid var(--border); gap: 12px;
}
.cart-item:last-child { border-bottom: none; }
.cart-item__info { flex: 1; min-width: 0; }
.cart-item__name { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item__price { font-size: .82rem; color: var(--accent); font-weight: 700; }
.cart-sheet__footer { padding-top: 16px; border-top: 2px solid var(--border); }
.cart-total { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 8px; }
.cart-total__amount { color: var(--accent); font-size: 1.2rem; }
.cart-note { font-size: .78rem; color: var(--text-muted); margin-bottom: 14px; display: flex; gap: 6px; align-items: flex-start; }
.checkout-row {
    display: flex; flex-direction: column; gap: 8px;
    margin-bottom: 12px;
}
.checkout-label {
    display: flex; align-items: center; gap: 6px;
    font-size: .78rem; font-weight: 700;
    color: var(--text-muted); letter-spacing: .04em;
    text-transform: uppercase;
}
.checkout-input {
    width: 100%; padding: 11px 14px;
    border: 1.5px solid var(--border); border-radius: 10px;
    font-size: .9rem; font-family: var(--font); color: var(--text);
    background: var(--bg); outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.checkout-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.checkout-input::placeholder { color: var(--text-muted); }
.checkout-input.error { border-color: #EF4444; box-shadow: 0 0 0 3px rgba(239,68,68,.15); }
.btn-checkout {
    width: 100%; padding: 14px;
    background: var(--accent); color: #fff;
    border: none; border-radius: 12px;
    font-size: .95rem; font-weight: 700; font-family: var(--font);
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: filter .15s ease, transform .1s ease;
    margin-bottom: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,.15);
    cursor: pointer;
}
.btn-checkout:hover:not(:disabled) { filter: brightness(1.07); }
.btn-checkout:active:not(:disabled) { transform: scale(.97); }
.btn-checkout:disabled { opacity: .5; cursor: not-allowed; }

.btn-cart-clear {
    width: 100%; padding: 12px;
    background: #FEE2E2; color: #991B1B;
    border: none; border-radius: 10px;
    font-size: .85rem; font-weight: 600; font-family: var(--font);
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: background var(--transition);
}
.btn-cart-clear:hover { background: #FECACA; }

/* ── Toast ── */
.toast {
    position: fixed;
    bottom: calc(var(--bar-h) + var(--safe-bottom) + 14px);
    left: 50%; transform: translateX(-50%) translateY(14px);
    background: #111827; color: #fff;
    padding: 11px 22px; border-radius: 99px;
    font-size: .85rem; font-weight: 600; font-family: var(--font);
    z-index: 600; opacity: 0; pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(0,0,0,.28);
    transition: opacity .28s ease, transform .28s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast--success { background: #10B981; }
.toast--error   { background: #EF4444; }

/* Entry popup */
.entry-popup-overlay {
    position: fixed; inset: 0; z-index: 680;
    background: rgba(0,0,0,.66);
    backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    padding: 22px;
}
.entry-popup-overlay[hidden] { display: none !important; }
.entry-popup {
    position: relative;
    width: min(420px, 100%);
    background: var(--surface);
    color: var(--text);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 22px 70px rgba(0,0,0,.34);
    animation: entryPopupIn .22s ease both;
}
.entry-popup__close {
    position: absolute; top: 10px; right: 10px; z-index: 2;
    width: 34px; height: 34px; border-radius: 50%;
    border: none; background: rgba(0,0,0,.48); color: #fff;
    display: flex; align-items: center; justify-content: center;
}
.entry-popup__img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: var(--border);
}
.entry-popup__body { padding: 16px 18px 18px; }
.entry-popup__body h2 {
    font-size: 1.08rem; line-height: 1.25;
    margin-bottom: 6px; color: var(--text);
}
.entry-popup__body p {
    font-size: .88rem; line-height: 1.5;
    color: var(--text-muted); margin-bottom: 10px;
}
.entry-popup__body strong {
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 99px;
    background: var(--accent-light);
    color: var(--accent);
    font-size: .92rem;
}
@keyframes entryPopupIn {
    from { opacity: 0; transform: translateY(18px) scale(.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ═══════════════════════════════════════════════
   EMPTY STATES & SEARCH EMPTY
═══════════════════════════════════════════════ */
.empty-state {
    text-align: center; padding: 70px 20px; color: var(--text-muted);
    display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.empty-state i { font-size: 3rem; opacity: .35; }
.empty-state p { font-size: .95rem; }
.search-empty {
    text-align: center; padding: 60px 20px; color: var(--text-muted);
    display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.search-empty i { font-size: 2.5rem; opacity: .3; }
.search-empty p { font-size: .9rem; }

/* ═══════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════ */
.menu-footer {
    text-align: center;
    padding: 20px 20px calc(var(--bar-h) + var(--safe-bottom) + 12px);
    font-size: .78rem; color: var(--text-muted);
    border-top: 1px solid var(--border);
}
.no-cart .menu-footer {
    padding-bottom: calc(var(--safe-bottom) + 20px);
}
.mf-social { margin-bottom: 14px; }
.mf-social__label {
    font-size: .68rem; font-weight: 600; letter-spacing: .1em;
    text-transform: uppercase; opacity: .6; display: block; margin-bottom: 10px;
}
.mf-social__icons { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.mf-si {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--border); color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    font-size: .9rem; text-decoration: none;
    transition: background .15s, color .15s;
}
.mf-si:hover { background: var(--accent); color: #fff; }
.mf-brand { font-size: .72rem; opacity: .55; margin-top: 6px; }
.mf-omeyon-btn {
    background: none; border: none;
    color: inherit; cursor: pointer;
    font-size: inherit; font-family: inherit;
    text-decoration: underline; text-underline-offset: 2px;
    text-decoration-color: rgba(0,0,0,.25);
    padding: 0;
}
.mf-omeyon-btn:hover { opacity: .7; }

/* ── Omeyon Modal (menü içi) ── */
.omeyon-overlay {
    position: fixed; inset: 0; z-index: 700;
    background: rgba(0,0,0,.6);
    backdrop-filter: blur(6px);
    display: flex; align-items: flex-end; justify-content: center;
    animation: omeyonFadeIn .22s ease both;
}
.omeyon-overlay[hidden] { display: none !important; }
.omeyon-modal {
    background: var(--surface);
    border-radius: 20px 20px 0 0;
    padding: 0 28px calc(32px + var(--safe-bottom));
    width: 100%; max-width: 480px;
    position: relative; text-align: center;
    color: var(--text);
    font-family: var(--font);
    animation: omeyonSheetIn .38s cubic-bezier(.16,1,.3,1) both;
}
.omeyon-modal__handle {
    width: 36px; height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 14px auto 20px;
}
.omeyon-modal__close {
    position: absolute; top: 14px; right: 14px;
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--border); border: none; color: var(--text);
    cursor: pointer; font-size: .85rem;
    display: flex; align-items: center; justify-content: center;
}
.omeyon-infinity {
    font-size: 2.6rem; line-height: 1;
    color: var(--accent); font-weight: 300;
    margin-bottom: 10px;
    animation: omeyonMarkIn .56s cubic-bezier(.16,1,.3,1) .08s both;
}
.omeyon-brand-name {
    font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em;
}
.omeyon-tagline-sub {
    font-size: .78rem; color: var(--text-muted);
    margin-top: 2px; margin-bottom: 0;
}
.omeyon-divider {
    width: 40px; height: 1px;
    background: var(--border);
    margin: 14px auto;
}
.omeyon-name { font-size: .95rem; font-weight: 600; margin-bottom: 3px; }
.omeyon-role { font-size: .82rem; color: var(--text-muted); margin-bottom: 2px; }
.omeyon-contacts { display: flex; flex-direction: column; gap: 10px; }
.omeyon-contact {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    color: var(--accent); font-size: .88rem; font-weight: 500;
    text-decoration: none; transition: opacity .15s, transform .15s ease;
}
.omeyon-contact:hover { opacity: .75; transform: translateY(-1px); }
.omeyon-tagline {
    font-size: .72rem; color: var(--text-muted);
    margin-top: 18px; font-style: italic;
}
@keyframes omeyonFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes omeyonSheetIn {
    from { opacity: 0; transform: translateY(34px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes omeyonMarkIn {
    0% { opacity: 0; transform: translateY(8px) scale(.82) rotate(-8deg); }
    65% { opacity: 1; transform: translateY(0) scale(1.08) rotate(2deg); }
    100% { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}

/* ═══════════════════════════════════════════════
   VIEW TRANSITIONS
═══════════════════════════════════════════════ */
.view-enter { animation: viewIn .25s cubic-bezier(.22,.61,.36,1) both; }
@keyframes viewIn {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════ */
@media (max-width: 360px) {
    .item-grid:not(.item-grid--list) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .cat-home { padding-left: 12px; padding-right: 12px; }
    .cat-items-panel, .search-view { padding-left: 12px; padding-right: 12px; }
    .cat-grid:not(.cat-grid--list) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .cat-card { padding: 16px 12px; border-radius: 15px; }
    .cat-card--has-img { padding: 0; }
    .cat-card__placeholder { width: 50px; height: 50px; border-radius: 13px; font-size: 1.45rem; }
    .cat-card__name { font-size: .88rem; }
    .item-card { border-radius: 14px; }
    .item-card__img-wrap { aspect-ratio: 1 / 1; }
    .item-card__body { padding: 10px; }
    .item-card__name { font-size: .82rem; line-height: 1.25; }
    .item-card__desc { font-size: .7rem; -webkit-line-clamp: 2; margin-bottom: 6px; }
    .item-card__price { font-size: .88rem; }
    .item-card__badges { margin-bottom: 4px; }
    .item-badge { font-size: .56rem; padding: 2px 6px; }
    .item-card__portions { gap: 4px; margin-bottom: 6px; }
    .portion-btn { font-size: .66rem; padding: 3px 8px; }
    .items-header__title { display: none; }
}
@media (min-width: 480px) {
    .cat-grid:not(.cat-grid--list)   { grid-template-columns: repeat(3, 1fr); }
    .item-grid:not(.item-grid--list) { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 640px) {
    .item-grid:not(.item-grid--list) { grid-template-columns: repeat(3, 1fr); gap: 16px; }
    .cat-home, .cat-items-panel, .search-view { max-width: 700px; }
}
@media (min-width: 900px) {
    .item-grid:not(.item-grid--list) { grid-template-columns: repeat(4, 1fr); }
    .cat-grid:not(.cat-grid--list)   { grid-template-columns: repeat(4, 1fr); }
}

/* ═══════════════════════════════════════════════
   YIYECEK / İÇECEK FİLTRE SEKMELERİ
═══════════════════════════════════════════════ */
.type-filter {
    display: flex;
    gap: 2px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 2px;
    flex: 1;
    min-width: 0;
}
.type-filter__btn {
    flex: 1;
    padding: 5px 6px;
    border-radius: 6px;
    border: none;
    background: none;
    font-family: inherit;
    font-size: .68rem;
    font-weight: 700;
    color: var(--text-muted, #888);
    cursor: pointer;
    transition: background .15s, color .15s;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    line-height: 1.3;
    text-align: center;
}
.type-filter__btn.active {
    background: var(--accent);
    color: #fff;
}

/* ═══════════════════════════════════════════════
   ITEM BADGES & SOLD OUT
═══════════════════════════════════════════════ */
.item-card__badges {
    display: flex; gap: 4px; flex-wrap: wrap;
    margin-bottom: 5px;
}
.item-badge {
    display: inline-flex; align-items: center;
    padding: 2px 7px; border-radius: 99px;
    font-size: .62rem; font-weight: 700;
    letter-spacing: .04em; text-transform: uppercase;
    white-space: nowrap;
}
.item-sold-out-chip {
    display: inline-flex; align-items: center;
    padding: 4px 10px; border-radius: 6px;
    background: #FEE2E2; color: #991B1B;
    font-size: .72rem; font-weight: 700;
    letter-spacing: .04em;
}
.item-card--sold-out { opacity: .72; }
.item-card--sold-out .item-card__img { filter: grayscale(.4); }
.item-card--sold-out .item-card__price { color: var(--text-muted); }

/* ── Porsiyon Seçici ── */
.item-card__portions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.portion-btn {
    padding: 4px 10px;
    border-radius: 99px;
    border: 1.5px solid var(--border);
    background: var(--surface);
    font-size: .72rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all .15s;
    font-family: var(--font);
}
.portion-btn.active {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--accent);
}

/* ═══════════════════════════════════════════════
   PRINT
═══════════════════════════════════════════════ */
@media print {
    .search-bar-wrap, .cart-bar, .menu-footer,
    .modal-overlay, .back-btn, .cat-tabs-strip,
    .layout-toggle { display: none !important; }
    .item-card { break-inside: avoid; box-shadow: none !important; opacity: 1 !important; animation: none !important; border: 1px solid #ddd; }
    .items-view, .cat-items-panel { display: block !important; padding: 0 !important; }
}
