@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --brand-orange: #fd7e14;
    --brand-dark: #333;
    --text-muted: #777;
    --bg-light: #f8f9fa;
    --border-radius: 12px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--brand-dark);
    padding-bottom: 80px; /* Alt bar için boşluk */
    margin: 0;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; padding: 0; margin: 0; }

/* ================================================== */
/* HEADER & LOGO (RESPONSIVE VE DÜZELTİLMİŞ TASARIM) */
/* ================================================== */

/* --- GENEL (Masaüstü Varsayılanı) --- */
.site-header {
    background-color: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    z-index: 1000;
    /* Paddingler menu.php içindeki py-3 sınıfından geliyor */
}

.header-container {
    /* Masaüstünde yan yana düzen */
    flex-direction: row !important; 
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important; /* Taşmayı engelle */
}

.brand-section {
    /* Logo ve yazılar yan yana */
    flex-direction: row !important;
    align-items: center !important;
    margin-bottom: 0 !important; /* Alt boşluğu sıfırla */
    margin-right: 1rem; /* Sağdaki butonlarla mesafe */
    flex-grow: 1; /* Mümkün olduğunca yer kapla */
    min-width: 0; /* Flexbox içinde text-truncate çalışması için kritik! */
}

.logo-img {
    max-height: 60px; /* Masaüstü için optimum boyut */
    width: auto;
    object-fit: contain;
    border-radius: var(--border-radius);
    margin-bottom: 0 !important; /* Alt boşluğu sıfırla */
    margin-right: 1rem !important; /* Yazı ile mesafe */
}

.restoran-adi {
    font-weight: 800;
    line-height: 1.2;
    color: #000;
    /* MASAÜSTÜ DÜZELTMESİ: Uzun isimler taşmasın, tek satırda kalsın */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* text-align: center; kaldırıldı */
}

.hosgeldin-yazisi {
    font-size: 0.9rem;
    color: var(--text-muted);
    /* text-align: center; kaldırıldı */
}

.buttons-section {
    margin-top: 0 !important; /* Üst boşluğu sıfırla */
    width: auto !important;   /* Genişliği içeriğe göre ayarla */
    flex-shrink: 0;           /* Küçülme, sabit kal */
}


/* --- SADECE MOBİL CİHAZLAR İÇİN (768px altı) --- */
@media (max-width: 768px) {
    .site-header {
        padding-top: 1rem !important; /* py-3'ü biraz kıstık */
        padding-bottom: 0.8rem !important;
    }

    .header-container {
        /* Mobilde ALT ALTA düzen */
        flex-direction: column !important;
        align-items: flex-start !important; /* Sola dayalı */
    }

    .brand-section {
        /* Logo ve yazılar YAN YANA kalacak */
        flex-direction: row !important;
        align-items: center !important;
        margin-bottom: 0.8rem !important; /* Alt satırdaki butonlarla mesafe */
        margin-right: 0 !important;
        width: 100%; /* Tam genişlik */
    }
    
    .logo-img {
        max-height: 50px; /* Mobilde biraz daha kompakt */
        margin-right: 0.8rem !important;
    }
    
    .restoran-adi {
        font-size: 1.3rem; /* Mobilde fontu biraz küçült */
        /* Mobilde de uzun isimler taşmasın */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .hosgeldin-yazisi {
        font-size: 0.85rem;
    }

    .buttons-section {
        /* Butonlar alt satırda */
        margin-top: 0 !important;
        width: 100% !important; /* Tam genişlik */
        justify-content: center !important; /* Sola dayalı */
        gap: 0.8rem !important; /* Butonlar arası mesafe */
    }
    
    /* Buton boyutlarını mobilde biraz küçültelim ki sığsınlar */
    .btn-circle-white, .btn-loyalty {
        width: 38px !important;
        height: 38px !important;
    }
    .btn-circle-white i, .btn-loyalty i {
        font-size: 1.1rem !important;
    }
    .btn-lang-select {
        padding: 6px 12px !important;
        font-size: 0.85rem !important;
    }
}


/* --- DİĞER BİLEŞENLER (Eski haliyle aynı) --- */
/* Dil Butonu & Araçlar */
.btn-lang-select {
    background: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 25px;
    padding: 8px 15px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    transition: 0.3s;
}
.btn-lang-select:hover { background: #eee; }

.btn-circle-white {
    /* Boyutlar medya sorgusunda ayarlandı */
    background: #fff; border: 1px solid #eee;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: 0.2s; cursor: pointer;
}
.btn-circle-white:active { transform: scale(0.95); }

.btn-loyalty {
    /* Boyutlar medya sorgusunda ayarlandı */
    border-radius: 50%; border: none;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #fff; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 3px 6px rgba(255, 165, 0, 0.3);
}

/* Sepet Rozeti */
.sepet-badge {
    position: absolute; 
    background: #dc3545; color: white;
    font-size: 0.7rem; font-weight: bold;
    width: 20px; height: 20px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #fff;
}

/* --- 2. KATEGORİLER (EŞİT YÜKSEKLİK) --- */
.kat-kart {
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
    border: 1px solid #eee;
    background: #fff;
    height: 100%; 
    min-height: 140px; 
    transition: transform 0.2s, box-shadow 0.2s;
}

.kat-kart:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.kat-img-wrapper {
    width: 100%;
    height: 140px;
    position: relative;
}

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

.kat-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 20px 10px 10px 10px;
}

.kat-title {
    color: #fff; margin: 0; font-weight: 600;
    font-size: 0.95rem; text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* --- 3. ÜRÜNLER (EŞİT YÜKSEKLİK) --- */
.urun-kart {
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    background: #fff;
    border: 1px solid #f0f0f0;
    height: 100%;
}

.urun-kart:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.urun-kart img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background-color: #f9f9f9;
}

@media (max-width: 576px) {
    .urun-kart img {
        height: 140px;
    }
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- 4. FOOTER --- */
.site-footer {
    background-color: #fff;
    margin-top: 40px;
    padding: 40px 0 20px 0;
    border-top: 1px solid #eee;
    text-align: center;
}

.footer-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 25px;
    border-radius: 50px;
    background-color: var(--brand-orange);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(253, 126, 20, 0.2);
    min-width: 140px;
}

.footer-btn:hover {
    background-color: #e36a0d;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(253, 126, 20, 0.3);
}

.footer-btn i { font-size: 1.1rem; }

.social-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.social-btn {
    width: 45px; height: 45px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; color: #fff; font-size: 1.2rem;
    transition: transform 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.social-btn:hover { transform: scale(1.1); }
.social-btn.instagram { background: #E1306C; }
.social-btn.facebook { background: #1877F2; }
.social-btn.twitter { background: #000; }
.social-btn.tiktok { background: #000; }

/* --- 5. YILDIZ PUANLAMA --- */
.rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    gap: 5px;
}
.rating input { display: none; }
.rating label {
    font-size: 2rem; color: #ddd; cursor: pointer; transition: color 0.2s;
}
.rating input:checked ~ label,
.rating label:hover,
.rating label:hover ~ label { color: #ffc107; }

/* --- 6. DİĞER BİLEŞENLER --- */
.sepet-alt-bar {
    position: fixed; bottom: 20px; left: 20px; right: 20px;
    background: var(--brand-orange);
    color: #fff; border-radius: 50px; padding: 12px 25px;
    display: none; justify-content: space-between; align-items: center;
    box-shadow: 0 5px 20px rgba(253, 126, 20, 0.4);
    z-index: 1050; cursor: pointer;
    animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { transform: translateY(100px); } to { transform: translateY(0); } }

.overlay-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #fff; z-index: 9999; display: flex; align-items: center; justify-content: center;
}
.landing-img-large { max-width: 90%; max-height: 70vh; }
.lang-container { text-align: center; padding: 20px; }
.lang-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.lang-btn {
    display: flex; flex-direction: column; align-items: center;
    padding: 20px; background: #fff; border-radius: 15px;
    color: #333; border: 1px solid #eee; box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.servis-butonlari-container {
    position: fixed; bottom: 100px; right: 20px;
    display: flex; flex-direction: column; gap: 10px; z-index: 1040;
}
.btn-servis {
    width: 45px; height: 45px; border-radius: 50%; border: none;
    color: #fff; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2); font-size: 1.2rem;
}
.btn-feedback { background: #6c757d; }
.btn-garson { background: #17a2b8; width: auto; border-radius: 30px; padding: 0 15px; font-weight: bold; }
.btn-hesap { background: #28a745; width: auto; border-radius: 30px; padding: 0 15px; font-weight: bold; left: 15px; }

/* --- MODAL KAPAT BUTONU --- */
.btn-close-custom {
    position: absolute; top: 15px; right: 15px;
    width: 35px; height: 35px; background-color: #fff;
    border-radius: 50%; opacity: 1;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e");
    z-index: 1070; transition: transform 0.2s;
}
.btn-close-custom:hover { transform: scale(1.1); background-color: #f8f9fa; }
#urunModal .btn-close-custom { top: 20px; right: 20px; }

/* --- GÜVENLİK SİGORTASI: CSS İLE OTO-GİZLEME --- */
/* JS çalışmazsa bile 5 saniye sonra bu ekranı zorla kapat */
@keyframes safetyHide {
    0% { opacity: 1; visibility: visible; }
    90% { opacity: 1; visibility: visible; }
    100% { opacity: 0; visibility: hidden; }
}

.overlay-screen {
    /* Mevcut stiller korunacak, sadece bunu ekle: */
    animation: safetyHide 5s forwards; 
    /* 5 saniye sonra JS müdahale etmese bile kapanır */
}