:root {
    --primary: #1e1e24;
    --accent: #ff6b6b; /* İştah açıcı modern mercan rengi */
    --bg: #f8f9fa;
    --card-bg: #ffffff;
    --text-muted: #868e96;
    --shadow: 0 10px 30px -10px rgba(0,0,0,0.1);
    --radius: 24px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg);
    color: var(--primary);
    
    /* DEĞİŞİKLİK BURADA: 100px olan değeri 0 yaptık */
    padding-bottom: 0; 
}

/* --- HEADER --- */
.app-header {
    padding: 20px;
    background: var(--bg);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.logo-box {
    width: 45px; height: 45px;
    background: var(--primary);
    color: white;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
}

.brand-text h1 { font-size: 20px; font-weight: 700; line-height: 1; }
.brand-text p { font-size: 12px; color: var(--text-muted); }

/* Arama Çubuğu */
.search-container {
    position: relative;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.search-icon {
    position: absolute; left: 15px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

input {
    width: 100%;
    border: none;
    padding: 16px 16px 16px 45px;
    border-radius: 16px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    background: transparent;
}

/* --- KATEGORİLER (Sticky) --- */
.category-nav {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 10px 20px;
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(248, 249, 250, 0.9);
    backdrop-filter: blur(10px); /* Buzlu cam efekti */
    scrollbar-width: none; /* Scrollbarı gizle */
}
.category-nav::-webkit-scrollbar { display: none; }

/* --- KATEGORİ SLIDER (ÖZEL 2000/1414 ORANI) --- */
.category-nav {
    display: flex;
    gap: 4px; /* KUTULAR ARASI BOŞLUK (Neredeyse bitişik) */
    overflow-x: auto;
    padding: 15px 10px 25px 10px; /* Kenar boşlukları */
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(248, 249, 250, 0.98);
    backdrop-filter: blur(12px);
    
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.category-nav::-webkit-scrollbar { display: none; }

/* Kategori Kartı */
.cat-card {
    /* Genişliği serbest bırakıyoruz, resim kutusuna göre şekil alacak */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px; /* Resim ile yazı arası */
    cursor: pointer;
    opacity: 0.8;
    transition: all 0.2s;
    scroll-snap-align: center;
}

.cat-card.active {
    opacity: 1;
    transform: scale(1.03); /* Çok hafif büyüme */
}

/* Resim Kutusu (DİKDÖRTGEN YAPILDI) */
.cat-img-wrap {
    /* Mobilde Genişlik: 120px (İsteğe göre artırılabilir) */
    width: 120px;
    
    /* İŞTE SİHİRLİ KOD: Kutu senin resminin oranını alır (2000/1414) */
    aspect-ratio: 2000 / 1414;
    height: auto; /* Yükseklik orana göre otomatik ayarlanır */
    
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border: 2px solid transparent;
    
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff; 
}

/* Resim Ayarı */
.cat-img-wrap img {
    width: 100%;
    height: 100%;
    /* Kutu ile resim aynı oranda olduğu için 'cover' kullanabiliriz, sıfır kayıp olur */
    object-fit: cover; 
    display: block; /* Alt kısımdaki minik boşluğu siler */
}

/* Aktif Durum */
.cat-card.active .cat-img-wrap {
    border-color: var(--accent);
    box-shadow: 0 6px 15px rgba(255, 107, 107, 0.4);
}

.cat-card span {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    text-align: center;
    white-space: nowrap;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cat-card.active span { color: var(--accent); }

/* Masaüstü Ayarı */
@media (min-width: 768px) {
    .category-nav { gap: 8px; padding: 20px; }
    /* Masaüstünde kutular daha büyük */
    .cat-img-wrap { width: 140px; } 
    .cat-card span { font-size: 13px; }
}

/* --- MASAÜSTÜ İÇİN AYAR (Daha da büyük) --- */
@media (min-width: 768px) {
    .category-nav { gap: 15px; padding: 20px 30px 30px 30px; }
    .cat-card { min-width: 120px; }
    .cat-img-wrap { width: 110px; height: 110px; border-radius: 26px; }
    .cat-card span { font-size: 15px; }
}

/* --- MASAÜSTÜ İÇİN AYAR --- */
@media (min-width: 768px) {
    .cat-card { min-width: 100px; }
    .cat-img-wrap { width: 90px; height: 90px; }
    .cat-card span { font-size: 14px; }
}

.cat-pill.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(30,30,36,0.3);
    border-color: var(--primary);
}

/* --- MENÜ GRID --- */
.menu-container {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 Sütun */
    gap: 15px;
}

/* Ürün Kartı */
.product-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
    cursor: pointer;
    position: relative;
    content-visibility: auto;
    contain-intrinsic-size: auto 300px;
    will-change: transform;
}

.product-card:active { transform: scale(0.96); }

.card-img-box {
    width: 100%;
    aspect-ratio: 1/1; /* Kare Fotoğraflar */
    overflow: hidden;
}

.card-img-box img {
    width: 100%; height: 100%;
    object-fit: cover;
}

.card-info { padding: 12px; }

.card-info h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    display: -webkit-box; -webkit-line-clamp: 1; line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}

.card-info p {
    font-size: 11px;
    color: var(--text-muted);
    display: -webkit-box; -webkit-line-clamp: 1; line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}

.price-row {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 10px;
}

.price { font-weight: 700; font-size: 15px; }
.add-btn {
    width: 28px; height: 28px;
    background: var(--bg);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--primary);
}

/* --- BOTTOM SHEET (MODAL) --- */
.bottom-sheet-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 99;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s;
    backdrop-filter: blur(3px);
}
.bottom-sheet-overlay.active { opacity: 1; pointer-events: auto; }

.bottom-sheet {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: white;
    z-index: 100;
    border-radius: 30px 30px 0 0;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    max-height: 90vh;
    overflow-y: auto;
}
.bottom-sheet.active { transform: translateY(0); }

.sheet-handle {
    width: 40px; height: 5px;
    background: #e9ecef;
    border-radius: 10px;
    margin: 12px auto;
}

.sheet-image {
    width: 100%;
    height: 300px;
    position: relative;
}
.sheet-image img { width: 100%; height: 100%; object-fit: cover; }

.close-sheet {
    position: absolute; top: 15px; right: 15px;
    background: white; border: none;
    width: 36px; height: 36px; border-radius: 50%;
    font-size: 20px; box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    cursor: pointer; z-index: 2;
}

.sheet-details { padding: 25px; }

.sheet-header {
    display: flex; justify-content: space-between; align-items: start;
    margin-bottom: 10px;
}
.sheet-header h2 { font-size: 24px; font-weight: 700; max-width: 70%; }
.price-badge {
    background: var(--accent); color: white;
    padding: 6px 12px; border-radius: 12px;
    font-weight: 600; font-size: 18px;
}

.sheet-desc { color: var(--text-muted); line-height: 1.6; margin-bottom: 20px; }

.sheet-meta {
    display: flex; gap: 20px; margin-top: 20px;
    padding-top: 20px; border-top: 1px solid #eee;
}
.meta-item {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--text-muted); font-weight: 500;
}
.meta-item i { color: var(--accent); }

/* AR Button */
.ar-btn {
    width: 100%;
    padding: 15px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 15px; font-weight: 600;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    cursor: pointer;
}
.ar-btn.hidden { display: none; }

/* MASAÜSTÜ İÇİN ÖZEL AYAR (Responsive) */
@media (min-width: 768px) {
    .menu-container { grid-template-columns: repeat(4, 1fr); max-width: 1000px; margin: 0 auto; }
    .bottom-sheet { width: 500px; left: 50%; transform: translate(-50%, 100%); bottom: 20px; border-radius: 30px; }
    .bottom-sheet.active { transform: translate(-50%, 0); }
    .app-header, .category-nav { max-width: 1000px; margin: 0 auto; }
    .category-nav { border-radius: 0 0 20px 20px; }
}

/* Model Viewer'ın alanı kaplaması için */
model-viewer {
    width: 100%;
    height: 100%;
    background-color: #f8f9fa; /* Arkaplan rengi */
    border-radius: 20px;
}

/* --- HEADER LOGO GÜNCELLEMESİ --- */
.header-logo {
    height: 50px; /* Mobilde logo yüksekliği */
    width: auto;  /* Genişlik orantılı kalsın */
    object-fit: contain; /* Görsel bozulmasın */
}

/* Header Yazı Düzenlemesi */
.brand-text h1 {
    font-size: 16px; /* Mobilde sığması için fontu ayarladık */
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase; /* Hepsi büyük harf olsun */
    letter-spacing: 0.5px;
    line-height: 1.2;
}

/* --- FOOTER TASARIMI --- */
.app-footer {
    background: white;
    margin-top: 40px;
    border-top: 1px solid #eee;
    padding-bottom: 10px; /* Altta boşluk */

}

.copyright {
    text-align: center; /* Yazıyı ortala */
    font-size: 13px;
    color: #999;
    padding: 15px 0; /* Üstten alttan biraz boşluk ver */
    background: #f8f9fa; /* Hafif farklı bir zemin rengi ile ayrıştır */
    width: 100%; /* Tüm genişliği kaplasın */
    border-top: 1px solid #eee; /* Üstüne ince çizgi */
    margin: 0; /* Dış boşluk olmasın */
    display: block;
}

.footer-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px 20px;
    display: grid;
    /* Mobilde alt alta, Masaüstünde yan yana */
    grid-template-columns: 1fr; 
    gap: 20px;
}

/* Sol Taraf: Bilgiler */
.footer-info h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--primary);
}

.address-text {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

.address-text i {
    color: var(--accent);
    font-size: 18px;
    margin-top: 2px;
}

/* Instagram Butonu */
.insta-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 5px 15px rgba(220, 39, 67, 0.3);
    transition: transform 0.2s;
}

.insta-link:active { transform: scale(0.95); }

/* Sağ Taraf: Harita (BÜYÜTÜLDÜ) */
.footer-map {
    width: 100%;
    /* Mobildeki yüksekliği artırdık (Eskisi 200px idi) */
    height: 250px; 
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15); /* Gölgeyi biraz artırdık */
    border: 4px solid white;
}

/* --- MASAÜSTÜ DÜZENİ --- */
@media (min-width: 768px) {
    .header-logo { height: 60px; }
    .brand-text h1 { font-size: 22px; }
    
    .footer-container {
        grid-template-columns: 1fr 1fr;
        align-items: center; /* Ortala */
    }
    
    /* PC'de haritayı daha da büyüttük (Eskisi 250px idi) */
    .footer-map { height: 250px; } 
}

/* --- DİL BUTONU --- */
.lang-btn {
    background: white;
    border: 1px solid #ddd;
    color: var(--primary);
    font-weight: 700;
    padding: 0;
    width: 45px; /* Kare/Daire oranı */
    height: 50px; /* Input ile aynı yükseklik */
    border-radius: 16px;
    cursor: pointer;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.2s;
    flex-shrink: 0; /* Küçülmesini engeller */
}

.lang-btn:active {
    transform: scale(0.95);
    background: var(--bg);
}

/* --- DARK MODE (KARANLIK MOD) --- */

/* Dark Mode Aktifken Değişecek Renkler */
body.dark-mode {
    --primary: #f8f9fa; /* Yazılar artık açık renk */
    --bg: #121212;      /* Arka plan koyu siyah */
    --card-bg: #1e1e1e; /* Kartlar koyu gri */
    --text-muted: #a0a0a0; /* Pasif yazılar gri */
    --shadow: 0 10px 30px -10px rgba(0,0,0,0.5); /* Gölgeler daha belirgin */
}

/* Dark Mode Özel Düzeltmeler */

/* 1. Header ve Footer Arka Planı */
body.dark-mode .app-header,
body.dark-mode .category-nav,
body.dark-mode .app-footer,
body.dark-mode .copyright {
    background: #121212 !important; /* Tam siyah */
    border-color: #333; /* Çizgileri koyulaştır */
}

/* 2. Arama Kutusu ve Dil Butonları */
body.dark-mode .search-container,
body.dark-mode .lang-btn,
body.dark-mode .cat-img-wrap {
    background: #2c2c2c; /* Koyu gri */
    border-color: #444;
    color: white;
}
body.dark-mode input { color: white; }

/* 3. Logo Kutusu ve Aktif Hap Butonlar */
/* Primary rengi beyaza döndüğü için, içindeki yazıları siyaha çekmeliyiz */
body.dark-mode .logo-box,
body.dark-mode .cat-pill.active,
body.dark-mode .ar-btn {
    color: #121212; /* Yazı siyah olsun ki okunsun */
}

/* 4. Bottom Sheet (Modal) */
body.dark-mode .bottom-sheet {
    background: #1e1e1e;
}
body.dark-mode .sheet-handle {
    background: #444;
}
body.dark-mode .close-sheet {
    background: #333;
    color: white;
}

/* 5. Harita (Göz almaması için parlaklığı kısıyoruz) */
body.dark-mode .footer-map iframe {
    filter: invert(90%) hue-rotate(180deg);
}