/* ============================================
   TEMA: MODERN
   Box-gece temasından ilham alınmış modern tasarım
   Gündüz ve Gece modu destekli
   ============================================ */

/* ============================================
   GÜNDÜZ MODU (Varsayılan)
   ============================================ */
:root {
    /* Ana Renkler */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --primary-rgb: 99, 102, 241;
    
    /* Accent Renkler */
    --accent: #10b981;
    --accent-dark: #059669;
    
    /* Arka Plan Renkleri */
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-secondary: #f1f5f9;
    --bg-tertiary: #e2e8f0;
    --bg-overlay: rgba(99, 102, 241, 0.05);
    
    /* Text Renkleri */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-light: #cbd5e1;
    
    /* Border & Shadow */
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    
    /* Border Radius */
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
}

/* ============================================
   GECE MODU
   ============================================ */
[data-mode="gece"] {
    /* Ana Renkler */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --primary-rgb: 99, 102, 241;
    
    /* Accent Renkler */
    --accent: #f59e0b;
    --accent-dark: #d97706;
    
    /* Arka Plan Renkleri */
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-overlay: rgba(99, 102, 241, 0.1);
    
    /* Text Renkleri */
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-light: #64748b;
    
    /* Border & Shadow */
    --border-color: #334155;
    --border-light: #475569;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 25px rgba(0, 0, 0, 0.5);
}

/* ============================================
   GENEL STİLLER
   ============================================ */
body {
    background: linear-gradient(135deg, var(--bg-main) 0%, var(--bg-secondary) 100%);
    background-attachment: fixed;
    color: var(--text-primary);
}

/* ============================================
   HEADER & RESTORAN BİLGİLERİ
   ============================================ */
.menu-header {
    background: var(--bg-card);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

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

.restaurant-logo {
    /* Border kaldırıldı */
}

.restaurant-name {
    color: var(--text-primary);
    font-weight: 800;
}

.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);
    backdrop-filter: blur(10px);
}

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

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

.language-bar a.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.4);
}

/* ============================================
   KATEGORİLER - Yatay Slider (Modern Box Style)
   ============================================ */
.categories-slider {
    background: var(--bg-card);
    padding: 12px 0;
    border-bottom: 2px solid var(--border-color);
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

.categories-slider::-webkit-scrollbar {
    height: 5px;
}

.categories-slider::-webkit-scrollbar-track {
    background: rgba(var(--primary-rgb), 0.1);
    border-radius: 10px;
    margin: 0 10px;
}

.categories-slider::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.categories-container {
    display: inline-flex;
    gap: 10px;
    padding: 0 20px;
    justify-content: flex-start;
}

/* Masaüstü görünümde kategori menüsünü ortala */
@media (min-width: 769px) {
    .categories-slider {
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .categories-container {
        justify-content: center;
        max-width: 100%;
    }
}

.category-item {
    flex-shrink: 0;
    width: 150px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-item:hover {
    transform: translateY(-4px);
}

.category-image {
    width: 150px;
    height: 150px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow);
    border: 1px solid rgba(var(--primary-rgb), 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-tertiary);
}

.category-item.active .category-image {
    box-shadow: inset 0 0 0 2px var(--primary),
                0 2px 8px rgba(var(--primary-rgb), 0.2);
}

.category-item.active .category-image img {
    filter: blur(0px) brightness(1.05);
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(0.5px) brightness(0.98);
    transition: all 0.3s ease;
}

.category-item:hover .category-image img {
    filter: blur(0px) brightness(1.02);
    transform: scale(1.03);
}

.category-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.7));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: clamp(11px, 2.5vw, 14px);
    text-align: center;
    padding: 10px 8px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.8);
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    white-space: normal;
    line-height: 1.2;
    overflow: hidden;
}

/* ============================================
   ÜRÜNLER - Liste Görünümü (Modern Box Style)
   ============================================ */
.products-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
    min-height: calc(100vh - 280px);
}

.category-products {
    animation: fadeInScale 0.4s ease-out;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 15px 0 10px 0;
}

/* Masaüstü görünümünde ürünler 2'şer tane yan yana */
@media (min-width: 768px) {
    .category-products.active {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        flex-direction: unset !important;
        padding: 15px 0 10px 0 !important;
    }

    .category-products.active .product-item {
        margin-bottom: 0 !important;
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.98) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.product-item {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: row;
    cursor: default;
    position: relative;
    backdrop-filter: blur(10px);
    margin-bottom: 12px;
    align-items: stretch;
    height: fit-content;
    max-height: 100px;
}

.product-item.has-detail {
    cursor: pointer;
}

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

.product-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.05) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.product-item:hover::after {
    opacity: 1;
}

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

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.product-info {
    flex: 1;
    padding: 8px 12px 8px 12px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-width: 0;
    gap: 0;
    height: 100px;
    max-height: 100px;
    overflow: visible;
}

.product-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    margin: 0 0 4px 0;
    flex-shrink: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    height: 19.5px;
}

.product-footer {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    flex-shrink: 0;
    position: relative;
    padding-top: 0;
    padding-bottom: 4px;
    border-top: 1px solid var(--border-light);
    margin-top: 0;
    min-height: 28px;
    max-height: 28px;
}

.product-detail-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 8px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    z-index: 10;
    pointer-events: auto;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
    flex-shrink: 0;
    line-height: 1.3;
    height: 19.5px;
    box-sizing: border-box;
}

.product-detail-indicator:hover {
    background: rgba(0, 0, 0, 0.95);
    transform: scale(1.05);
}

.product-detail-indicator i {
    font-size: 8px;
}

.product-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    line-height: 1.2;
    min-height: 20px;
    padding-bottom: 0;
    padding-top: 0;
    margin-top: 0;
    margin-bottom: 0;
    height: fit-content;
}

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

.product-price .discount-price {
    font-size: 13px;
    font-weight: 700;
    color: #ef4444;
    display: inline-block;
}

.product-description {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.5;
    margin: 0 0 2px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
    flex-shrink: 0;
    min-height: 42px;
    max-height: 42px;
}

/* Açıklama olmayan ürünler için boş alan */
.product-info:not(:has(.product-description)) .product-name {
    margin-bottom: 26px;
}

.product-item:hover .product-description {
    color: var(--text-primary);
}

/* ============================================
   MODAL
   ============================================ */
.modal-content {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
}

.modal-header {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(var(--primary-rgb), 0.05) 100%);
    border-bottom: 2px solid rgba(var(--primary-rgb), 0.2);
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px 30px;
}

.modal-title {
    color: var(--primary);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    text-align: left;
    line-height: 1.3;
    padding-right: 40px;
}

.modal-close {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.modal-close:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.modal-product-image {
    width: 100%;
    max-height: 400px;
    margin-bottom: 20px;
    border-radius: var(--radius-lg);
    overflow: visible;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    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-description {
    color: var(--text-secondary);
}

/* Porsiyon fiyatları */
.portion-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--accent);
    margin: 20px 0 16px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(var(--primary-rgb), 0.2);
}

.portions-list {
    display: grid;
    gap: 14px;
}

.portion-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.05) 0%, rgba(var(--primary-rgb), 0.02) 100%);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.portion-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.1) 0%, rgba(var(--primary-rgb), 0.05) 100%);
}

.portion-name {
    font-weight: 600;
    color: var(--text-primary);
}

.portion-price {
    font-weight: 700;
    color: var(--accent);
    font-size: 17px;
}

/* ============================================
   SERVİS BUTONLARI
   ============================================ */
.service-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #ffffff;
}

.service-btn:hover {
    box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.4);
}

.feedback-btn {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #ffffff;
}

.feedback-btn:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* ============================================
   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(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #ffffff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

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

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

/* ============================================
   TOAST
   ============================================ */
.toast {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--primary);
    box-shadow: 0 8px 24px rgba(var(--primary-rgb), 0.3);
    backdrop-filter: blur(10px);
}

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

.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) {
    .category-item {
        width: 120px;
    }

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

    .product-item {
        flex-direction: row;
        min-height: 90px;
        max-height: 90px;
        margin-bottom: 10px;
    }

    .product-image {
        width: 90px;
        height: 90px;
        min-width: 90px;
    }
    
    .product-info {
        height: 90px;
        max-height: 90px;
        padding: 6px 10px 4px 10px;
        gap: 0;
        overflow: visible;
    }
    
    .product-name {
        font-size: 14px;
        margin-bottom: 3px;
        line-height: 1.3;
        height: 18.2px;
    }
    
    .product-description {
        font-size: 11px;
        margin-bottom: 2px;
        min-height: 28px;
        max-height: 28px;
        line-height: 1.4;
    }
    
    .product-footer {
        position: relative;
        padding-top: 8px;
        padding-bottom: 4px;
        border-top: 1px solid var(--border-light);
        margin-top: 0;
        align-items: center;
        justify-content: center;
        min-height: 26px;
        max-height: 26px;
    }
    
    .product-price {
        font-size: 13px;
        min-height: 18px;
        justify-content: center;
        gap: 5px;
        line-height: 1.2;
        padding-bottom: 0;
        padding-top: 0;
        margin-top: 0;
        flex-direction: row;
        align-items: center;
        flex-shrink: 0;
    }
    
    .product-price .original-price {
        font-size: 10px;
    }
    
    .product-price .discount-price {
        font-size: 12px;
    }
    
    .product-detail-indicator {
        top: 6px;
        right: 6px;
        padding: 1px 5px;
        font-size: 7px;
        height: 18.2px;
        line-height: 1.3;
        box-sizing: border-box;
    }
    
    .product-detail-indicator i {
        font-size: 7px;
    }
    
    .product-footer {
        align-items: center;
        justify-content: flex-start;
    }
    
    .product-description {
        min-height: 38px;
        max-height: 38px;
    }

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

    .product-price {
        font-size: 11px;
    }
    
    .product-price .original-price {
        font-size: 9px;
    }
    
    .product-price .discount-price {
        font-size: 11px;
    }

    .product-description {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }
}

@media (max-width: 480px) {
    .category-item {
        width: 110px;
    }

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

    .product-item {
        min-height: 110px;
    }

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

    .product-info {
        padding: 12px 14px;
    }

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

    .product-price {
        font-size: 11px;
        padding: 4px 8px;
    }

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