/*
 * =========================================
 * Restoran Menüsü v20.0 - FİNAL STİL DOSYASI
 * (Tam Ekran Sepet + Kaydırılabilir Liste)
 * =========================================
 */

/* === 1. GENEL AYARLAR & LAYOUT === */
:root {
    --primary-color: #333; 
    --accent-color: #d9534f; 
    --border-color: #eee; 
    --bg-color: #ffffff; 
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--primary-color);
    display: flex; 
    flex-direction: column; 
    min-height: 100vh; 
    /* Header (80px) + Kategori (60px) = 140px boşluk */
    padding-top: 140px; 
}

/* === 2. ÜST BAR & DİL MENÜSÜ === */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-color);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    z-index: 1001;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.logo img { height: 50px; width: auto; display: block; }

.header-title {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    line-height: 1.2;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
}

@media (max-width: 480px) {
    .header-title { font-size: 1rem; } 
    .logo img { height: 40px; }
    .top-bar { padding: 0 1rem; }
}

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

.lang-trigger {
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 1rem;
    transition: background-color 0.2s ease;
}
.lang-trigger:hover { background-color: #f9f9f9; }

#active-lang-flag { font-size: 1.4rem; margin-right: 0.2rem; line-height: 1; }
.arrow-down { font-size: 0.6rem; margin-left: 0.2rem; color: #888; transition: transform 0.2s; }
.language-dropdown.active .arrow-down { transform: rotate(180deg); }

.lang-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 8px;
    background-color: var(--bg-color);
    min-width: 160px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    z-index: 102;
}
.language-dropdown.active .lang-dropdown-content { display: block; }

.lang-dropdown-content a {
    color: var(--primary-color);
    padding: 0.75rem 1rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    font-size: 1rem;
    font-weight: 500;
}
.lang-dropdown-content a:hover { background-color: #f9f9f9; }
.lang-dropdown-content a span { font-size: 1.4rem; margin-right: 0.75rem; }

/* === 3. KATEGORİ MENÜSÜ === */
.category-nav-wrapper {
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    height: 60px;
    z-index: 1000;
    overflow-x: auto;
    overflow-y: hidden;
    display: flex;
    align-items: center;
}
.category-nav-wrapper::-webkit-scrollbar { height: 0px; }

.category-nav { display: flex; white-space: nowrap; padding: 0 1rem; width: 100%; }

.category-button {
    padding: 0.6rem 1rem;
    margin-right: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #777;
    background-color: transparent;
    border: 2px solid transparent;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.category-button:hover { background-color: #f9f9f9; }
.category-button.active { color: var(--accent-color); border-color: var(--accent-color); }

/* ÇOK SATANLAR BUTONU ÖZEL STİLİ */
.category-button[data-target="bestsellers"] {
    background-color: #fffbeb; 
    border: 2px solid #f1c40f; 
    color: #d35400; 
}
.category-button[data-target="bestsellers"].active {
    background-color: #f1c40f !important; 
    color: #fff !important; 
    box-shadow: 0 4px 10px rgba(241, 196, 15, 0.4); 
}

/* === 4. YEMEK LİSTESİ === */
.menu-content { padding: 1.5rem; flex-grow: 1; }

.menu-list { display: none; scroll-margin-top: 150px; }
.menu-list.active { display: block; animation: fadeIn 0.5s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.category-header {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #eee;
    text-transform: uppercase;
}
.menu-list:first-child .category-header { margin-top: 0; }

.menu-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1.5rem;
}
.menu-item:last-child { border-bottom: none; }

.menu-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 1rem;
    border: 1px solid #eee;
}

.item-details { flex-grow: 1; }
.item-details h4 { font-size: 1.1rem; color: var(--primary-color); margin-bottom: 0.25rem; }
.item-details p { font-size: 0.9rem; color: #666; line-height: 1.4; }
.item-price { font-size: 1rem; font-weight: bold; color: #000; margin-left: 1rem; white-space: nowrap; }

.add-to-cart-btn {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    margin-top: 8px;
    transition: transform 0.2s;
}
.add-to-cart-btn:active { transform: scale(0.95); }

/* === 5. FOOTER === */
.site-footer {
    background-color: #1a1a1a;
    color: #b0b0b0;
    padding-top: 60px;
    padding-bottom: 120px;
    font-size: 0.95rem;
    border-top: 4px solid var(--accent-color);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.footer-col h3, .footer-col h5 {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after, .footer-col h5::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

.footer-col p { line-height: 1.8; margin-bottom: 15px; }

.footer-col a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}
.footer-col a:hover { color: var(--accent-color); }

.social-links { display: flex; gap: 15px; margin-top: 15px; }
.social-links a {
    display: inline-block;
    background-color: #333;
    color: #fff;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}
.social-links a:hover { background-color: var(--accent-color); transform: translateY(-3px); }

#footer-contact h5, #footer-hours h5 { margin-top: 0; }

.footer-bottom {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #333;
    text-align: center;
    font-size: 0.85rem;
    color: #777;
}
.copyright-text p { margin: 0; }

@media (max-width: 768px) {
    .site-footer { padding-top: 40px; padding-bottom: 140px; text-align: center; }
    .footer-col h3::after, .footer-col h5::after { left: 50%; transform: translateX(-50%); }
    .social-links { justify-content: center; }
}

/* ========================================= */
/* === 7. SEPET SİSTEMİ (TAM EKRAN v20) === */
/* ========================================= */

/* Yüzen Sepet Butonu (Ana sayfada görünür) */
.floating-cart-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
    cursor: pointer;
    z-index: 1000;
    font-size: 1.8rem;
    transition: transform 0.3s;
}
.floating-cart-btn:hover { transform: scale(1.1); }
.floating-cart-btn.shake { animation: shake-cart 0.5s ease-in-out; }
@keyframes shake-cart { 0%, 100% { transform: rotate(0deg); } 25% { transform: rotate(-15deg); } 50% { transform: rotate(15deg); } 75% { transform: rotate(-10deg); } }

/* Kırmızı Rozet */
.cart-count-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: #ff3b30;
    color: white;
    font-size: 0.85rem;
    font-weight: bold;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 3px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

/* --- TAM EKRAN SEPET SAYFASI --- */
#full-cart-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    z-index: 2000;
    overflow-y: auto; /* Tüm sayfa kayabilir */
    padding-top: 70px; /* Header için boşluk */
}

/* Sepet Sayfası Header */
.cart-page-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: #fff;
    border-bottom: 1px solid #eee;
    z-index: 2001;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.cart-page-header h2 { font-size: 1.2rem; color: #333; margin: 0; }
.back-btn {
    background: #f5f5f5;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    color: #333;
}

.cart-page-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 15px;
}

/* --- ÜRÜN LİSTESİ (KAYDIRILABİLİR ALAN) --- */
.cart-items-list {
    margin-bottom: 20px;
    max-height: 40vh; /* Ekranın %40'ı kadar yer kaplasın */
    overflow-y: auto; /* İçinde kaydırma çubuğu çıksın */
    background-color: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 10px;
}

/* Sepet Satırı */
.cart-item-row {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 10px;
    border: 1px solid #eee;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.cart-item-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 15px;
}

.cart-item-info { flex-grow: 1; }

.product-name-price {
    font-weight: 700;
    color: #333;
    font-size: 1rem;
}
.cart-item-desc {
    font-size: 0.8rem;
    color: #2ecc71; /* Yeşil detay */
    display: block;
    margin-top: 3px;
    font-weight: 500;
}

.qty-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    background: #f0f0f0;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}

/* --- FORM ALANLARI --- */
.cart-forms-section {
    background: #fcfcfc;
    padding: 20px;
    border-radius: 15px;
    border: 1px solid #f0f0f0;
    margin-bottom: 20px;
}

.cart-input-group {
    margin-bottom: 15px;
    width: 100%;
    text-align: left;
}
.cart-input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
    margin-left: 2px;
}

.cart-input-group input, 
.cart-input-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    background-color: #fff;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s;
    color: #333;
}

.cart-input-group textarea { resize: none; }

.cart-input-group input:focus, 
.cart-input-group textarea:focus {
    border-color: #25D366; 
    outline: none;
    box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.1);
}

.input-error {
    border-color: #ff3b30 !important;
    background-color: #fff0f0 !important;
    animation: errorShake 0.4s ease-in-out;
}
@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* --- ÖDEME YÖNTEMİ --- */
.payment-section { margin-bottom: 15px; width: 100%; }
.payment-section label { display: block; font-size: 0.85rem; font-weight: bold; color: #333; margin-bottom: 5px; margin-left: 2px; }
.payment-options { display: flex; gap: 10px; }
.payment-btn {
    flex: 1; padding: 12px; border: 2px solid #eee;
    background-color: #fff; border-radius: 10px;
    font-size: 1rem; font-weight: 600; cursor: pointer;
    transition: all 0.2s; color: #555;
}
.payment-btn.active {
    border-color: #25D366; background-color: #f0fdf4; color: #128C7E;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.1);
}

/* --- ALT SABİT FOOTER (Toplam & Butonlar) --- */
.cart-page-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    border-top: 1px solid #eee;
    padding: 15px;
    z-index: 2002;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.05);
}

.cart-summary { margin-bottom: 15px; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 5px; font-size: 0.95rem; }
.summary-row.discount { color: #2ecc71; font-weight: bold; }
.summary-row.total { font-weight: 800; font-size: 1.2rem; color: #333; margin-top: 10px; border-top: 1px solid #eee; padding-top: 10px; }

.cart-actions-row { display: flex; gap: 10px; }

.action-btn {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 12px;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    color: white;
    display: flex; justify-content: center; align-items: center; gap: 8px;
}
.action-btn:active { transform: scale(0.96); }
.whatsapp-btn { background-color: #25D366; }
.call-btn { background-color: #007bff; }

.cart-footer-info {
    text-align: center;
    font-size: 0.8rem;
    color: #888;
    margin-top: 10px;
}

/* === 8. VARYANT MODALI === */
.variant-modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6); z-index: 3500; justify-content: center; align-items: center;
    backdrop-filter: blur(4px); opacity: 0; transition: opacity 0.3s ease; 
}
.variant-modal.active { display: flex; opacity: 1; }

.variant-content {
    background: white; width: 90%; max-width: 380px; padding: 25px;
    border-radius: 20px; text-align: center;
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
    transform: scale(0.7); opacity: 0; transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}
.variant-modal.active .variant-content { transform: scale(1); opacity: 1; }

.variant-content h3 { color: #333; margin-bottom: 5px; font-size: 1.4rem; }
.variant-content p { color: #888; margin-bottom: 20px; font-size: 0.9rem; }

.variant-options { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.variant-btn {
    display: flex; flex-direction: column; align-items: flex-start; padding: 15px;
    border: 2px solid #eee; background: #fff; border-radius: 12px; cursor: pointer;
    transition: all 0.2s; position: relative;
}
.variant-btn:hover { background: #f9f9f9; }
.variant-btn.selected { border-color: #25D366; background-color: #e8f5e9; box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2); }

.variant-row-top { display: flex; justify-content: space-between; width: 100%; align-items: center; }
.menu-details-text { font-size: 0.8rem; color: #666; margin-top: 4px; font-style: italic; }
.v-label { font-weight: bold; color: #333; font-size: 1.05rem; }
.v-price { font-weight: bold; color: #d9534f; background: #fff; padding: 4px 8px; border-radius: 6px; border: 1px solid #eee;}

.confirm-variant-btn {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white; border: none; width: 100%; padding: 14px;
    border-radius: 12px; font-size: 1.1rem; font-weight: bold; cursor: pointer;
    transition: transform 0.2s, opacity 0.2s; opacity: 0.5; pointer-events: none;
}
.confirm-variant-btn.ready { opacity: 1; pointer-events: all; box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4); }
.confirm-variant-btn.ready:active { transform: scale(0.96); }

.close-variant-btn {
    background: none; border: none; color: #999; text-decoration: underline;
    cursor: pointer; font-size: 0.9rem; margin-top: 15px;
}

/* === 9. ÜRÜN SEÇİLDİ (Yeşil Çerçeve) === */
.menu-item.in-cart {
    border: 2px solid #25D366; 
    background-color: #f0fdf4; 
    position: relative; 
    transition: all 0.3s ease;
}
.menu-item.in-cart .add-to-cart-btn { background-color: #128C7E; color: white; }

/* === 10. WELCOME MODAL === */
.welcome-modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8); z-index: 5000;
    justify-content: center; align-items: center; backdrop-filter: blur(8px);
    opacity: 0; transition: opacity 0.5s ease;
}
.welcome-modal.active { display: flex; opacity: 1; }
.welcome-content {
    background: linear-gradient(135deg, #ffffff 0%, #f9f9f9 100%);
    width: 90%; max-width: 400px; padding: 40px 30px;
    border-radius: 30px; text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5); position: relative;
    transform: scale(0.8); transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 4px solid #f1c40f;
}
.welcome-modal.active .welcome-content { transform: scale(1); }
.welcome-icon { font-size: 4rem; margin-bottom: 20px; animation: bounce 2s infinite; }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% {transform: translateY(0);} 40% {transform: translateY(-20px);} 60% {transform: translateY(-10px);} }
.welcome-content h2 { font-size: 1.8rem; color: #333; margin-bottom: 10px; font-weight: 800; }
.welcome-content p { font-size: 1.1rem; color: #555; line-height: 1.5; margin-bottom: 30px; }
.welcome-cta-btn {
    background: #f1c40f; color: #333; border: none;
    padding: 15px 30px; border-radius: 50px; font-size: 1.2rem; font-weight: bold;
    cursor: pointer; box-shadow: 0 5px 15px rgba(241, 196, 15, 0.4);
    transition: transform 0.2s;
}
.welcome-cta-btn:hover { transform: scale(1.05); background: #f39c12; }
.close-welcome-btn {
    position: absolute; top: 15px; right: 15px;
    background: #eee; border: none; width: 35px; height: 35px;
    border-radius: 50%; font-size: 1.2rem; cursor: pointer;
    display: flex; justify-content: center; align-items: center; color: #777;
}

/* === BİLDİRİM (TOAST) === */
#toast-container {
    position: fixed; bottom: 100px; left: 50%;
    transform: translateX(-50%); z-index: 4000;
    display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.toast {
    background-color: rgba(30, 30, 30, 0.95); color: white;
    padding: 12px 24px; border-radius: 30px; font-size: 0.95rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    animation: toastFadeIn 0.3s, toastFadeOut 0.3s 2.7s forwards;
    display: flex; align-items: center; gap: 10px;
}
@keyframes toastFadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastFadeOut { from { opacity: 1; } to { opacity: 0; } }q