/* ============================================
   TEMA: MİNİMAL
   Sade ve temiz tasarım
   Gündüz ve Gece modu destekli
   ============================================ */

/* ============================================
   GÜNDÜZ MODU (Varsayılan)
   ============================================ */
:root {
    /* Ana Renkler */
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --primary-rgb: 37, 99, 235;
    
    /* Accent Renkler */
    --accent: #0891b2;
    --accent-dark: #0e7490;
    
    /* Arka Plan Renkleri */
    --bg-main: #ffffff;
    --bg-card: #fafafa;
    --bg-secondary: #f5f5f5;
    --bg-tertiary: #e5e5e5;
    --bg-overlay: rgba(37, 99, 235, 0.03);
    
    /* Text Renkleri */
    --text-primary: #171717;
    --text-secondary: #525252;
    --text-muted: #737373;
    --text-light: #a3a3a3;
    
    /* Border & Shadow */
    --border-color: #e5e5e5;
    --border-light: #f5f5f5;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.08);
    
    /* Border Radius */
    --radius: 6px;
    --radius-lg: 10px;
    --radius-xl: 14px;
}

/* ============================================
   GECE MODU
   ============================================ */
[data-mode="gece"] {
    /* Ana Renkler */
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --primary-rgb: 59, 130, 246;
    
    /* Accent Renkler */
    --accent: #06b6d4;
    --accent-dark: #0891b2;
    
    /* Arka Plan Renkleri - Yumuşatılmış */
    --bg-main: #1a1a1a;
    --bg-card: #242424;
    --bg-secondary: #2a2a2a;
    --bg-tertiary: #303030;
    --bg-overlay: rgba(59, 130, 246, 0.05);
    
    /* Text Renkleri */
    --text-primary: #f5f5f5;
    --text-secondary: #d9d9d9;
    --text-muted: #b0b0b0;
    --text-light: #808080;
    
    /* Border & Shadow - Yumuşatılmış */
    --border-color: #303030;
    --border-light: #353535;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.5);
}

/* ============================================
   GENEL STİLLER
   ============================================ */
body {
    background: var(--bg-main);
    color: var(--text-primary);
}

/* ============================================
   HEADER & RESTORAN BİLGİLERİ
   ============================================ */
.menu-header {
    background: var(--bg-card);
    box-shadow: var(--shadow);
    margin-bottom: 0;
    margin-top: 0;
    padding-top: 0;
}

.restaurant-info {
    padding: 8px 20px !important;
    margin-top: 0 !important;
}

.restaurant-info:not(.has-header-bg) {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
}

/* Dil seçici kapalı iken restoran bilgisi ile üst arasındaki boşluğu azalt */
.language-bar:empty ~ .restaurant-info,
.language-bar[style*="display: none"] ~ .restaurant-info,
body:not(:has(.language-bar)) .restaurant-info {
    margin-top: 0 !important;
    padding-top: 5px !important;
}

.restaurant-logo {
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.restaurant-name {
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.contact-info {
    color: var(--text-secondary);
}

.contact-info a {
    color: var(--text-secondary);
}

/* ============================================
   DİL SEÇİCİ
   ============================================ */
.language-bar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 8px;
}

.language-bar a {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    font-weight: 500;
}

.language-bar a:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.language-bar a.active {
    background: var(--text-primary);
    color: var(--bg-main);
    border-color: var(--text-primary);
}

/* ============================================
   KATEGORİLER - Tabs (Sekmeler)
   ============================================ */
.categories-tabs {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    margin-bottom: 0;
}

.tabs-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.tabs-container::-webkit-scrollbar {
    display: none;
}

.tab-item {
    flex-shrink: 0;
    padding: 18px 30px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    color: var(--text-secondary);
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
}

.tab-item:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.tab-item.active {
    color: var(--text-primary);
    border-bottom-color: var(--text-primary);
    background: var(--bg-secondary);
}

.tab-item.active::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--text-primary);
}

/* ============================================
   ÜRÜNLER - Grid Görünümü (Minimal)
   ============================================ */
.products-container {
    max-width: 1200px;
    margin: 15px auto 20px auto;
    padding: 0 20px;
    min-height: calc(100vh - 300px);
    padding-bottom: 30px;
}

.category-products {
    animation: fadeIn 0.3s ease-out;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin-top: 10px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.product-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-item:hover {
    border-color: var(--text-primary);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.product-image {
    width: 100%;
    height: 140px;
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

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

.product-item:hover .product-image img {
    transform: scale(1.08);
}

.product-info {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.product-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    margin: 0;
    flex: 1;
    letter-spacing: -0.01em;
}

.product-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    flex-shrink: 0;
}

/* İndirimli Fiyat */
.product-price .original-price {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: line-through;
    display: block;
    margin-bottom: 1px;
}

.product-price .discount-price {
    font-size: 15px;
    font-weight: 700;
    color: #dc2626;
}

.product-description {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Detay Butonu */
.product-detail-indicator {
    padding: 4px 8px !important;
    border-radius: 12px !important;
    font-size: 9px !important;
    font-weight: 600 !important;
    gap: 3px !important;
    height: auto !important;
    min-height: 18px !important;
}

.product-detail-indicator i {
    font-size: 9px !important;
}

.product-detail-indicator span {
    font-size: 9px !important;
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
}

.modal-content {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 420px;
    max-height: 90vh;
    overflow: hidden;
}

.modal-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 28px;
    height: 28px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: all 0.2s ease;
    padding: 0;
}

.modal-close:hover {
    background: var(--text-primary);
    color: var(--bg-main);
    border-color: var(--text-primary);
}

.modal-product-image {
    width: 100%;
    max-height: 400px;
    margin-bottom: 16px;
    border-radius: var(--radius);
    overflow: visible;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-sizing: border-box;
}

.modal-product-image img {
    width: 100%;
    height: auto;
    max-height: 380px;
    object-fit: contain;
    display: block;
    border-radius: 8px;
}

.modal-title {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 20px;
    margin: 0;
    padding-right: 40px;
    line-height: 1.3;
}

.modal-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.modal-price .original-price {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: line-through;
    opacity: 0.7;
}

.modal-price .discount-price {
    font-size: 20px;
    font-weight: 700;
    color: #dc2626;
}

.modal-body {
    padding: 16px;
    max-height: calc(90vh - 100px);
    overflow-y: auto;
}

/* Yükleme efektlerini kaldır */
.modal-body,
.modal-description.lazy-load,
.modal-section.lazy-load {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

.modal-description {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.modal-section {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

.modal-section:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

/* Porsiyon fiyatları */
.portion-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    letter-spacing: -0.01em;
}

.portions-list {
    display: grid;
    gap: 8px;
    background: transparent;
    border-radius: var(--radius);
}

.portion-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.portion-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.portion-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.portion-price {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.portion-price .original-price {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-right: 6px;
}

.portion-price .discount-price {
    font-size: 15px;
    font-weight: 700;
    color: #dc2626;
}

/* Hazırlama süresi */
#modalPreparationTime {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius) !important;
    box-shadow: none !important;
    padding: 10px 12px !important;
    margin-top: 14px !important;
}

#modalPreparationTime strong {
    color: var(--text-primary) !important;
    font-size: 12px !important;
}

#modalPreparationTime span {
    color: var(--text-primary) !important;
    font-size: 14px !important;
}

/* Alerjenler - Modern tema stili */
#modalAllergens {
    margin-top: 14px !important;
    padding-top: 14px !important;
    border-top: 1px solid var(--border-color) !important;
}

#modalAllergens h4 {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    margin-bottom: 10px !important;
}

#modalAllergensList {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

#modalAllergensList .allergen-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 6px 10px !important;
    background: #fff3cd !important;
    border: 1px solid #ffc107 !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    color: #856404 !important;
    font-weight: 500 !important;
}

#modalAllergensList .allergen-badge span {
    display: inline-flex;
    align-items: center;
}

/* ============================================
   SERVİS BUTONLARI
   ============================================ */
.service-btn {
    background: var(--text-primary);
    color: var(--bg-main);
}

.service-btn:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.feedback-btn {
    background: var(--text-secondary);
    color: var(--bg-main);
}

.feedback-btn:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* ============================================
   FORM ELEMENTLERİ
   ============================================ */
.form-group input,
.form-group textarea,
.form-group select {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    background: var(--bg-card);
    border-color: var(--text-primary);
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-main);
}

.btn-primary:hover {
    background: var(--text-secondary);
}

/* Rating yıldızları */
.rating-stars i {
    color: var(--border-color);
}

.rating-stars i.active {
    color: var(--text-primary);
}

/* ============================================
   TOAST
   ============================================ */
.toast {
    background: var(--text-primary);
    color: var(--bg-main);
    border: none;
    box-shadow: var(--shadow-lg);
}

/* ============================================
   BOŞ DURUM
   ============================================ */
.empty-state {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.empty-state i {
    color: var(--text-muted);
}

.empty-state h3 {
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-secondary);
}

/* ============================================
   RESPONSİVE
   ============================================ */
@media (max-width: 768px) {
    .products-container {
        margin: 12px auto 15px auto;
        padding-bottom: 25px;
    }

    .category-products {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 12px;
        margin-top: 8px;
    }

    .restaurant-info {
        padding: 8px 15px !important;
    }

    .category-item {
        width: 95px;
    }

    .category-image {
        width: 95px;
        height: 95px;
    }

    .product-item {
        flex-direction: row;
    }

    .product-image {
        width: 100px;
        height: 100px;
        min-width: 100px;
    }

    .product-info {
        padding: 10px 12px;
        gap: 6px;
    }

    .product-name {
        font-size: 13px;
    }

    .product-price {
        font-size: 13px;
    }

    .product-price .discount-price {
        font-size: 14px;
    }

    .product-description {
        font-size: 11px;
    }

    /* Modal responsive */
    .modal-content {
        max-width: 90%;
        margin: 15px auto;
    }

    .modal-header {
        padding: 16px 15px;
        gap: 6px;
    }

    .modal-body {
        padding: 14px 15px;
    }
}

@media (max-width: 480px) {
    .products-container {
        margin: 10px auto 15px auto;
        padding: 0 10px;
        padding-bottom: 20px;
    }

    .category-products {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 6px;
    }

    .product-item {
        width: 100%;
        max-width: 100%;
    }

    .restaurant-info {
        padding: 6px 12px !important;
    }

    .category-item {
        width: 85px;
    }

    .category-image {
        width: 85px;
        height: 85px;
    }

    .product-image {
        width: 100px;
        height: 100px;
        min-width: 100px;
    }

    .product-info {
        padding: 10px 12px;
        gap: 6px;
    }

    .product-name {
        font-size: 12px;
    }

    .product-price {
        font-size: 12px;
    }

    .product-price .discount-price {
        font-size: 13px;
    }

    .product-description {
        font-size: 10px;
    }

    /* Modal responsive */
    .modal-content {
        max-width: 95%;
        max-height: 95vh;
        margin: 10px auto;
    }

    .modal-header {
        padding: 14px 14px;
        gap: 5px;
    }

    .modal-close {
        width: 24px;
        height: 24px;
        top: 10px;
        right: 10px;
        font-size: 15px;
    }

    .modal-title {
        font-size: 16px;
        padding-right: 32px;
    }

    .modal-price {
        font-size: 15px;
    }

    .modal-price .discount-price {
        font-size: 17px;
    }

    .modal-price .original-price {
        font-size: 13px;
    }

    .modal-body {
        padding: 12px 14px;
    }

    #modalAllergensList .allergen-badge {
        padding: 5px 8px !important;
        font-size: 11px !important;
        gap: 3px !important;
    }
    
    #modalAllergens h4 {
        font-size: 13px !important;
        margin-bottom: 8px !important;
    }

    .modal-description {
        font-size: 13px;
    }

    .portion-title {
        font-size: 13px;
    }

    .portion-item {
        padding: 10px 12px;
    }

    .portion-name {
        font-size: 13px;
    }

    .portion-price {
        font-size: 13px;
    }
}
