/* ==========================================================================
   Via Dolci - Akıllı Dijital Menü Yeni Premium Tasarımı (SushiCo Teması)
   Red & Charcoal Modern Restaurant Arayüz Sistemi (Responsive & Mobile-First)
   ========================================================================== */

/* 1. Değişkenler ve Yeni Marka Renk Paleti (Via Dolci Cafe & Makaron Kimliği) */
:root {
    --color-primary: #C26353;         /* Sıcak Kiremit / Terracotta (Logo Makaron Vurgusu) */
    --color-primary-hover: #B85241;   /* Koyu Kiremit / Terracotta Hover */
    --color-primary-dark: #A64030;    /* Derin Terracotta */
    --color-primary-light: #F7ECE9;   /* Açık Kiremit Pembe Tonu */
    --color-primary-subtle: #F6EAE7;  /* Çok Hafif Kiremit Zemin */
    
    --color-dark: #2D1E18;            /* Koyu Çikolata (Başlıklar, Ana Metinler, Koyu Butonlar) */
    --color-chocolate: #2D1E18;       /* İtalyan Kafe Şıklığı Koyu Çikolata */
    --color-chocolate-soft: #4A3728;  /* Yumuşak Çikolata (Etiket Yazıları vb.) */
    
    --color-bg-page: #FDFBF7;         /* Krem / Süt Köpüğü (Sıcak Kırık Beyaz Zemin) */
    --color-bg-card: #FFFFFF;         /* Kart Zemin */
    --color-gray-bg: #F7F4EF;         /* Sıcak Açık Krem Zemin (Arama barı vb.) */
    --color-sidebar-bg: #FAF7F2;      /* Sıcak Bej Kategori Sidebar Zemin */
    --color-border: #EBE5DC;          /* Sıcak Krem/Bej Kenarlık */
    --color-border-subtle: #F2ECE4;   /* Çok İnce Sıcak Çizgi */
    
    --color-text-main: #2D1E18;       /* Ana Metin Rengi (Koyu Çikolata) */
    --color-text-muted: #7D6E66;      /* Sıcak Çikolata Grisi (Sert siyah/gri yerine) */
    
    --color-sage: #8EA89D;            /* Adaçayı Yeşili (Logo Makaron Yeşili - Kalori/Fit/Vegan) */
    --color-sage-bg: #EFF5F2;         /* Çok Açık Adaçayı Yeşili Zemin */
    --color-sage-border: #D1DFD8;     /* Adaçayı Yeşili Çerçeve */
    
    --color-tag-bg: #F0ECE4;          /* Sakinleştirilmiş Etiket Zemini (Hafif Krem/Bej) */
    --color-tag-text: #4A3728;        /* Sakinleştirilmiş Etiket Yazısı (Koyu Çikolata) */
    --color-tag-border: rgba(74, 55, 40, 0.12);
    
    --color-success: #8EA89D;         /* Adaçayı Yeşili ile Uyumlu */
    --color-success-bg: #EFF5F2;
    --color-success-border: #D1DFD8;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --shadow-card: 0 4px 16px rgba(45, 30, 24, 0.05);
    --shadow-modal: 0 8px 32px rgba(45, 30, 24, 0.16);
    
    --transition-fast: 0.15s ease;
    --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 2. Temel Sıfırlamalar */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--color-bg-page);
    color: var(--color-text-main);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.5;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    min-height: 100dvh; /* iOS Safari dinamik viewport desteği */
    /* iOS Safe Area Padding */
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* Yükleyici Ekranı */
.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #FFFFFF;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity var(--transition-smooth);
}

.loader-logo-img {
    height: 90px;
    margin-bottom: 20px;
    animation: pulseLogo 2s infinite ease-in-out;
}

.loader-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--color-gray-bg);
    border-top: 3px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 12px;
}

.loader-container p {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-text-muted);
    font-size: 14px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulseLogo {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.06); opacity: 1; }
}

/* 3. Ana Header Alanı */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 65px;
    background-color: #FFFFFF;
    border-bottom: 1px solid var(--color-border);
    z-index: 100;
    /* iOS Safe Area - Notch/Dynamic Island için */
    padding-top: env(safe-area-inset-top);
    height: calc(65px + env(safe-area-inset-top));
}

.header-container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    max-width: 1100px;
    margin: 0 auto;
}

.header-logo {
    height: 44px;
    width: auto;
    object-fit: contain;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Header Değerlendirme Butonu (5 Yıldız) */
.feedback-header-btn {
    background: linear-gradient(135deg, #FFF9EC 0%, #FFF2D6 100%);
    color: #9A5B00;
    border: 1px solid rgba(245, 158, 11, 0.38);
    border-radius: var(--radius-full);
    padding: 7px 14px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
    white-space: nowrap;
    text-decoration: none;
}
.feedback-header-btn i {
    color: #F59E0B;
    font-size: 13px;
}
.feedback-header-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.22);
}
.feedback-header-btn:active {
    transform: scale(0.96);
}
@media (max-width: 390px) {
    .feedback-header-btn {
        padding: 6px 10px;
        font-size: 11.5px;
    }
}

/* Dil Dropdown */
.language-dropdown {
    position: relative;
}

.lang-trigger-btn {
    background-color: var(--color-gray-bg);
    border: none;
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    color: var(--color-text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.lang-dropdown-menu {
    position: absolute;
    top: 38px;
    right: 0;
    background-color: #FFFFFF;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-modal);
    display: flex;
    flex-direction: column;
    width: 120px;
    overflow: hidden;
    z-index: 1001;
    animation: dropdownScaleIn 0.2s ease;
    transform-origin: top right;
}

.lang-opt {
    background: none;
    border: none;
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 600;
    text-align: left;
    color: var(--color-text-main);
    cursor: pointer;
    width: 100%;
    transition: background-color var(--transition-fast);
}

.lang-opt:hover {
    background-color: var(--color-gray-bg);
}

.lang-opt.active {
    background-color: var(--color-primary-light);
    color: var(--color-primary);
}

/* Masa Kapsülü (SushiCo Tarzı - Salt Okunur) */
.table-badge {
    background-color: var(--color-primary-light);
    color: var(--color-primary);
    border-radius: var(--radius-full);
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-fast);
}

.table-badge-icon {
    font-size: 13px;
}

/* 4. Ana Uygulama Düzeni */
.app-main-content {
    margin-top: calc(65px + env(safe-area-inset-top));
    min-height: calc(100vh - 135px);
    min-height: calc(100dvh - 135px); /* iOS Safari dvh fix */
    position: relative;
    background-color: #FFFFFF;
}

.view-panel {
    display: none;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.view-panel.active {
    display: block;
}

/* 5. Menü Görünümü Düzeni */
.search-filter-row {
    display: flex;
    gap: 10px;
    padding: 14px 16px 8px 16px;
    background-color: #FFFFFF;
}

.search-box {
    position: relative;
    flex-grow: 1;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    font-size: 15px;
}

.search-box input {
    width: 100%;
    height: 46px;
    background-color: var(--color-gray-bg);
    border: none;
    border-radius: var(--radius-md);
    padding: 0 40px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-main);
    outline: none;
    transition: background-color var(--transition-fast);
}

.search-box input:focus {
    background-color: #e5e5ea;
}

.search-box input::placeholder {
    color: var(--color-text-muted);
}

.search-clear-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: 16px;
}

.btn-filter-trigger {
    width: 46px;
    height: 46px;
    background-color: var(--color-gray-bg);
    border: none;
    border-radius: var(--radius-md);
    color: var(--color-text-main);
    font-size: 17px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.btn-filter-trigger:hover {
    background-color: #e5e5ea;
}

.btn-filter-trigger.active {
    background-color: var(--color-primary);
    color: #FFFFFF;
}

/* Sıralama Dropdown Menüsü */
.sort-dropdown-container {
    position: relative;
}

.sort-dropdown-menu {
    position: absolute;
    top: 52px;
    right: 0;
    background-color: #FFFFFF;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 32px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    width: 230px;
    overflow: hidden;
    z-index: 1000;
    animation: dropdownScaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: top right;
}

.sort-opt {
    background: none;
    border: none;
    padding: 11px 14px;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    color: var(--color-text-main);
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color var(--transition-fast);
}

.sort-opt i {
    width: 16px;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 14px;
}

.sort-opt:hover {
    background-color: var(--color-gray-bg);
}

.sort-opt.active {
    background-color: rgba(229, 35, 39, 0.08);
    color: var(--color-primary);
    font-weight: 700;
}

.sort-opt.active i {
    color: var(--color-primary);
}

/* Karşılama & Hava Durumu Şeridi */
.greeting-mini-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 2px 18px 10px 18px;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-muted);
    border-bottom: 1px solid var(--color-gray-bg);
}

.weather-widget-mini {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: var(--color-gray-bg);
    color: var(--color-text-main);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(45, 30, 24, 0.06);
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.greeting-mini-desc {
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--color-text-main);
    font-weight: 600;
}

body.no-bottom-nav .app-main-content {
    min-height: calc(100vh - 68px);
    min-height: calc(100dvh - 68px);
}
body.no-bottom-nav .menu-layout-container {
    height: calc(100vh - 150px);
    height: calc(100dvh - 150px);
}

/* Sidebar ve Ürün Listesi Çift Sütun Tasarımı */
.menu-layout-container {
    display: flex;
    height: calc(100vh - 195px); /* Fallback */
    height: calc(100dvh - 195px); /* iOS Safari fix */
    overflow: hidden;
}

/* Sol Kategori Sidebar */
.category-sidebar {
    width: 80px;
    min-width: 80px;
    background-color: var(--color-sidebar-bg);
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 14px 0 30px 0;
    overflow-y: auto;
}

.category-sidebar::-webkit-scrollbar {
    display: none; /* Scrollbar gizleme */
}

.category-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 4px 0;
    background: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    outline: none;
}

/* Sol Kırmızı Çizgi Göstergesi */
.category-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 15%;
    height: 70%;
    width: 3.5px;
    background-color: var(--color-primary);
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.category-item.active::before {
    opacity: 1;
}

.category-img-wrap {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background-color: var(--color-gray-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all var(--transition-fast);
    font-size: 20px;
    color: var(--color-text-main);
}

.category-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-item.active .category-img-wrap {
    border-color: var(--color-primary);
    background-color: #FFFFFF;
    color: var(--color-primary);
    box-shadow: 0 4px 10px rgba(229, 35, 39, 0.1);
}

.category-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--color-text-muted);
    margin-top: 4px;
    text-align: center;
    width: 90%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color var(--transition-fast);
}

.category-item.active .category-label {
    color: var(--color-primary);
}

/* Sağ Ürün Alanı */
.menu-products-scroll-area {
    flex-grow: 1;
    min-width: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px 14px 40px 14px;
    background-color: #FFFFFF;
}

.menu-products-scroll-area::-webkit-scrollbar {
    width: 5px;
}
.menu-products-scroll-area::-webkit-scrollbar-thumb {
    background-color: var(--color-border);
    border-radius: 10px;
}

/* 2-Column Grid (SushiCo Tarzı) */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
}

@media (min-width: 600px) {
    .menu-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (min-width: 900px) {
    .menu-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.menu-subgroup-header {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 14px 0 4px 0;
    padding: 8px 12px;
    background: rgba(194, 99, 83, 0.08);
    border-left: 3.5px solid var(--color-primary);
    border-radius: 8px;
    font-family: var(--font-heading, 'Outfit', sans-serif);
    font-size: 0.94rem;
    font-weight: 700;
    color: var(--color-text-main);
    letter-spacing: 0.01em;
}
.menu-subgroup-header:first-child {
    margin-top: 2px;
}
.menu-subgroup-count {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-primary);
    background: #ffffff;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid rgba(194, 99, 83, 0.25);
}

/* Product Card (Via Dolci Cafe Şıklığı) */
.product-card {
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 0;
    box-shadow: var(--shadow-card);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(45, 30, 24, 0.08);
    border-color: rgba(194, 99, 83, 0.3);
}

.product-img-wrap {
    width: 100%;
    height: 120px;
    overflow: hidden;
    background-color: var(--color-gray-bg);
    position: relative;
}

.product-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img-wrap img {
    transform: scale(1.05);
}

/* TÜKENDİ / STOKTA YOK ROZETİ VE GÖRÜNÜMÜ */
.product-card.sold-out {
    opacity: 0.88;
}

.product-card.sold-out .product-img-wrap img {
    filter: grayscale(0.4) opacity(0.85);
}

.sold-out-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(45, 30, 24, 0.9);
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    z-index: 5;
}

.btn-card-add-shortcut.disabled {
    background-color: #e5e5ea !important;
    color: #a0a0ab !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
}

.product-content {
    padding: 10px 12px 12px 12px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-chocolate);
    margin-bottom: 3px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 34px;
}

.product-desc {
    font-size: 10px;
    color: var(--color-text-muted);
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 28px;
}

/* Rozet Satırları (Kompakt Tek Satır - Dikeyde Boğmayı Önler) */
.product-badges {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-wrap: nowrap;
    overflow: hidden;
    margin-top: auto;
    margin-bottom: 6px;
    height: 24px;
}

.cal-badge {
    font-size: 9.5px;
    font-weight: 700;
    color: var(--color-tag-text);
    background-color: var(--color-tag-bg);
    border: 1px solid var(--color-tag-border);
    padding: 2px 7px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1.2;
    flex-shrink: 0;
    white-space: nowrap;
    text-decoration: none;
}

.cal-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: var(--color-sage);
    display: inline-block;
}

/* Kompakt Alerjen İkonları (Sakinleştirilmiş Krem Zemin + Çikolata Detay) */
.allergen-mini-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    background-color: var(--color-tag-bg);
    border: 1px solid var(--color-tag-border);
    color: var(--color-tag-text);
    cursor: pointer;
    transition: transform var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
    flex-shrink: 0;
    line-height: 1;
    user-select: none;
}

.allergen-mini-icon:hover, .allergen-mini-icon:active {
    transform: scale(1.18);
    background-color: #E6DFD4;
    border-color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(45, 30, 24, 0.15);
}

.allergen-more-count {
    font-size: 9px;
    font-weight: 700;
    color: var(--color-tag-text);
    background-color: var(--color-tag-bg);
    border: 1px solid var(--color-tag-border);
    border-radius: var(--radius-full);
    padding: 2px 6px;
    cursor: pointer;
    flex-shrink: 0;
    line-height: 1.2;
    transition: all var(--transition-fast);
}

.allergen-more-count:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
}

/* Fiyat Alanı & Sıcak Kiremit / Terracotta Buton */
.product-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

.product-card-price {
    font-size: 15px;
    font-weight: 800;
    color: var(--color-primary);
    font-family: var(--font-heading);
    letter-spacing: -0.01em;
}

.btn-card-add-shortcut {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--color-primary);
    border: none;
    color: #FFFFFF;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(194, 99, 83, 0.35);
    transition: transform var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-card-add-shortcut:hover {
    background-color: var(--color-primary-hover);
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(194, 99, 83, 0.45);
}

.btn-card-add-shortcut:active {
    transform: scale(0.96);
}

/* Yasal Uyarı */
.legal-notice {
    grid-column: 1 / -1;
    text-align: center;
    padding: 24px 10px 10px 10px;
    font-size: 10px;
    color: var(--color-text-muted);
    line-height: 1.5;
    border-top: 1px solid var(--color-gray-bg);
    margin-top: 24px;
}

/* No Results */
.no-results-card {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: var(--color-text-muted);
}
.no-results-icon {
    font-size: 36px;
    margin-bottom: 12px;
    color: var(--color-primary);
}

/* 6. Sabit Alt Navigasyon (Footer) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    /* iOS safe area */
    padding-bottom: env(safe-area-inset-bottom);
    height: calc(70px + env(safe-area-inset-bottom));
    background-color: #FFFFFF;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 998;
    box-shadow: 0 -3px 12px rgba(0,0,0,0.03);
}

.nav-item {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--color-text-muted);
    cursor: pointer;
    width: 30%;
    height: 100%;
    outline: none;
    transition: color var(--transition-fast);
}

.nav-icon {
    font-size: 18px;
    transition: transform var(--transition-fast);
}

.nav-label {
    font-size: 10px;
    font-weight: 700;
}

.nav-item.active {
    color: var(--color-primary);
}

.nav-item.active .nav-icon {
    transform: scale(1.08);
}

/* 7. Ekran Panelleri (Garson Çağır & Hesap İste) */
.waiter-screen-container, .bill-screen-container {
    padding: 24px 16px 100px 16px;
    text-align: center;
    background-color: #FFFFFF;
    min-height: calc(100vh - 135px);
}

.screen-header {
    margin-bottom: 24px;
}

.screen-main-icon {
    font-size: 44px;
    color: var(--color-primary);
    margin-bottom: 12px;
}

.screen-header h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--color-text-main);
    margin-bottom: 6px;
}

.screen-header p {
    font-size: 12px;
    color: var(--color-text-muted);
}

/* Garson Seçenekler Grid */
.waiter-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.waiter-option-card {
    background-color: #FFFFFF;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 16px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
    outline: none;
}

.waiter-option-card:hover {
    border-color: var(--color-primary);
}

.option-icon {
    font-size: 24px;
}

.option-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-text-main);
}

.waiter-option-card.active {
    border-color: var(--color-primary);
    background-color: var(--color-primary-light);
}

.waiter-option-card.active .option-title {
    color: var(--color-primary);
}

.waiter-action-wrapper {
    margin: 20px 0;
}

.btn-primary-red {
    width: 100%;
    max-width: 320px;
    height: 52px;
    background-color: var(--color-primary);
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(229, 35, 39, 0.3);
    transition: background-color var(--transition-fast), transform var(--transition-fast);
    outline: none;
}

.btn-primary-red:hover {
    background-color: var(--color-primary-dark);
}

.btn-primary-red:active {
    transform: scale(0.98);
}

/* Success Card */
.action-success-card {
    background-color: var(--color-success-bg);
    border: 1px solid var(--color-success-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-top: 15px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    animation: scaleIn 0.3s ease;
}

.success-icon {
    font-size: 30px;
    color: var(--color-success);
    margin-bottom: 8px;
}

.action-success-card h3 {
    font-size: 15px;
    font-weight: 700;
    color: #1E4620;
    margin-bottom: 4px;
}

.action-success-card p {
    font-size: 12px;
    color: #2E5C31;
}

/* Hesap İste Ekranı */
.empty-bill-state {
    padding: 40px 20px;
    color: var(--color-text-muted);
}
.empty-bill-state .empty-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.bill-summary-card {
    background-color: #FFFFFF;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: left;
    max-width: 500px;
    margin: 0 auto 20px auto;
    box-shadow: var(--shadow-card);
}

.bill-summary-card h3 {
    font-size: 15px;
    font-weight: 800;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 10px;
    margin-bottom: 12px;
}

.bill-items-list {
    margin-bottom: 14px;
}

.bill-item-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 13px;
    border-bottom: 1px dashed var(--color-border);
}

.bill-item-name {
    font-weight: 600;
    color: var(--color-text-main);
}
.bill-item-qty {
    color: var(--color-text-muted);
}
.bill-item-price {
    font-weight: 700;
}

.bill-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 800;
    padding-top: 12px;
    margin-bottom: 24px;
    border-top: 1.5px solid var(--color-dark);
}

.payment-method-section {
    margin-bottom: 24px;
}

.payment-method-section h4 {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--color-text-main);
}

.payment-methods-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

.payment-card {
    background-color: #FFFFFF;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 12px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all var(--transition-fast);
    outline: none;
}

.payment-card i {
    font-size: 16px;
    color: var(--color-text-muted);
}

.payment-card span {
    font-size: 10px;
    font-weight: 700;
    color: var(--color-text-main);
}

.payment-card.active {
    border-color: var(--color-primary);
    background-color: var(--color-primary-light);
}

.payment-card.active i, .payment-card.active span {
    color: var(--color-primary);
}

/* 8. Modallar ve Overlays */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 999;
}

/* Ortalanmış Modal (Örnek: Ürün Detay, Masa Seçim) */
.detail-modal-dialog, .table-modal-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 440px;
    max-height: 90vh;
    max-height: 90dvh;
    display: flex;
    flex-direction: column;
    background-color: #FFFFFF;
    border-radius: var(--radius-lg);
    overflow: hidden;
    z-index: 1000;
    box-shadow: var(--shadow-modal);
    animation: scaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#qr-blocked-overlay {
    z-index: 1005;
}
#qr-blocked-modal {
    z-index: 1006;
}

/* Alttan Açılan Modal (Örnek: Filtrele) */
.filter-modal-dialog {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #FFFFFF;
    border-radius: 24px 24px 0 0;
    z-index: 1000;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    0% { transform: translateY(100%); }
    100% { transform: translateY(0); }
}

@keyframes slideUpCentered {
    0% { transform: translate(-50%, 100%); opacity: 0; }
    100% { transform: translate(-50%, 0); opacity: 1; }
}

@keyframes scaleIn {
    0% { transform: translate(-50%, -50%) scale(0.92); opacity: 0; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

@keyframes dropdownScaleIn {
    0% { transform: scale(0.94) translateY(-4px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* Modal Başlığı */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 800;
}

.btn-modal-close {
    width: 28px;
    height: 28px;
    background-color: var(--color-gray-bg);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--color-text-main);
    cursor: pointer;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--color-border);
}

/* Filtrele Özellikleri */
.filter-section {
    margin-bottom: 22px;
}

.filter-section h4 {
    font-size: 13px;
    font-weight: 800;
    color: var(--color-text-main);
    margin-bottom: 10px;
}

.calorie-chips-row {
    display: flex;
    gap: 8px;
}

.calorie-chip {
    border: 1px solid var(--color-border);
    background: none;
    border-radius: var(--radius-full);
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.calorie-chip.active {
    background-color: var(--color-primary);
    color: #FFFFFF;
    border-color: var(--color-primary);
}

.allergen-chips-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.allergen-chip {
    --chip-color: var(--color-primary);
    background: none;
    border: 1.5px solid var(--chip-color);
    color: var(--chip-color);
    border-radius: var(--radius-full);
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-fast);
}

/* Allerjen renk kodlamaları */
.allergen-chip[data-allergen="aci_bakla"] { --chip-color: #EA580C; }
.allergen-chip[data-allergen="balik"] { --chip-color: #3B82F6; }
.allergen-chip[data-allergen="gluten"] { --chip-color: #B45309; }
.allergen-chip[data-allergen="hardal"] { --chip-color: #D97706; }
.allergen-chip[data-allergen="kabuklu"] { --chip-color: #EC4899; }
.allergen-chip[data-allergen="kereviz"] { --chip-color: #10B981; }
.allergen-chip[data-allergen="sulfit"] { --chip-color: #8B5CF6; }
.allergen-chip[data-allergen="kuruyemis"] { --chip-color: #78350F; }
.allergen-chip[data-allergen="soya"] { --chip-color: #059669; }
.allergen-chip[data-allergen="susam"] { --chip-color: #92400E; }
.allergen-chip[data-allergen="sut"] { --chip-color: #2563EB; }
.allergen-chip[data-allergen="fistik"] { --chip-color: #7C2D12; }
.allergen-chip[data-allergen="yumurta"] { --chip-color: #D97706; }
.allergen-chip[data-allergen="yumusakca"] { --chip-color: #0D9488; }

/* Diyet Tercihleri Çip Renkleri */
.allergen-chip[data-diet="vegan"] { --chip-color: #10B981; }
.allergen-chip[data-diet="vejetaryen"] { --chip-color: #059669; }
.allergen-chip[data-diet="seker_ilavesiz"] { --chip-color: #EC4899; }
.allergen-chip[data-diet="dusuk_kalorili"] { --chip-color: #3B82F6; }

/* Geri Bildirim Butonu Efekti */
#btn-open-feedback {
    transition: transform 0.2s, background-color 0.2s;
    cursor: pointer;
}
#btn-open-feedback:active {
    transform: scale(0.95);
}

/* Allerjen Seçildiğinde Görünümü (Renkli zemin + beyaz metin) */
.allergen-chip.selected {
    background-color: var(--chip-color);
    border-color: var(--chip-color);
    color: #FFFFFF;
}

.btn-submit-filter {
    background-color: var(--color-dark);
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius-md);
    width: 100%;
    height: 48px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

.btn-submit-filter:hover {
    opacity: 0.9;
}

/* 9. Ürün Detay Modalı */
.detail-modal-img-wrap {
    width: 100%;
    height: 220px;
    flex-shrink: 0;
    position: relative;
    background-color: var(--color-gray-bg);
}

.detail-modal-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-modal-img-wrap.is-studio-img {
    height: 260px;
    background-color: #FFFFFF;
    padding: 12px 16px 6px 16px;
    border-bottom: 1px solid var(--color-border);
}

.detail-modal-img-wrap.is-studio-img img {
    object-fit: contain;
}

@media (min-width: 768px) {
    .detail-modal-img-wrap.is-studio-img {
        height: 310px;
    }
}

.btn-detail-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(45, 30, 24, 0.14);
    color: var(--color-dark);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(45, 30, 24, 0.14);
    z-index: 10;
}

.detail-modal-body {
    padding: 18px 20px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.detail-modal-body h2 {
    font-size: 18px;
    font-weight: 800;
    color: var(--color-text-main);
    margin-bottom: 6px;
}

.detail-modal-body p {
    font-size: 12px;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin-bottom: 14px;
}

.detail-badges-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.detail-chip {
    font-size: 11px;
    font-weight: 600;
    border: 1px solid var(--color-tag-border);
    background-color: var(--color-tag-bg);
    color: var(--color-tag-text);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1.3;
}

.detail-chip.calorie {
    color: var(--color-chocolate);
    border-color: var(--color-sage-border);
    background-color: var(--color-sage-bg);
    font-weight: 700;
}

.detail-chip.allergen-detail-pill {
    background-color: var(--color-tag-bg);
    color: var(--color-tag-text);
    border: 1px solid rgba(74, 55, 40, 0.14);
}

.detail-chip.allergen-detail-pill .allergen-detail-icon {
    font-size: 13px;
}

.detail-modal-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--color-border);
    background-color: var(--color-sidebar-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-price-text {
    font-size: 20px;
    font-weight: 800;
    color: var(--color-primary);
    font-family: var(--font-heading);
}

.btn-detail-add {
    background-color: var(--color-primary);
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius-full);
    padding: 8px 18px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background-color var(--transition-fast);
}

.btn-detail-add:hover {
    background-color: var(--color-primary-dark);
}

/* Adet Kontrolü */
.quantity-controller {
    display: inline-flex;
    align-items: center;
    background-color: var(--color-gray-bg);
    border-radius: var(--radius-full);
    padding: 2px;
}

.btn-qty {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: #FFFFFF;
    border: 1px solid var(--color-border);
    color: var(--color-text-main);
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-val {
    min-width: 28px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--color-text-main);
}

/* 10. Masa Seçim Modalı */
.table-numbers-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 16px 0;
}

.table-num-btn {
    height: 44px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--color-border);
    background-color: #FFFFFF;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    outline: none;
}

.table-num-btn:hover {
    border-color: var(--color-primary);
}

.table-num-btn.active {
    background-color: var(--color-primary-light);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.qr-info-note {
    background-color: var(--color-gray-bg);
    padding: 12px;
    border-radius: var(--radius-md);
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
}

.qr-info-note i {
    font-size: 20px;
    color: var(--color-text-muted);
}

.qr-info-note small {
    font-size: 10px;
    line-height: 1.3;
    color: var(--color-text-muted);
}

.btn-clear-table {
    width: 100%;
    height: 42px;
    background: none;
    border: 1.5px dashed var(--color-primary);
    color: var(--color-primary);
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

/* 11. Yüzen Sepet Çubuğu */
.floating-cart-bar {
    position: fixed;
    bottom: calc(82px + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 500px;
    background-color: var(--color-dark);
    color: #FFFFFF;
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    z-index: 997;
    animation: slideUpCentered 0.3s ease;
}

.cart-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    width: 100%;
}

.cart-bar-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.cart-bar-icon-wrap {
    position: relative;
    font-size: 18px;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--color-primary);
    color: #FFFFFF;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-bar-total {
    display: flex;
    flex-direction: column;
}

.total-label {
    font-size: 9px;
    color: var(--color-text-muted);
    font-weight: 600;
}

.total-value {
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font-heading);
}

.btn-view-cart {
    background: none;
    border: none;
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Sepet Çekmecesi */
.cart-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 88vh;
    max-height: 88dvh;
    background-color: #FFFFFF;
    border-radius: 24px 24px 0 0;
    z-index: 1000;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    animation: slideUp 0.35s ease;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    background: #FFFFFF;
    z-index: 2;
    flex-shrink: 0;
}

.drawer-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-primary);
}

.drawer-title h2 {
    font-size: 15px;
    font-weight: 800;
    color: var(--color-text-main);
}

.btn-drawer-close {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--color-text-muted);
    cursor: pointer;
}

.drawer-body {
    padding: 16px 20px;
    min-height: 120px;
    flex: 1 0 auto;
}

.empty-cart-state {
    text-align: center;
    padding: 30px 10px;
    color: var(--color-text-muted);
}

.empty-cart-icon {
    font-size: 32px;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-gray-bg);
}

.cart-item-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cart-item-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text-main);
}

.cart-item-sub {
    font-size: 10px;
    color: var(--color-text-muted);
}

.cart-item-price {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-primary);
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-delete-cart-item {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 14px;
    cursor: pointer;
    padding: 4px;
}

.btn-delete-cart-item:hover {
    color: var(--color-primary);
}

.drawer-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--color-border);
    background-color: var(--color-sidebar-bg);
}

.drawer-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 14px;
}

/* Değerlendirme Kartı */
.google-review-card {
    background-color: #FFFFFF;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 12px;
    margin-bottom: 12px;
}

.review-card-header {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

.review-gift-icon {
    font-size: 20px;
}

.review-title-group h4 {
    font-size: 11px;
    font-weight: 700;
}

.review-title-group p {
    font-size: 9px;
    color: var(--color-text-muted);
}

.stars-rating-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.star-rating-btn {
    font-size: 16px;
    color: #FFC107;
    cursor: pointer;
}

.btn-google-maps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background-color: var(--color-gray-bg);
    color: var(--color-text-main);
    text-decoration: none;
    height: 32px;
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: 700;
}

/* Sipariş Uyarısı */
.checkout-notice-card {
    background-color: var(--color-primary-light);
    border: 1.5px solid #FFD1D3;
    border-radius: var(--radius-md);
    padding: 10px 12px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.notice-icon {
    font-size: 16px;
    color: var(--color-primary);
}

.notice-text strong {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 2px;
}

.notice-text p {
    font-size: 9px;
    line-height: 1.3;
    color: var(--color-text-main);
}

/* 12. Eşleştirme Bildirimi Toast */
.pairing-toast {
    position: fixed;
    top: 75px;
    left: 5%;
    width: 90%;
    max-width: 400px;
    background-color: #FFFFFF;
    border-left: 4px solid var(--color-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-modal);
    z-index: 1010;
    transform: translateY(-120px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1), opacity 0.3s;
}

.pairing-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.pairing-toast-content {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
}

.pairing-toast-icon {
    font-size: 18px;
    color: var(--color-primary);
}

.pairing-toast-text {
    flex-grow: 1;
}

.pairing-title {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: var(--color-text-main);
    margin-bottom: 2px;
}

.pairing-toast-text p {
    font-size: 10px;
    color: var(--color-text-muted);
    line-height: 1.3;
}

.btn-pairing-action {
    background-color: var(--color-primary);
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.btn-pairing-close {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: 14px;
}

/* 13. AI Chatbot Widget (Karşılama balonu & kırmızı yuvarlak ikon) */
.chat-wrapper {
    position: fixed;
    bottom: calc(24px + env(safe-area-inset-bottom));
    right: 20px;
    z-index: 900;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

body.modal-open .chat-wrapper {
    display: none !important;
}

.chat-wrapper.has-nav,
.chat-wrapper.with-cart {
    bottom: calc(85px + env(safe-area-inset-bottom));
}

.chat-wrapper.has-nav.with-cart {
    bottom: calc(145px + env(safe-area-inset-bottom));
}

/* Karşılama Konuşma Balonu (Callout) */
.chat-welcome-bubble {
    background-color: #FFFFFF;
    color: var(--color-text-main);
    border: 1px solid rgba(194, 99, 83, 0.22);
    border-radius: 18px;
    padding: 12px 38px 12px 16px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 12px 32px rgba(45, 30, 24, 0.12), 0 4px 12px rgba(0, 0, 0, 0.04);
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
    animation: bounceInBubble 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.2);
    max-width: 270px;
}

.chat-welcome-bubble::after {
    content: none;
}

.bubble-text {
    flex-grow: 1 !important;
    line-height: 1.35 !important;
}

.bubble-close-btn {
    background: none !important;
    border: none !important;
    color: var(--color-text-muted) !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    padding: 0 2px !important;
    line-height: 1 !important;
}

.bubble-close-btn:hover {
    color: var(--color-primary) !important;
}

@keyframes bounceInBubble {
    0% { opacity: 0; transform: translateY(12px) scale(0.9); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.bubble-close-btn {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    color: #7D6E66;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    padding: 0 4px;
}

.chat-bubble-tail {
    position: absolute;
    bottom: -6px;
    right: 22px;
    width: 11px;
    height: 11px;
    background: #FFFFFF;
    border-right: 1px solid rgba(194,99,83,0.22);
    border-bottom: 1px solid rgba(194,99,83,0.22);
    transform: rotate(45deg);
}

.chat-toggle-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--color-primary);
    color: #FFFFFF;
    border: none;
    box-shadow: 0 6px 22px rgba(194, 99, 83, 0.45);
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chat-toggle-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 28px rgba(194, 99, 83, 0.6);
}

.chat-badge-dot {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #2E7D32;
    border: 2px solid var(--color-primary);
    display: block;
}

.chat-window {
    width: min(310px, calc(100vw - 36px)); /* Küçük ekranlarda kenardan taşmaz */
    height: min(380px, calc(100dvh - 200px)); /* Viewport'a göre sınırlı */
    background-color: #FFFFFF;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-modal);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: absolute;
    bottom: 56px;
    right: 0;
    animation: scaleInChat 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.15);
    transform-origin: bottom right;
}

@keyframes scaleInChat {
    0% { transform: scale(0.85); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.chat-header {
    background-color: var(--color-primary);
    color: #FFFFFF;
    padding: 12px 16px;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-avatar {
    font-size: 20px;
}

.chat-header-info h3 {
    font-size: 13px;
    font-weight: 800;
}

.chat-header-info span {
    font-size: 9px;
    opacity: 0.85;
}

.chat-messages {
    flex-grow: 1;
    padding: 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background-color: #FAFAFA;
}

.chat-bubble {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 14px;
    font-size: 11.5px;
    line-height: 1.4;
    word-break: break-word;
}

.chat-bubble.bot {
    background-color: #FFFFFF;
    align-self: flex-start;
    border: 1px solid var(--color-border);
    border-top-left-radius: 2px;
    color: var(--color-text-main);
}

.chat-bubble.user {
    background-color: var(--color-primary);
    color: #FFFFFF;
    align-self: flex-end;
    border-top-right-radius: 2px;
}

.chat-bubble.loading {
    display: flex;
    gap: 4px;
    align-self: flex-start;
    background-color: #FFFFFF;
    border: 1px solid var(--color-border);
}

.dot-spin {
    width: 6px;
    height: 6px;
    background-color: var(--color-text-muted);
    border-radius: 50%;
    animation: dotPulse 1.2s infinite ease-in-out;
}
.dot-spin:nth-child(2) { animation-delay: 0.2s; }
.dot-spin:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotPulse {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.3); opacity: 1; }
}

.quick-questions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.quick-q-btn {
    background-color: #FFFFFF;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 5px 8px;
    font-size: 9px;
    font-weight: 700;
    color: var(--color-text-main);
    cursor: pointer;
}

.chat-input-area {
    display: flex;
    padding: 8px;
    border-top: 1px solid var(--color-border);
    background-color: #FFFFFF;
}

.chat-input-area input {
    flex-grow: 1;
    height: 34px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0 10px;
    font-size: 12px;
    outline: none;
}

.chat-send-btn {
    width: 34px;
    height: 34px;
    background-color: var(--color-primary);
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius-sm);
    margin-left: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* AI Chat Tıklanabilir Ürün Linkleri (Premium Tasarım) */
.chat-product-link {
    color: var(--color-primary);
    font-weight: 700;
    text-decoration: underline dashed 1.5px var(--color-primary);
    text-underline-offset: 3px;
    cursor: pointer;
    transition: all var(--transition-fast);
    padding: 1px 4px;
    border-radius: var(--radius-sm);
    display: inline-block;
    background-color: rgba(229, 35, 39, 0.05);
}

.chat-product-link:hover {
    background-color: var(--color-primary);
    color: #FFFFFF;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(229, 35, 39, 0.2);
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   Her platform için GERÇEK farklı görünüm:
   📱 Mobil: Büyük görseller, tek/çift sütun, büyük dokunma hedefleri
   📱 Tablet: Orta görseller, 3 sütun, dengeli boşluklar
   🖥  PC: Geniş düzen, 4-5 sütun, hover efektleri, daha küçük oranlar
   ========================================================================== */

/* ══════════════════════════════════════════════════════════
   📱 MOBİL XS — 320px ve altı (Eski iPhone SE, küçük Android)
   ══════════════════════════════════════════════════════════ */
@media (max-width: 359px) {
    /* Header */
    .header-logo { height: 32px; }
    .table-badge { padding: 5px 9px; font-size: 11px; gap: 4px; }
    .table-badge-icon { font-size: 11px; }
    .lang-trigger-btn { padding: 5px 7px; font-size: 11px; }
    .header-right { gap: 6px; }

    /* Arama */
    .search-filter-row { padding: 10px 10px 6px 10px; gap: 6px; }
    .search-box input { height: 42px; font-size: 13px; }
    .btn-filter-trigger { width: 42px; height: 42px; }

    /* Hava durumu */
    .greeting-mini-bar { padding: 0 10px 8px 10px; font-size: 10px; }

    /* Sidebar — XS'de daha da ince */
    .category-sidebar { width: 62px; min-width: 62px; padding: 10px 0 20px 0; gap: 10px; }
    .category-img-wrap { width: 40px; height: 40px; font-size: 16px; border-radius: 10px; }
    .category-label { font-size: 8.5px; width: 95%; }

    /* Ürün grid — XS'de tek sütun */
    .menu-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .menu-products-scroll-area { padding: 10px 10px 60px 10px; }

    /* Ürün kartı — XS'de yatay card */
    .product-card { flex-direction: row; height: 90px; }
    .product-img-wrap { width: 90px; min-width: 90px; height: 90px; }
    .product-content { padding: 8px 10px; flex-direction: column; justify-content: space-between; }
    .product-title { font-size: 12px; height: auto; -webkit-line-clamp: 2; }
    .product-desc { display: none; }
    .product-badges { margin-bottom: 4px; }
    .product-card-price { font-size: 14px; }

    /* Chatbot */
    .chat-wrapper { right: 8px; bottom: calc(80px + env(safe-area-inset-bottom)); }
    .chat-toggle-btn { width: 42px; height: 42px; font-size: 16px; }
    .chat-window { width: calc(100vw - 16px); right: -4px; height: min(360px, calc(100dvh - 180px)); }
}

/* ══════════════════════════════════════════════════════════
   📱 MOBİL S — 360px–479px (iPhone 12/13/14, Samsung Galaxy)
   Büyük kart görselleri, 2 sütun, büyük dokunma alanları
   ══════════════════════════════════════════════════════════ */
@media (min-width: 360px) and (max-width: 479px) {
    /* Header */
    .header-logo { height: 38px; }
    .table-badge { padding: 7px 12px; font-size: 12px; }
    .header-container { padding: 0 14px; }

    /* Arama */
    .search-filter-row { padding: 12px 12px 8px 12px; }
    .search-box input { height: 44px; font-size: 14px; }
    .btn-filter-trigger { width: 44px; height: 44px; }

    /* Sidebar */
    .category-sidebar { width: 72px; min-width: 72px; gap: 12px; padding: 12px 0 24px 0; }
    .category-img-wrap { width: 48px; height: 48px; font-size: 20px; border-radius: 12px; }
    .category-label { font-size: 9.5px; }

    /* Ürün Grid — Mobilde 2 sütun (taşma önleyici minmax(0,1fr)) */
    .menu-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .menu-products-scroll-area { padding: 10px 10px 70px 10px; }

    /* Ürün kartı — Mobilde büyük görsel, dikey */
    .product-img-wrap { height: 124px; }
    .product-content { padding: 8px 8px 10px 8px; }
    .product-badges { flex-wrap: wrap; height: auto; min-height: 22px; gap: 4px; }
    .product-title { font-size: 12.5px; height: auto; min-height: 32px; }
    .product-desc { font-size: 10px; height: 26px; }
    .product-card-price { font-size: 14px; }
    .btn-card-add-shortcut { width: 28px; height: 28px; } /* Daha büyük dokunma */

    /* Touch hedefleri */
    .nav-item { min-height: 44px; }
    .btn-qty { width: 34px; height: 34px; }
    .btn-modal-close { width: 34px; height: 34px; font-size: 13px; }
    .btn-detail-close { width: 36px; height: 36px; }
    .lang-opt { padding: 12px 14px; font-size: 13px; }
    .allergen-chip { padding: 7px 12px; font-size: 11px; }
    .calorie-chip { padding: 7px 14px; }

    /* Modallar — neredeyse tam genişlik */
    .detail-modal-dialog, .table-modal-dialog {
        width: 96%;
        max-width: none;
        border-radius: 18px;
    }
    .detail-modal-img-wrap { height: 200px; }
    .detail-modal-body h2 { font-size: 17px; }
    .detail-modal-footer { padding: 12px 16px; }
    .detail-price-text { font-size: 18px; }

    /* Chatbot */
    .chat-wrapper { right: 12px; }
    .chat-toggle-btn { width: 46px; height: 46px; }
    .chat-window { width: min(300px, calc(100vw - 24px)); height: min(370px, calc(100dvh - 190px)); }
}

/* ══════════════════════════════════════════════════════════
   📱 MOBİL M — 480px–599px (iPhone Plus, büyük Android)
   ══════════════════════════════════════════════════════════ */
@media (min-width: 480px) and (max-width: 599px) {
    .header-logo { height: 40px; }
    .header-container { padding: 0 16px; }

    .category-sidebar { width: 78px; min-width: 78px; gap: 14px; }
    .category-img-wrap { width: 52px; height: 52px; font-size: 21px; }
    .category-label { font-size: 10px; }

    .menu-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .menu-products-scroll-area { padding: 12px 14px 70px 14px; }
    .product-img-wrap { height: 145px; }
    .product-content { padding: 10px 12px 12px 12px; }
    .product-title { font-size: 13px; }
    .product-card-price { font-size: 15px; }

    .detail-modal-dialog, .table-modal-dialog { width: 92%; max-width: 500px; }
    .detail-modal-img-wrap { height: 220px; }

    .chat-window { width: 320px; height: min(380px, calc(100dvh - 190px)); }
}

/* ══════════════════════════════════════════════════════════
   📱 TABLET KÜÇÜK — 600px–767px (iPad Mini, küçük tablet)
   3 sütun, orta boy görseller
   ══════════════════════════════════════════════════════════ */
@media (min-width: 600px) and (max-width: 767px) {
    body { font-size: 14.5px; }

    .header-logo { height: 44px; }
    .header-container { padding: 0 20px; }
    .table-badge { padding: 9px 16px; font-size: 13px; }
    .lang-trigger-btn { padding: 7px 12px; font-size: 12px; }

    .greeting-mini-bar { padding: 0 20px 10px 20px; }
    .search-filter-row { padding: 14px 20px 8px 20px; }
    .search-box input { height: 46px; }

    /* Sidebar biraz daha geniş */
    .category-sidebar { width: 86px; min-width: 86px; gap: 14px; padding: 14px 0 30px 0; }
    .category-img-wrap { width: 56px; height: 56px; font-size: 22px; border-radius: 14px; }
    .category-label { font-size: 10px; }

    /* Grid — 3 sütun */
    .menu-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 13px;
    }
    .menu-products-scroll-area { padding: 14px 16px 80px 16px; }

    /* Ürün kartı */
    .product-img-wrap { height: 150px; }
    .product-content { padding: 10px 12px 12px 12px; }
    .product-title { font-size: 13px; }
    .product-desc { font-size: 10.5px; }
    .product-card-price { font-size: 15px; }
    .btn-card-add-shortcut { width: 26px; height: 26px; }

    /* Modallar */
    .detail-modal-dialog, .table-modal-dialog { width: 82%; max-width: 520px; }
    .detail-modal-img-wrap { height: 240px; }
    .detail-modal-body h2 { font-size: 19px; }
    .filter-modal-dialog { max-width: 100%; }

    /* Chat */
    .chat-window { width: 330px; height: 400px; }
    .floating-cart-bar { max-width: 580px; }
}

/* ══════════════════════════════════════════════════════════
   📱 TABLET — 768px–1023px (iPad, iPad Air)
   3 sütun, büyük görseller, daha fazla boşluk
   ══════════════════════════════════════════════════════════ */
@media (min-width: 768px) and (max-width: 1023px) {
    body { font-size: 15px; }

    /* Header */
    .main-header {
        height: calc(70px + env(safe-area-inset-top));
    }
    .app-main-content {
        margin-top: calc(70px + env(safe-area-inset-top));
    }
    .header-logo { height: 48px; }
    .header-container { padding: 0 28px; }
    .table-badge { padding: 10px 18px; font-size: 14px; }
    .lang-trigger-btn { padding: 8px 14px; font-size: 13px; }

    .greeting-mini-bar { padding: 0 28px 12px 28px; font-size: 12px; }
    .search-filter-row { padding: 16px 28px 10px 28px; }
    .search-box input { height: 50px; font-size: 15px; }
    .btn-filter-trigger { width: 50px; height: 50px; font-size: 18px; }

    /* Sidebar — tabletde daha geniş */
    .category-sidebar { width: 96px; min-width: 96px; gap: 16px; padding: 16px 0 36px 0; }
    .category-img-wrap { width: 62px; height: 62px; font-size: 24px; border-radius: 16px; }
    .category-label { font-size: 11px; }

    /* Grid — 3 sütun, geniş gap */
    .menu-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 18px;
    }
    .menu-products-scroll-area { padding: 18px 20px 90px 20px; }
    .menu-layout-container { height: calc(100dvh - 210px); }

    /* Ürün kartı — tabletde görseller belirgin şekilde büyük */
    .product-img-wrap { height: 180px; } /* Mobilden 50px daha yüksek */
    .product-content { padding: 14px 16px 16px 16px; }
    .product-title { font-size: 15px; height: 40px; }
    .product-desc { font-size: 11px; height: 30px; }
    .product-card-price { font-size: 18px; }
    .btn-card-add-shortcut { width: 30px; height: 30px; font-size: 13px; }

    /* Badge / Calorie */
    .cal-badge { font-size: 10px; padding: 2px 7px; }
    .allergen-badge-icon { width: 20px; height: 20px; font-size: 10px; }

    /* Bottom nav */
    .bottom-nav { height: calc(76px + env(safe-area-inset-bottom)); }
    .nav-icon { font-size: 22px; }
    .nav-label { font-size: 11px; }

    /* Modallar — tablet ortada */
    .detail-modal-dialog, .table-modal-dialog {
        width: 65%;
        max-width: 580px;
    }
    .detail-modal-img-wrap { height: 280px; }
    .detail-modal-body h2 { font-size: 22px; }
    .detail-modal-body p { font-size: 13px; }
    .detail-price-text { font-size: 24px; }
    .filter-modal-dialog {
        max-width: 100%;
        border-radius: 28px 28px 0 0;
    }

    /* Cart */
    .floating-cart-bar { max-width: 640px; }
    .cart-drawer { max-width: 640px; left: 50%; transform: translateX(-50%); border-radius: 28px 28px 0 0; }

    /* Chat — tabletde daha büyük pencere */
    .chat-wrapper { right: 24px; bottom: calc(88px + env(safe-area-inset-bottom)); }
    .chat-window { width: 360px; height: 440px; }
    .chat-header { padding: 14px 20px; }
    .chat-bubble { font-size: 12.5px; }

    /* Waiter/Bill */
    .waiter-screen-container, .bill-screen-container { padding: 32px 28px 120px 28px; }
    .screen-main-icon { font-size: 56px; }
    .screen-header h2 { font-size: 24px; }
    .waiter-options-grid { grid-template-columns: 1fr 1fr 1fr; max-width: 600px; }
    .btn-primary-red { max-width: 380px; height: 56px; font-size: 16px; }
}

/* ══════════════════════════════════════════════════════════
   🖥  MASAÜSTÜ — 1024px–1279px (Laptop, PC, büyük tablet yatay)
   4 sütun, hover efektleri, daha küçük oranlar, merkezi düzen
   ══════════════════════════════════════════════════════════ */
@media (min-width: 1024px) {
    body { font-size: 15px; }

    /* Header */
    .main-header { height: calc(68px + env(safe-area-inset-top)); }
    .app-main-content { margin-top: calc(68px + env(safe-area-inset-top)); }
    .header-logo { height: 46px; }
    .header-container { padding: 0 32px; max-width: 1200px; }
    .table-badge { padding: 9px 18px; font-size: 13.5px; }

    /* Arama — max genişlik */
    .search-filter-row {
        max-width: 1200px;
        margin: 0 auto;
        padding: 16px 32px 10px 32px;
    }
    .greeting-mini-bar {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 32px 10px 32px;
        font-size: 12px;
    }
    .search-box input { height: 46px; }

    /* Sidebar */
    .category-sidebar { width: 100px; min-width: 100px; gap: 16px; }
    .category-img-wrap { width: 64px; height: 64px; font-size: 24px; }
    .category-label { font-size: 10.5px; }

    /* Grid — PC'de 4 sütun, normal boyut görseller */
    .menu-grid {
        grid-template-columns: 1fr 1fr 1fr 1fr;
        gap: 16px;
    }
    .menu-products-scroll-area { padding: 16px 20px 80px 20px; }
    .menu-layout-container { height: calc(100dvh - 200px); }

    /* Ürün kartı — PC'de görsel DAHA KÜÇÜK (4 sütun sığsın) */
    .product-img-wrap { height: 155px; } /* Tabletten küçük ama mobilden büyük */
    .product-content { padding: 10px 12px 12px 12px; }
    .product-title { font-size: 13.5px; height: 36px; }
    .product-desc { font-size: 10.5px; height: 28px; }
    .product-card-price { font-size: 16px; }
    .btn-card-add-shortcut { width: 26px; height: 26px; font-size: 11px; }

    /* PC'de HOVER efektleri (dokunmatik olmayan) */
    .product-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12);
    }
    .product-card:hover .product-img-wrap img {
        transform: scale(1.08);
    }
    .category-item:hover .category-img-wrap {
        border-color: var(--color-primary);
        background-color: #FFFFFF;
        box-shadow: 0 4px 12px rgba(229, 35, 39, 0.12);
    }

    /* Bottom nav — PC'de ince */
    .bottom-nav { height: 62px; }
    .nav-icon { font-size: 19px; }
    .nav-label { font-size: 10.5px; }

    /* Modallar */
    .detail-modal-dialog, .table-modal-dialog {
        width: 50%;
        max-width: 600px;
    }
    .detail-modal-img-wrap { height: 280px; }
    .detail-modal-body h2 { font-size: 20px; }
    .detail-price-text { font-size: 22px; }
    .filter-modal-dialog {
        max-width: 580px;
        left: 50%;
        transform: translateX(-50%);
        bottom: 20px;
        border-radius: 24px;
    }

    /* Cart */
    .floating-cart-bar { max-width: 580px; }
    .cart-drawer {
        max-width: 580px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 24px 24px 0 0;
    }

    /* Chat */
    .chat-wrapper { right: 28px; }
    .chat-window { width: 370px; height: 450px; }
    .chat-toggle-btn { width: 52px; height: 52px; font-size: 20px; }
}

/* ══════════════════════════════════════════════════════════
   🖥  GENİŞ MASAÜSTÜ — 1280px–1919px (FHD Monitor)
   ══════════════════════════════════════════════════════════ */
@media (min-width: 1280px) {
    .header-container { max-width: 1320px; }
    .search-filter-row { max-width: 1320px; padding: 18px 40px 12px 40px; }
    .greeting-mini-bar { max-width: 1320px; padding: 0 40px 12px 40px; }

    .category-sidebar { width: 110px; min-width: 110px; }
    .category-img-wrap { width: 68px; height: 68px; font-size: 26px; }
    .category-label { font-size: 11px; }

    .menu-grid {
        grid-template-columns: 1fr 1fr 1fr 1fr;
        gap: 20px;
    }
    .menu-products-scroll-area { padding: 20px 24px 90px 24px; }

    /* Görsel yüksekliği PC'de makul */
    .product-img-wrap { height: 165px; }
    .product-title { font-size: 14px; }
    .product-card-price { font-size: 16px; }

    .floating-cart-bar { max-width: 620px; }
    .cart-drawer { max-width: 620px; }
    .chat-window { width: 390px; height: 460px; }
}

/* ══════════════════════════════════════════════════════════
   🖥  4K / ÇOK GENİŞ — 1920px ve üzeri
   ══════════════════════════════════════════════════════════ */
@media (min-width: 1920px) {
    .header-container { max-width: 1600px; }
    .search-filter-row { max-width: 1600px; padding: 20px 48px 14px 48px; }
    .greeting-mini-bar { max-width: 1600px; padding: 0 48px 12px 48px; }
    .view-panel { max-width: 1600px; }

    .category-sidebar { width: 130px; min-width: 130px; }
    .category-img-wrap { width: 76px; height: 76px; font-size: 28px; }
    .category-label { font-size: 11.5px; }

    /* 4K'da 5 sütun */
    .menu-grid {
        grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
        gap: 22px;
    }
    .product-img-wrap { height: 200px; }
    .product-title { font-size: 15px; height: 38px; }
    .product-desc { font-size: 11.5px; height: 32px; }
    .product-card-price { font-size: 18px; }
}

/* ══════════════════════════════════════════════════════════
   📱 YATAY TELEFON (Landscape) — max 900px yatay
   ══════════════════════════════════════════════════════════ */
@media (max-width: 900px) and (orientation: landscape) {
    /* Header daha ince */
    .main-header {
        height: calc(50px + env(safe-area-inset-top));
    }
    .app-main-content {
        margin-top: calc(50px + env(safe-area-inset-top));
    }
    .header-logo { height: 34px; }
    .header-container { padding: 0 16px; }
    .table-badge { padding: 5px 10px; font-size: 11px; }

    .greeting-mini-bar { display: none; } /* Yatayda hava durumu gizle */

    /* Sidebar daha ince */
    .category-sidebar { width: 64px; min-width: 64px; gap: 8px; }
    .category-img-wrap { width: 42px; height: 42px; font-size: 18px; }
    .category-label { display: none; } /* Yatayda label gizle */

    .menu-layout-container { height: calc(100dvh - 120px); }
    .menu-products-scroll-area { padding: 10px 12px 60px 12px; }

    /* Grid — 3 sütun yatayda */
    .menu-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 10px;
    }
    .product-img-wrap { height: 110px; }
    .product-content { padding: 8px 10px 10px 10px; }
    .product-title { font-size: 12px; height: 30px; }
    .product-desc { display: none; }
    .product-card-price { font-size: 13px; }

    /* Bottom nav — yatayda nav label gizle */
    .bottom-nav { height: calc(52px + env(safe-area-inset-bottom)); }
    .nav-label { display: none; }
    .nav-icon { font-size: 20px; }

    /* Floating cart */
    .floating-cart-bar { bottom: calc(62px + env(safe-area-inset-bottom)); }

    /* Chat — yatayda küçük */
    .chat-wrapper { bottom: calc(68px + env(safe-area-inset-bottom)); right: 12px; }
    .chat-window { height: min(280px, calc(100dvh - 90px)); }
}

/* ══════════════════════════════════════════════════════════
   🍎 iOS Safari Özel Düzeltmeler
   ══════════════════════════════════════════════════════════ */
@supports (-webkit-touch-callout: none) {
    .loader-container { min-height: -webkit-fill-available; }
    body { min-height: -webkit-fill-available; }
    .bottom-nav {
        padding-bottom: max(env(safe-area-inset-bottom), 8px);
    }
    /* Momentum scrolling */
    .menu-products-scroll-area { -webkit-overflow-scrolling: touch; }
    .chat-messages { -webkit-overflow-scrolling: touch; }
    .modal-body { -webkit-overflow-scrolling: touch; }
    .filter-modal-dialog { -webkit-overflow-scrolling: touch; }
    .category-sidebar { -webkit-overflow-scrolling: touch; }
}

/* ══════════════════════════════════════════════════════════
   👆 DOKUNMATİK Ekran Optimizasyonu
   ══════════════════════════════════════════════════════════ */
@media (hover: none) and (pointer: coarse) {
    /* Hover animasyonları kaldır — performans için */
    .product-card:hover { transform: none !important; box-shadow: var(--shadow-card) !important; }
    .product-card:hover .product-img-wrap img { transform: none !important; }
    .category-item:hover .category-img-wrap { border-color: transparent; box-shadow: none; }

    /* Aktif state belirgin yap */
    .product-card:active { transform: scale(0.97); opacity: 0.9; transition: none; }
    .btn-primary-red:active { transform: scale(0.96); }
    .nav-item:active { opacity: 0.65; }
    .category-item:active .category-img-wrap { transform: scale(0.94); }

    /* Min touch target 44x44px */
    .btn-qty { width: 36px; height: 36px; }
    .btn-modal-close { width: 36px; height: 36px; font-size: 13px; }
    .btn-detail-close { width: 40px; height: 40px; }
    .btn-drawer-close { font-size: 22px; padding: 4px 8px; }
    .lang-opt { padding: 13px 16px; font-size: 13px; }
    .allergen-chip { padding: 9px 14px; font-size: 11.5px; }
    .calorie-chip { padding: 9px 16px; font-size: 12px; }
    .category-item { padding: 5px 0; }
    .quick-q-btn { padding: 8px 12px; font-size: 10.5px; }
}

/* ══════════════════════════════════════════════════════════
   🖨  Print
   ══════════════════════════════════════════════════════════ */
@media print {
    .bottom-nav, .floating-cart-bar, .chat-wrapper,
    .pairing-toast, .modal-overlay { display: none !important; }
    .app-main-content { margin-top: 0 !important; }
    .menu-layout-container { height: auto !important; overflow: visible !important; }
    .menu-products-scroll-area { overflow: visible !important; height: auto !important; }
    .product-img-wrap { height: 160px !important; }
}

/* ══════════════════════════════════════════════════════════
   🔥 Happy Hour & Kampanya Bannerı Stilleri (Sıcak Kiremit & Terracotta)
   ══════════════════════════════════════════════════════════ */
.happy-hour-banner {
    background: linear-gradient(135deg, #C26353 0%, #D97757 50%, #E89A6A 100%);
    color: #FFFFFF;
    border-radius: var(--radius-md);
    padding: 10px 16px;
    margin: 10px 16px 6px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    box-shadow: 0 4px 14px rgba(194, 99, 83, 0.25);
    animation: fadeInSlide 0.3s ease;
}

.hh-banner-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    overflow: hidden;
}

.hh-badge {
    background: rgba(45, 30, 24, 0.3);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.hh-text {
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hh-discount-badge {
    background: #FFFFFF;
    color: #C26353;
    font-weight: 900;
    font-size: 0.88rem;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.happy-hour-tag {
    background: linear-gradient(135deg, #C26353, #D97757);
    color: #FFFFFF;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 4px;
}

.happy-hour-old-price {
    text-decoration: line-through;
    color: #9CA3AF;
    font-size: 0.82em;
    margin-right: 5px;
    font-weight: 500;
}

/* ══════════════════════════════════════════════════════════
   🎛 Ürün Varyasyon & Ekstra Seçenekleri (Modal İçi)
   ══════════════════════════════════════════════════════════ */
.detail-options-container {
    background: #F8F9FA;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-top: 14px;
}

.detail-options-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text-main);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-options-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.option-checkbox-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #FFFFFF;
    border: 1px solid var(--color-border);
    padding: 9px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.option-checkbox-row:hover {
    border-color: #CBD5E1;
}

.option-checkbox-row.selected {
    border-color: var(--color-primary);
    background: #FFF5F5;
}

.option-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.option-custom-check {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1.5px solid #CBD5E1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: transparent;
    transition: all 0.15s ease;
}

.option-checkbox-row.selected .option-custom-check {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #FFFFFF;
}

.option-name-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-text-main);
}

.option-price-tag {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--color-primary);
}

/* ══════════════════════════════════════════════════════════
   ✨ Sepet İçi Akıllı Çapraz Satış (Upselling)
   ══════════════════════════════════════════════════════════ */
.cart-upsell-container {
    background: #FFF8F8;
    border: 1px dashed rgba(229, 35, 39, 0.35);
    border-radius: var(--radius-md);
    padding: 12px;
    margin-bottom: 14px;
}

.upsell-header {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--color-dark);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.cart-upsell-items {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.cart-upsell-items::-webkit-scrollbar {
    height: 3px;
}
.cart-upsell-items::-webkit-scrollbar-thumb {
    background: #E5E7EB;
    border-radius: 4px;
}

.upsell-card {
    background: #FFFFFF;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 190px;
    flex-shrink: 0;
}

.upsell-img {
    width: 38px;
    height: 38px;
    border-radius: 6px;
    object-fit: cover;
}

.upsell-info {
    flex: 1;
    overflow: hidden;
}

.upsell-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upsell-price {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-primary);
}

.btn-upsell-add {
    background: var(--color-primary-light);
    color: var(--color-primary);
    border: 1px solid rgba(229, 35, 39, 0.2);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.15s ease;
}

.btn-upsell-add:hover {
    background: var(--color-primary);
    color: #FFFFFF;
}

@keyframes fadeInSlide {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════════════════
   🇸🇦 ARAPÇA RTL (RIGHT-TO-LEFT) DÜZEN KURALLARI
   ══════════════════════════════════════════════════════════ */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .main-header .header-container {
    flex-direction: row-reverse;
}

[dir="rtl"] .search-box input {
    padding-right: 44px;
    padding-left: 44px;
    text-align: right;
}

[dir="rtl"] .search-box .search-icon {
    right: 14px;
    left: auto;
}

[dir="rtl"] .search-box .search-clear-btn {
    left: 12px;
    right: auto;
}

[dir="rtl"] .lang-dropdown-menu,
[dir="rtl"] .sort-dropdown-menu {
    left: 0;
    right: auto;
    transform-origin: top left;
}

[dir="rtl"] .quantity-controller {
    flex-direction: row-reverse;
}

[dir="rtl"] .chat-wrapper {
    left: 20px !important;
    right: auto !important;
    align-items: flex-start !important;
}

[dir="rtl"] .chat-window {
    left: 0;
    right: auto;
    transform-origin: bottom left;
}

[dir="rtl"] .chat-welcome-bubble .bubble-close-btn {
    left: 12px;
    right: auto;
}

[dir="rtl"] .chat-welcome-bubble .chat-bubble-tail {
    left: 22px;
    right: auto;
}

[dir="rtl"] .chat-bubble.user {
    align-self: flex-start;
    border-radius: 18px 18px 18px 4px;
}

[dir="rtl"] .chat-bubble.bot {
    align-self: flex-end;
    border-radius: 18px 18px 4px 18px;
}

[dir="rtl"] .btn-detail-close,
[dir="rtl"] .btn-modal-close,
[dir="rtl"] .btn-drawer-close {
    left: 16px;
    right: auto;
}

/* --- Mobil UX İyileştirmeleri: Dokunma Hedefleri, Kaydırma Payı ve Yukarı Çık Butonu --- */
html {
    scroll-padding-top: 76px;
}

.menu-subgroup-header {
    scroll-margin-top: 16px;
}

.feedback-header-btn {
    min-height: 38px;
}

.lang-trigger-btn {
    min-height: 38px;
    min-width: 56px;
    justify-content: center;
}

.btn-pairing-action {
    min-height: 36px;
    padding: 8px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-pairing-close {
    min-width: 36px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.bubble-close-btn {
    min-width: 34px !important;
    min-height: 34px !important;
    top: 4px !important;
    right: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50%;
}

[dir="rtl"] .chat-welcome-bubble .bubble-close-btn {
    left: 6px;
    right: auto;
}

@media (max-width: 599px) {
    .btn-card-add-shortcut {
        min-width: 34px;
        min-height: 34px;
    }
}

.btn-scroll-top {
    position: fixed;
    bottom: calc(24px + env(safe-area-inset-bottom));
    left: 92px;
    z-index: 880;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(194, 99, 83, 0.28);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(8px);
    color: var(--color-primary);
    box-shadow: 0 6px 18px rgba(45, 30, 24, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px) scale(0.92);
    transition: opacity 0.22s ease, transform 0.22s ease, background-color 0.2s ease;
}

.btn-scroll-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.btn-scroll-top:hover {
    background: var(--color-primary);
    color: #FFFFFF;
}

.btn-scroll-top.has-nav,
.btn-scroll-top.with-cart {
    bottom: calc(85px + env(safe-area-inset-bottom));
}

.btn-scroll-top.has-nav.with-cart {
    bottom: calc(145px + env(safe-area-inset-bottom));
}

body.modal-open .btn-scroll-top {
    display: none !important;
}

@media (max-width: 359px) {
    .btn-scroll-top {
        left: 72px;
        width: 38px;
        height: 38px;
    }
}

@media (min-width: 360px) and (max-width: 479px) {
    .btn-scroll-top {
        left: 84px;
    }
}

[dir="rtl"] .btn-scroll-top {
    left: auto;
    right: 92px;
}

@media (max-width: 479px) {
    [dir="rtl"] .btn-scroll-top {
        right: 84px;
    }
}

