/* GENEL AYARLAR */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden; /* Sağ-sol titremesini kökten engeller */
    overflow-y: auto;   /* Mönüde aşağı kaydırmaya izin verir */
    font-family: 'Segoe UI', sans-serif;
    background-color: #f4f7f6;
    -webkit-text-size-adjust: 100%; /* Mobilde yazı boyutunun kendi kendine büyümesini engeller */
}

.mobile-container {
    max-width: 500px; 
    margin: 0 auto; 
    min-height: 100vh; 
    position: relative;
    background-color: white;
}

/* ÜST BİLGİ (LOGO & MASA) */
header {
    background-color: #2c3e50; 
    color: white; 
    padding: 15px 20px;
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    position: sticky; /* Sayfa kaysa da logo üstte kalsın */
    top: 0;
    z-index: 1001;
}

.logo { font-size: 22px; font-weight: bold; }
.logo span { color: #f1c40f; }

/* KATEGORİLER */
.categories {
    display: flex; 
    overflow-x: auto; 
    padding: 12px; 
    gap: 10px; 
    background: white;
    position: sticky;
    top: 56px; /* Header'ın hemen altında dursun */
    z-index: 1000;
    border-bottom: 1px solid #eee;
}

.categories button {
    padding: 8px 18px; 
    border-radius: 20px; 
    border: 1px solid #ddd; 
    background: #f8f9fa; 
    cursor: pointer; 
    white-space: nowrap;
    transition: 0.3s;
}

.categories button.active { 
    background: #f1c40f; 
    border-color: #f1c40f; 
    font-weight: bold; 
}

/* Ana mönü alanı: Ürünleri yan yana 2'li dizer */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 sütun garantisi */
    gap: 10px; /* Kutular arası mesafe */
    padding: 10px; /* Kenar boşluğu */
    width: 100%;
    box-sizing: border-box; /* Padding'i genişliğe dahil eder (Titremeyi keser) */
    padding-bottom: 250px !important;
}

.product-card {
    background: white;
    border-radius: 10px;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    align-items: center; /* İçindeki her şeyi merkeze çeker */
    text-align: center;
    width: 100%; /* Kendi hücresine tam oturur */
    box-sizing: border-box;
    overflow: visible !important; /* Kutunun dışarı taşmasına izin ver */
}

.product-img {
    width: 100%;
    height: 70px; /* Yüksekliği biraz kıstık */
    background: #fdfdfd;
    font-size: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-info {
    padding: 8px;
    width: 100%;
    box-sizing: border-box;
    overflow: visible !important;
}
.product-info h3 {
    font-size: 13px; /* Yazıyı biraz küçülterek kutuya sığdırdık */
    margin: 5px 0;
    white-space: nowrap; /* Uzun isimler kutuyu bozmasın */
    overflow: hidden;
    text-overflow: ellipsis; /* Sığmayan yazıya ... koyar */
}
.product-info p { margin: 0 0 10px 0; color: #27ae60; font-weight: bold; }

.add-btn {
    background: #27ae60; 
    color: white; 
    border: none;
    /* İşte o meşhur yeşil ayrım çizgisi */
    border-top: 4px solid #2ecc71; 
    padding: 10px; 
    cursor: pointer;
    width: 100%;
    font-weight: bold;
    font-size: 14px;
    /* Kartın alt köşelerine tam oturması için */
    border-radius: 0 0 12px 12px; 
    transition: 0.3s;
}
.add-btn:hover {
    background: #219150;
    border-top: 4px solid #27ae60;
}

/* SEPET BARI (SABİT ALT PANEL) */
.cart-bar {
    position: fixed; 
    bottom: 0; 
    width: 100%; 
    max-width: 500px;
    background: #2c3e50; 
    color: white; 
    padding: 10px 15px;
    display: flex;
    flex-direction: column; /* İçindekileri alt alta dizer (Sepet listesi + Toplam) */
    box-sizing: border-box;
    z-index: 1100;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.2);
    border-radius: 20px 20px 0 0;
}

/* SEPET LİSTESİ (KAYDIRILABİLİR ALAN) */
.sepet-ozet {
    color: #333 !important;
    background-color: #ffffff !important;
    max-height: 120px; /* Sepet çok uzamasın diye sınırladık */
    overflow-y: auto; /* İçerik taşarsa kendi içinde kaydır */
    border-radius: 10px;
    margin-bottom: 10px;
    padding: 5px;
}

.total-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0 10px 0;
}

.total-info b { font-size: 20px; color: #f1c40f; }

.order-btn { 
    background: #f1c40f; 
    border: none; 
    padding: 12px; 
    font-weight: bold; 
    border-radius: 10px; 
    width: 100%; 
    cursor: pointer;
    font-size: 16px;
}

/* SEPET İÇİNDEKİ SİLME [X] BUTONU */
.sepet-item button {
    color: #e74c3c !important; /* Canlı kırmızı */
    border: 1px solid #e74c3c !important;
    background: transparent;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    line-height: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

.sepet-item button:hover {
    background: #e74c3c;
    color: white !important;
}

/* HESAP İSTE / ÖDEME BUTONU (Turuncu Profesyonel) */
.pay-btn {
    background: #e67e22 !important; /* Turuncu */
    color: white !important;
    border: none;
    padding: 12px;
    font-weight: bold;
    border-radius: 10px;
    width: 100%;
    margin-top: 10px;
    cursor: pointer;
    font-size: 14px;
    text-transform: uppercase;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

.pay-btn:hover {
    background: #d35400 !important;
}

/* EKLE BUTONU (Ürün Kartlarındaki) */
.add-btn {
    background: #27ae60; 
    color: white; 
    border: none; 
    padding: 10px 15px; /* Biraz daha genişlettik basması kolay olsun */
    border-radius: 8px; 
    cursor: pointer;
    width: 100%;
    font-weight: bold;
    margin-top: 5px;
}

/* Ürün kartı bilgilerini hizalayalım */
.product-info { 
    padding: 10px; 
    text-align: center; 
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 80px; /* Bilgi alanını sabitledik */
}
