/* =========================================================
   Parbey QR Menü — Public Menu (v2)
   Premium • Teal Brand • Mobile-First • Motion-Rich
   ========================================================= */

/* Yazı tipleri menu/index.php içinde bloklamadan yüklenir (eskiden burada @import vardı). */

:root {
    /* Marka rengi (JS ile şirkete göre override edilir) */
    --primary: #0e6072;
    --primary-light: #17909f;
    --primary-dark: #0a3f4d;
    --primary-glow: rgba(14, 96, 114, 0.12);
    --primary-rgb: 14, 96, 114;

    --pb-navy: #0a2f3e;
    --accent: #e0a23c;          /* öne çıkan / popüler altın */
    --accent-soft: #fbe9c9;

    --bg: #f6f8fa;
    --bg-card: #ffffff;
    --bg-surface: #eef2f5;
    --text: #10202a;
    --text-sec: #52697a;
    --text-muted: #93a6b3;

    --border: rgba(10, 47, 62, 0.07);
    --shadow-sm: 0 1px 3px rgba(10, 47, 62, 0.05);
    --shadow: 0 6px 24px rgba(10, 47, 62, 0.07);
    --shadow-lg: 0 18px 50px rgba(10, 47, 62, 0.14);
    --shadow-primary: 0 10px 30px rgba(var(--primary-rgb), 0.28);

    --radius-lg: 24px;
    --radius: 18px;
    --radius-sm: 12px;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --trans: 0.3s var(--ease);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}

/* ── Keyframes ────────────────────────────────── */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
@keyframes popIn { 0% { opacity: 0; transform: scale(0.6); } 60% { transform: scale(1.08); } 100% { opacity: 1; transform: scale(1); } }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes drawStroke { to { stroke-dashoffset: 0; } }
@keyframes ringPulse { 0% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0.4); } 70% { box-shadow: 0 0 0 16px rgba(var(--primary-rgb), 0); } 100% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0); } }
@keyframes gradientShift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes sheenMove { 0% { transform: translateX(-120%) skewX(-18deg); } 100% { transform: translateX(220%) skewX(-18deg); } }

/* ── Loading Screen ───────────────────────────── */
.loading-screen {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 30% 20%, rgba(23,144,159,0.10), transparent 55%),
        radial-gradient(circle at 75% 80%, rgba(224,162,60,0.08), transparent 50%),
        linear-gradient(160deg, #ffffff 0%, #f2f7f8 60%, #eef4f5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}
.loading-screen.hide { opacity: 0; visibility: hidden; }

.loading-content { text-align: center; }

.loading-mark-wrap {
    position: relative;
    width: 120px;
    height: 108px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.loading-mark-wrap::before {
    content: '';
    position: absolute;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(23,144,159,0.18), transparent 70%);
    animation: pulseSoft 2.2s ease-in-out infinite;
}
@keyframes pulseSoft { 0%,100% { transform: scale(0.85); opacity: 0.6; } 50% { transform: scale(1.15); opacity: 1; } }
.loading-mark {
    position: relative;
    width: 104px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 12px 26px rgba(14, 96, 114, 0.3));
    animation: markIn 0.7s var(--spring) both, floatY 3.2s ease-in-out 0.7s infinite;
}
@keyframes markIn { 0% { opacity: 0; transform: scale(0.5) translateY(10px); } 100% { opacity: 1; transform: scale(1) translateY(0); } }
.loading-bar {
    width: 120px;
    height: 4px;
    border-radius: 4px;
    margin: 0 auto;
    background: var(--bg-surface);
    overflow: hidden;
    position: relative;
}
.loading-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    width: 40%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    animation: loadSlide 1.1s var(--ease-out) infinite;
}
@keyframes loadSlide { 0% { transform: translateX(-100%); } 100% { transform: translateX(320%); } }
.loading-text { color: var(--text-sec); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.4px; margin-top: 16px; }

/* ── Error Screen ─────────────────────────────── */
.error-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--bg); }
.error-content { text-align: center; animation: scaleIn 0.5s ease both; max-width: 340px; }
.error-icon { width: 76px; height: 76px; margin: 0 auto 18px; border-radius: 24px; display: flex; align-items: center; justify-content: center; background: var(--primary-glow); color: var(--primary); }
.error-icon svg { width: 38px; height: 38px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-back { border: none; cursor: pointer; font-family: inherit; }
.error-content h2 { font-size: 1.35rem; font-weight: 800; margin-bottom: 10px; }
.error-content p { color: var(--text-sec); margin-bottom: 26px; }
.btn-back {
    display: inline-flex; align-items: center; gap: 8px; padding: 13px 30px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff; border-radius: 50px; font-weight: 700; font-size: 0.85rem;
    text-decoration: none; transition: var(--trans); box-shadow: var(--shadow-primary);
}
.btn-back:active { transform: scale(0.96); }

/* ── App Shell ────────────────────────────────── */
.menu-app {
    max-width: 500px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg);
    position: relative;
    padding-bottom: 40px;
}

/* Scroll progress bar */
.scroll-progress {
    position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60;
    background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--accent));
    transform-origin: left; transform: scaleX(0);
    transition: transform 0.1s linear;
}

/* ── Header / Hero ────────────────────────────── */
.menu-header {
    position: relative;
    overflow: hidden;
    /* İçeriğe uyarlanır: az bilgi girildiyse kompakt, çok bilgide kendiliğinden uzar.
       Böylece boş alan "eksik" değil "sade" görünür. */
    min-height: 240px;
    display: flex;
    align-items: flex-end;
    border-radius: 0 0 36px 36px;
}
/* Kapak fotoğrafı varsa sinematik yükseklik — fotoğraf hak ettiği alanı bulsun */
.menu-header.has-cover { min-height: 400px; }
.header-bg {
    position: absolute; inset: 0;
    background: linear-gradient(150deg, var(--primary-dark), var(--primary) 55%, var(--primary-light));
    background-size: 200% 200%;
    animation: gradientShift 14s ease infinite;
    transform: scale(1.12);
    will-change: transform;
    transition: transform 0.1s linear;
}
.header-bg::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(circle at 82% 18%, rgba(255,255,255,0.16), transparent 45%),
        radial-gradient(circle at 15% 85%, rgba(255,255,255,0.09), transparent 42%);
    pointer-events: none;
}
.header-bg::after {
    content: '';
    position: absolute; inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='48' height='48' viewBox='0 0 48 48' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.045'%3E%3Cpath d='M24 22v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4z'/%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}
.header-bg[style*="background-image"] { animation: none; background-size: cover; background-position: center; }
.header-bg[style*="background-image"]::before,
.header-bg[style*="background-image"]::after { display: none; }

/* Sinematik scrim — fotoğraf geldiğinde yazılar her zaman okunur kalır */
.header-overlay {
    position: absolute; inset: 0;
    background:
        linear-gradient(to bottom,
            rgba(4,20,26,0.28) 0%,
            rgba(4,20,26,0.10) 28%,
            rgba(4,20,26,0.52) 72%,
            rgba(4,20,26,0.82) 100%);
}
/* Kapak fotoğrafı varsa scrim biraz daha güçlü olsun */
.header-bg[style*="background-image"] ~ .header-overlay {
    background:
        linear-gradient(to bottom,
            rgba(4,20,26,0.38) 0%,
            rgba(4,20,26,0.18) 26%,
            rgba(4,20,26,0.62) 70%,
            rgba(4,20,26,0.9) 100%);
}
.header-content {
    position: relative; z-index: 2;
    padding: 40px 26px 34px;
    width: 100%;
}
/* Kapak/logo varken üstte daha fazla nefes payı */
.menu-header.has-cover .header-content { padding-top: 64px; }
.header-content > * { animation: fadeInUp 0.8s var(--ease-out) both; }
.header-content > *:nth-child(2) { animation-delay: 0.09s; }
.header-content > *:nth-child(3) { animation-delay: 0.18s; }
.header-content > *:nth-child(4) { animation-delay: 0.27s; }
.header-content > *:nth-child(5) { animation-delay: 0.36s; }

.company-logo-wrapper {
    width: 92px; height: 92px;
    border-radius: 26px;
    overflow: hidden;
    padding: 5px;
    background: linear-gradient(150deg, rgba(255,255,255,0.95), rgba(255,255,255,0.65));
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    margin-bottom: 20px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(255,255,255,0.28);
    display: flex; align-items: center; justify-content: center;
    animation: logoPop 0.9s var(--spring) both;
}
@keyframes logoPop { 0% { opacity: 0; transform: scale(0.7) translateY(14px); } 100% { opacity: 1; transform: none; } }
.company-logo-wrapper.hidden { display: none; }
.company-logo { width: 100%; height: 100%; object-fit: cover; border-radius: 21px; background: #fff; }

.company-name {
    font-family: 'Fraunces', 'Playfair Display', serif;
    font-size: 2.3rem; font-weight: 700; color: #fff;
    text-shadow: 0 3px 20px rgba(0, 0, 0, 0.35);
    line-height: 1.08; margin-bottom: 12px; letter-spacing: -0.8px;
}
.company-description {
    font-size: 0.92rem; color: rgba(255, 255, 255, 0.92);
    max-width: 340px; line-height: 1.6; margin-bottom: 22px;
    text-shadow: 0 1px 8px rgba(0,0,0,0.3);
}

/* Çalışma saatleri — ince, ferah bilgi satırı */
.company-hours {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 0.78rem; font-weight: 600;
    color: rgba(255,255,255,0.9); margin-bottom: 20px;
    text-shadow: 0 1px 6px rgba(0,0,0,0.28);
}
.company-hours .dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: #4ade80; box-shadow: 0 0 0 3px rgba(74,222,128,0.28);
    animation: dotBreathe 2.4s ease-in-out infinite;
}
@keyframes dotBreathe { 0%,100% { box-shadow: 0 0 0 3px rgba(74,222,128,0.28); } 50% { box-shadow: 0 0 0 7px rgba(74,222,128,0); } }

/* Aksiyonlar: tek sırada yuvarlak cam butonlar (eskiden sıkışık metin rozetleriydi) */
.company-info { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.info-btn {
    width: 48px; height: 48px; flex-shrink: 0;
    border-radius: 16px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, 0.16);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.26);
    color: #fff; font-size: 1.02rem; text-decoration: none;
    box-shadow: 0 6px 18px rgba(0,0,0,0.16);
    transition: transform 0.3s var(--spring), background var(--trans);
}
.info-btn:active { transform: scale(0.9); }
.info-btn.wide {
    width: auto; padding: 0 18px; gap: 9px;
    font-size: 0.8rem; font-weight: 700;
}
.info-btn.ig:hover { background: rgba(255,255,255,0.3); }
.info-btn.wa i { color: #7ef0a3; }
.info-btn.ig i { color: #ffb3d6; }

/* ── Search ───────────────────────────────────── */
.search-section {
    padding: 0 16px; margin-top: -26px;
    position: relative; z-index: 5;
    animation: fadeInUp 0.7s var(--ease-out) 0.28s both;
}
.search-wrapper {
    position: relative; background: var(--bg-card);
    border-radius: 16px; box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255,255,255,0.7);
    overflow: hidden;
}
.search-icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--primary); font-size: 0.9rem; }
.search-input {
    width: 100%; padding: 17px 48px; border: none; outline: none;
    font-size: 0.9rem; font-family: inherit; color: var(--text); background: transparent;
}
.search-input::placeholder { color: var(--text-muted); }
.search-clear {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: var(--bg-surface); border: none; color: var(--text-sec);
    width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: 0.7rem;
    transition: var(--trans);
}
.search-clear:hover { background: var(--primary-glow); color: var(--primary); }

/* ── Featured Rail ────────────────────────────── */
.featured-section {
    padding: 24px 0 6px;
    animation: fadeInUp 0.7s var(--ease-out) 0.34s both;
}
.featured-head {
    display: flex; align-items: center; gap: 8px;
    padding: 0 20px; margin-bottom: 14px;
}
.featured-head .spark {
    width: 28px; height: 28px; border-radius: 9px;
    background: linear-gradient(135deg, var(--accent), #f0b955);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 0.75rem; box-shadow: 0 4px 12px rgba(224,162,60,0.4);
}
.featured-head h3 { font-size: 1.02rem; font-weight: 800; letter-spacing: -0.3px; }
.featured-rail {
    display: flex; gap: 14px; padding: 4px 16px 8px;
    overflow-x: auto; scroll-snap-type: x mandatory;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.featured-rail::-webkit-scrollbar { display: none; }
.featured-card {
    flex: 0 0 auto; width: 168px; scroll-snap-align: start;
    background: var(--bg-card); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow); cursor: pointer;
    border: 1px solid var(--border); transition: transform 0.35s var(--spring), box-shadow var(--trans);
}
.featured-card:active { transform: scale(0.97); }
.featured-card-img { position: relative; height: 120px; background: var(--bg-surface); overflow: hidden; }
.featured-card-img::after {
    content: ''; position: absolute; top: 0; left: 0; width: 45%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,0.35), transparent);
    transform: translateX(-160%) skewX(-18deg); pointer-events: none;
    animation: sheenMove 4.5s ease-in-out 1.2s infinite;
}
.featured-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.featured-card:hover .featured-card-img img { transform: scale(1.08); }
.featured-card-img .fc-noimg {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary-glow), var(--bg-surface)); color: var(--primary); font-size: 1.6rem;
}
.featured-badge {
    position: absolute; top: 10px; left: 10px;
    background: linear-gradient(135deg, var(--accent), #f0b955);
    color: #fff; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.4px;
    padding: 4px 9px; border-radius: 50px; text-transform: uppercase;
    box-shadow: 0 3px 10px rgba(224,162,60,0.45);
    display: inline-flex; align-items: center; gap: 4px;
}
.featured-card-body { padding: 12px 14px 14px; }
.featured-card-name { font-size: 0.84rem; font-weight: 700; line-height: 1.3; margin-bottom: 6px;
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.featured-card-price { font-size: 0.9rem; font-weight: 800; color: var(--primary); }

/* ── Category Carousel ────────────────────────── */
.category-carousel-section { padding: 18px 0 6px; animation: fadeInUp 0.7s var(--ease-out) 0.4s both; }
.category-carousel {
    display: flex; gap: 8px; padding: 0 16px;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.category-carousel::-webkit-scrollbar { display: none; }
.category-pill {
    flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 10px 6px; cursor: pointer; min-width: 76px; transition: var(--trans);
}
.category-pill-icon {
    width: 58px; height: 58px; border-radius: 18px; overflow: hidden;
    background: var(--bg-card); border: 2px solid transparent;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-sm); transition: transform 0.35s var(--spring), border-color var(--trans), box-shadow var(--trans);
}
.category-pill-icon img { width: 100%; height: 100%; object-fit: cover; }
.category-pill-icon .cat-initial {
    font-size: 1.25rem; font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.category-pill-name {
    font-size: 0.68rem; font-weight: 700; color: var(--text-sec); text-align: center;
    max-width: 74px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: var(--trans);
}
.category-pill.active .category-pill-icon {
    border-color: var(--primary); transform: translateY(-3px);
    box-shadow: var(--shadow-primary);
}
.category-pill.active .category-pill-name { color: var(--primary); }
.category-pill:active .category-pill-icon { transform: scale(0.94); }

/* ── Sticky Tabs ──────────────────────────────── */
.category-tabs-sticky {
    position: sticky; top: 0; z-index: 20;
    background: rgba(246, 248, 250, 0.86);
    -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid transparent;
    transition: box-shadow var(--trans), border-color var(--trans);
}
.category-tabs-sticky.scrolled { box-shadow: 0 6px 22px rgba(10,47,62,0.07); border-bottom-color: var(--border); }
.category-tabs { display: flex; overflow-x: auto; scrollbar-width: none; padding: 11px 16px; gap: 7px; }
.category-tabs::-webkit-scrollbar { display: none; }
.category-tab {
    flex-shrink: 0; padding: 9px 18px; border-radius: 50px;
    font-size: 0.78rem; font-weight: 700; cursor: pointer; white-space: nowrap;
    color: var(--text-sec); background: var(--bg-card); border: 1.5px solid var(--border);
    transition: color var(--trans), background var(--trans), border-color var(--trans), transform 0.2s var(--ease);
}
.category-tab:active { transform: scale(0.94); }
.category-tab.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff; border-color: transparent; box-shadow: var(--shadow-primary);
}

/* ── Menu Content ─────────────────────────────── */
.menu-content { padding: 10px 16px 24px; }

.menu-section { margin-bottom: 34px; scroll-margin-top: 70px; }
.section-header { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding: 0 2px; }
.section-title { font-family: 'Fraunces', serif; font-size: 1.28rem; font-weight: 700; letter-spacing: -0.3px; }
.section-title-accent { width: 5px; height: 22px; border-radius: 4px; background: linear-gradient(var(--primary), var(--primary-light)); flex-shrink: 0; }
.section-count {
    font-size: 0.68rem; font-weight: 700; color: var(--primary);
    background: var(--primary-glow); padding: 3px 11px; border-radius: 50px; margin-left: auto;
}
.section-banner {
    width: 100%; height: 140px; border-radius: var(--radius); overflow: hidden;
    margin-bottom: 16px; box-shadow: var(--shadow); position: relative;
}
.section-banner img { width: 100%; height: 100%; object-fit: cover; }
.section-banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.15), transparent 60%); }
.section-description { font-size: 0.82rem; color: var(--text-sec); margin-bottom: 16px; padding: 0 2px; line-height: 1.55; }

/* ── Menu Items ───────────────────────────────── */
.menu-items { display: flex; flex-direction: column; gap: 12px; }

.menu-item {
    display: flex; gap: 15px; padding: 14px;
    background: var(--bg-card); border-radius: var(--radius); cursor: pointer;
    border: 1px solid var(--border); box-shadow: var(--shadow-sm);
    position: relative; overflow: hidden;
    opacity: 0; transform: translateY(22px);
    transition: transform 0.35s var(--ease), box-shadow var(--trans), border-color var(--trans);
}
.menu-item.in-view { opacity: 1; transform: none; transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out); }
.menu-item:hover { box-shadow: var(--shadow); border-color: rgba(var(--primary-rgb), 0.18); }
.menu-item:active { transform: scale(0.985); }

.menu-item.featured { border-color: rgba(224,162,60,0.4); box-shadow: 0 6px 20px rgba(224,162,60,0.12); }
.menu-item.featured::before {
    content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%;
    background: linear-gradient(var(--accent), #f0b955);
}

.item-image-wrapper {
    width: 104px; height: 104px; border-radius: 18px; overflow: hidden; flex-shrink: 0;
    background: linear-gradient(135deg, var(--bg-surface), #e3eaee);
    box-shadow: 0 6px 18px rgba(10,47,62,0.12); position: relative;
}
.item-image-wrapper img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.6s var(--ease);
    opacity: 0; /* yüklenince belirir */
}
.item-image-wrapper img.loaded { opacity: 1; }
/* Fotoğrafa hafif derinlik ve parlaklık */
.item-image-wrapper::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    border-radius: 18px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35), inset 0 -18px 24px -18px rgba(0,0,0,0.35);
}
.menu-item:hover .item-image-wrapper img { transform: scale(1.12); }
/* Yükleme iskeleti */
.item-image-wrapper.loading::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, #e8eef1 25%, #f2f6f8 50%, #e8eef1 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s ease-in-out infinite;
}
.item-fav-star {
    position: absolute; top: 6px; left: 6px; width: 22px; height: 22px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #f0b955); color: #fff; font-size: 0.6rem;
    display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(224,162,60,0.5);
}

.item-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.item-name-row { display: flex; align-items: flex-start; gap: 8px; }
.item-name { font-size: 0.95rem; font-weight: 700; line-height: 1.3; margin-bottom: 4px; }

.item-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 5px; }
.diet-chip {
    display: inline-flex; align-items: center; gap: 3px;
    font-size: 0.63rem; font-weight: 700; padding: 2px 8px; border-radius: 50px;
    background: var(--chip-bg, var(--bg-surface)); color: var(--chip-fg, var(--text-sec));
    border: 1px solid var(--chip-bd, transparent);
}
.diet-chip .em { font-size: 0.72rem; line-height: 1; }

.item-description {
    font-size: 0.76rem; color: var(--text-sec); line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    margin-bottom: 7px;
}
.item-meta-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.item-price {
    font-size: 1rem; font-weight: 800; color: var(--primary);
    display: inline-flex; align-items: baseline; gap: 2px;
}
.item-price .cur { font-size: 0.75rem; font-weight: 700; }
.item-cal { font-size: 0.68rem; font-weight: 600; color: var(--text-muted); display: inline-flex; align-items: center; gap: 3px; }
.item-allergens { display: inline-flex; gap: 2px; margin-left: auto; }
.item-allergens .al { font-size: 0.82rem; filter: grayscale(0.15); opacity: 0.9; }

/* Item without image */
.menu-item.no-image { padding: 16px 16px; }
.menu-item.no-image .item-info { justify-content: center; }

/* ── No Results ───────────────────────────────── */
.no-results { text-align: center; padding: 64px 24px; animation: fadeIn 0.4s ease both; }
.no-results i { font-size: 2.6rem; color: var(--primary); opacity: 0.5; margin-bottom: 14px; }
.no-results p { color: var(--text-sec); font-size: 0.9rem; }

/* ── Footer ───────────────────────────────────── */
.menu-footer { padding: 30px 24px 40px; text-align: center; }
.footer-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 24px; box-shadow: var(--shadow-sm);
}
.footer-hours { font-size: 0.78rem; color: var(--text-sec); margin-bottom: 16px; display: flex; align-items: center; justify-content: center; gap: 7px; }
.footer-hours i { color: var(--primary); }
.footer-socials { display: flex; justify-content: center; gap: 10px; margin-bottom: 18px; }
.footer-social {
    width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
    background: var(--bg-surface); color: var(--text-sec); font-size: 1rem; transition: var(--trans); text-decoration: none;
}
.footer-social:active { transform: scale(0.9); }
.footer-social.ig:hover { background: linear-gradient(135deg,#f09433,#e6683c,#dc2743,#cc2366); color: #fff; }
.footer-social.wa:hover { background: #25d366; color: #fff; }
.footer-social.phone:hover, .footer-social.map:hover, .footer-social.web:hover { background: var(--primary); color: #fff; }
.footer-allergen-btn {
    display: inline-flex; align-items: center; gap: 7px; padding: 9px 18px; margin-bottom: 18px;
    background: var(--primary-glow); color: var(--primary); border: none; border-radius: 50px;
    font-size: 0.76rem; font-weight: 700; font-family: inherit; cursor: pointer; transition: var(--trans);
}
.footer-allergen-btn:active { transform: scale(0.95); }
.footer-brand {
    display: inline-flex; align-items: center; gap: 8px; padding-top: 16px;
    border-top: 1px solid var(--border); width: 100%; justify-content: center;
    font-size: 0.72rem; color: var(--text-muted); font-weight: 500;
}
.footer-brand img { width: 24px; height: 24px; object-fit: contain; }
.footer-brand a { color: var(--primary); font-weight: 800; text-decoration: none; }

/* ── Scroll to Top ────────────────────────────── */
.scroll-top-btn {
    position: fixed; bottom: 22px; right: 22px; width: 48px; height: 48px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light)); border: none; color: #fff;
    font-size: 0.95rem; cursor: pointer; box-shadow: var(--shadow-primary); z-index: 50;
    opacity: 0; transform: translateY(20px) scale(0.8); transition: transform 0.4s var(--spring), opacity 0.3s ease;
    display: flex; align-items: center; justify-content: center;
}
.scroll-top-btn.visible { opacity: 1; transform: none; }
.scroll-top-btn:active { transform: scale(0.9); }

/* ── Bottom Sheet Modal ───────────────────────── */
.item-modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: flex-end; justify-content: center; }
.item-modal.active { display: flex; }
.modal-backdrop {
    position: fixed; inset: 0; background: rgba(6, 20, 27, 0.5);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    opacity: 0; transition: opacity 0.35s ease; z-index: 1;
}
.item-modal.active .modal-backdrop { opacity: 1; }
.modal-container {
    position: relative; z-index: 2; width: 100%; max-width: 500px; max-height: 92vh;
    background: var(--bg-card); border-radius: 28px 28px 0 0; overflow-y: auto;
    transform: translateY(100%); transition: transform 0.45s var(--ease-out);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.22);
}
.item-modal.active .modal-container { transform: none; }
.modal-drag-handle { width: 40px; height: 4px; border-radius: 3px; background: #d5dee2; margin: 12px auto 0; position: relative; z-index: 11; }
.modal-actions { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.modal-share {
    width: 38px; height: 38px; border-radius: 50%; border: none; color: var(--text-sec);
    font-size: 0.85rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: var(--trans); background: var(--bg-surface);
}
.modal-has-image .modal-actions { position: absolute; top: 16px; right: 16px; margin: 0; z-index: 12; }
.modal-has-image .modal-share { background: rgba(255,255,255,0.92); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: var(--text); box-shadow: 0 2px 10px rgba(0,0,0,0.15); }
.modal-image-wrapper { width: 100%; height: 280px; background: var(--bg-surface); overflow: hidden; position: relative; }
.modal-image-wrapper.hidden { display: none; }
.modal-image { width: 100%; height: 100%; object-fit: cover; }
.modal-image-wrapper::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.18), transparent 45%); }
.modal-fav {
    position: absolute; bottom: 14px; left: 16px; z-index: 3;
    background: linear-gradient(135deg, var(--accent), #f0b955); color: #fff;
    font-size: 0.68rem; font-weight: 800; padding: 5px 12px; border-radius: 50px;
    display: inline-flex; align-items: center; gap: 5px; box-shadow: 0 4px 12px rgba(224,162,60,0.5);
}
.modal-body { padding: 20px 24px 40px; position: relative; }
.modal-name { font-family: 'Fraunces', serif; font-size: 1.5rem; font-weight: 700; margin-bottom: 12px; line-height: 1.25; }
.modal-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.modal-description { font-size: 0.9rem; color: var(--text-sec); line-height: 1.7; margin-bottom: 20px; }
.modal-stats { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.modal-stat {
    flex: 1; min-width: 92px; background: var(--bg-surface); border-radius: var(--radius-sm);
    padding: 13px 14px; text-align: center;
}
.modal-stat .val { font-size: 1.1rem; font-weight: 800; color: var(--primary); }
.modal-stat .lbl { font-size: 0.66rem; color: var(--text-muted); font-weight: 600; margin-top: 2px; text-transform: uppercase; letter-spacing: 0.4px; }

.modal-allergens { margin-bottom: 8px; }
.modal-sub {
    font-size: 0.72rem; font-weight: 800; color: var(--text-sec); text-transform: uppercase;
    letter-spacing: 0.6px; margin-bottom: 12px; display: flex; align-items: center; gap: 6px;
}
.modal-sub i { color: var(--accent); }
.allergen-list { display: flex; flex-wrap: wrap; gap: 8px; }
.allergen-item {
    display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px;
    background: #fff6ec; border: 1px solid #f6e2c6; border-radius: 12px;
    font-size: 0.76rem; font-weight: 600; color: #a86a17;
}
.allergen-item .em { font-size: 0.95rem; }
.modal-price {
    font-size: 1.6rem; font-weight: 800; color: var(--primary);
    display: flex; align-items: baseline; gap: 4px; margin-top: 8px;
}
.modal-price .cur { font-size: 1rem; font-weight: 700; color: var(--text-sec); }

/* ── Allergen Legend Sheet ────────────────────── */
.legend-sheet { position: fixed; inset: 0; z-index: 110; display: none; align-items: flex-end; justify-content: center; }
.legend-sheet.active { display: flex; }
.legend-backdrop { position: fixed; inset: 0; background: rgba(6,20,27,0.5); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity 0.35s ease; z-index: 1; }
.legend-sheet.active .legend-backdrop { opacity: 1; }
.legend-container {
    position: relative; z-index: 2; width: 100%; max-width: 500px; max-height: 88vh; overflow-y: auto;
    background: var(--bg-card); border-radius: 28px 28px 0 0; padding: 8px 24px 40px;
    transform: translateY(100%); transition: transform 0.45s var(--ease-out); box-shadow: 0 -10px 40px rgba(0,0,0,0.22);
}
.legend-sheet.active .legend-container { transform: none; }
.legend-title { font-family: 'Fraunces', serif; font-size: 1.3rem; font-weight: 700; margin: 14px 0 6px; }
.legend-intro { font-size: 0.82rem; color: var(--text-sec); margin-bottom: 20px; line-height: 1.6; }
.legend-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 22px; }
.legend-cell { display: flex; align-items: center; gap: 10px; padding: 11px 13px; background: var(--bg-surface); border-radius: 12px; }
.legend-cell .em { font-size: 1.15rem; }
.legend-cell .nm { font-size: 0.76rem; font-weight: 600; color: var(--text); line-height: 1.25; }
.legend-close {
    width: 100%; padding: 14px; border: none; border-radius: var(--radius-sm); cursor: pointer;
    background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff;
    font-size: 0.88rem; font-weight: 700; font-family: inherit; box-shadow: var(--shadow-primary);
}

/* ── Responsive ───────────────────────────────── */
@media (min-width: 501px) {
    body { background: radial-gradient(circle at 50% 0%, #e7eef1, var(--bg) 60%); }
    .menu-app { box-shadow: 0 0 60px rgba(10, 47, 62, 0.08); }
}
@media (max-width: 360px) {
    .item-image-wrapper { width: 78px; height: 78px; }
    .company-name { font-size: 1.55rem; }
    .legend-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════
   BOŞ VERİ DAYANIKLILIĞI
   Opsiyonel alanlar (fotoğraf, kalori, alerjen, diyet,
   açıklama, fiyat, sosyal medya) girilmediğinde
   boş kapsayıcılar boşluk/çirkin görüntü yaratmasın.
   ═══════════════════════════════════════════════ */
.item-tags:empty,
.item-meta-row:empty,
.modal-tags:empty,
.modal-stats:empty,
.modal-price:empty,
.company-info:empty,
.company-hours:empty,
.footer-socials:empty,
.featured-rail:empty,
.legend-grid:empty { display: none !important; }

/* Görsel yoksa: kutu hiç oluşmasın, yer kaplamasın */
.item-image-wrapper:empty { display: none; }

/* Sadece isimden oluşan ürün kartı da dengeli dursun */
.menu-item.no-image .item-name:only-child { margin-bottom: 0; }

/* Menüde hiç ürün yoksa gösterilecek zarif durum */
.menu-empty {
    text-align: center;
    padding: 60px 26px 70px;
    animation: fadeInUp 0.6s var(--ease-out) both;
}
.menu-empty-icon {
    width: 82px; height: 82px; margin: 0 auto 20px;
    border-radius: 26px;
    background: linear-gradient(150deg, var(--primary), var(--primary-light));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.9rem;
    box-shadow: var(--shadow-primary);
    animation: floatY 3.4s ease-in-out infinite;
}
.menu-empty h3 { font-family: 'Fraunces', serif; font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.menu-empty p { font-size: 0.87rem; color: var(--text-sec); line-height: 1.6; max-width: 300px; margin: 0 auto; }

/* ═══════════════════════════════════════════════
   DİL SEÇİMİ (TR / EN)
   ═══════════════════════════════════════════════ */
.lang-switch {
    position: absolute; z-index: 4;
    top: calc(env(safe-area-inset-top, 0px) + 14px); right: 14px;
    display: grid; grid-template-columns: 1fr 1fr;
    padding: 3px; border-radius: 50px;
    background: rgba(4, 20, 26, 0.34);
    border: 1px solid rgba(255, 255, 255, 0.22);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    box-shadow: 0 6px 18px rgba(4, 20, 26, 0.18);
    animation: fadeIn 0.6s ease 0.3s both;
}
.lang-switch button {
    position: relative; z-index: 1;
    min-width: 42px; height: 30px; padding: 0 12px;
    border: none; background: none; cursor: pointer;
    font-family: inherit; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.82);
    transition: color 0.25s var(--ease);
    -webkit-tap-highlight-color: transparent;
}
.lang-switch button.active { color: var(--primary-dark); }
.lang-switch button:focus-visible { outline: 2px solid #fff; outline-offset: 1px; border-radius: 50px; }
.lang-switch-thumb {
    position: absolute; top: 3px; bottom: 3px; left: 3px;
    width: calc(50% - 3px); border-radius: 50px;
    background: #fff; box-shadow: 0 2px 8px rgba(4, 20, 26, 0.2);
    transition: transform 0.35s var(--spring);
}
.lang-switch[data-active="en"] .lang-switch-thumb { transform: translateX(100%); }
/* İngilizce menü yüklenirken seçilen düğme nabız gibi atar */
.lang-switch.is-loading .lang-switch-thumb { animation: langPulse 0.9s ease-in-out infinite; }
@keyframes langPulse { 50% { opacity: 0.55; } }
/* Sağ üstteki seçici, logo/başlıkla çakışmasın */
.header-content { padding-top: 58px; }

/* Dil değişiminde içerik yumuşakça yenilensin */
.menu-app .header-content,
.menu-app .menu-content,
.menu-app .featured-section,
.menu-app .category-tabs-sticky,
.menu-app .category-carousel-section { transition: opacity 0.22s var(--ease); }
.menu-app.lang-swap .header-content,
.menu-app.lang-swap .menu-content,
.menu-app.lang-swap .featured-section,
.menu-app.lang-swap .category-tabs-sticky,
.menu-app.lang-swap .category-carousel-section { opacity: 0.35; transition: none; }

/* Türkçe olmayan telefonlara "English menu available" önerisi */
.lang-hint {
    position: fixed; z-index: 55;
    left: 16px; right: 82px; max-width: 400px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 22px);
    display: flex; align-items: center; gap: 10px;
    padding: 8px 8px 8px 14px; border-radius: 16px;
    background: var(--pb-navy); color: #fff;
    box-shadow: var(--shadow-lg);
    font-size: 0.8rem; font-weight: 600;
    opacity: 0; transform: translateY(16px); pointer-events: none;
    transition: opacity 0.35s var(--ease), transform 0.45s var(--ease-out);
}
.lang-hint.show { opacity: 1; transform: none; pointer-events: auto; }
.lang-hint > i { color: var(--accent); font-size: 1rem; }
.lang-hint-text { flex: 1; min-width: 0; line-height: 1.3; }
.lang-hint-btn {
    border: none; border-radius: 10px; padding: 8px 12px; cursor: pointer;
    background: #fff; color: var(--pb-navy); font-family: inherit; font-size: 0.76rem; font-weight: 800;
}
.lang-hint-close {
    border: none; background: none; color: rgba(255, 255, 255, 0.6); cursor: pointer;
    width: 30px; height: 30px; border-radius: 8px; font-size: 0.85rem;
}
@media (min-width: 501px) {
    .lang-hint { left: 50%; right: auto; width: 400px; margin-left: -234px; }
}

.footer-mt-note {
    font-size: 0.7rem; color: var(--text-muted); line-height: 1.5;
    margin: -6px auto 16px; max-width: 280px;
}

.menu-toast {
    position: fixed; z-index: 300; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 16px);
    transform: translate(-50%, -20px); opacity: 0; pointer-events: none;
    width: max-content; max-width: calc(100% - 32px);
    padding: 11px 16px; border-radius: 14px;
    background: var(--pb-navy); color: #fff; font-size: 0.8rem; font-weight: 600; text-align: center;
    box-shadow: var(--shadow-lg);
    transition: opacity 0.3s var(--ease), transform 0.4s var(--ease-out);
}
.menu-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── Reduced Motion ───────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
    .header-bg { transform: none !important; }
    .menu-item { opacity: 1; transform: none; }
}
