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

:root {
    --gold: #FFD700;
    --dark-blue: #0c1221;
    --marble-text: #F5E8C7;
    --border-gold: rgba(255, 215, 0, 0.4);
    --card-bg: rgba(26, 38, 65, 0.5);
}

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Lora', serif;
    color: var(--marble-text);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    background: 
        linear-gradient(rgba(12, 18, 33, 0.85), rgba(12, 18, 33, 0.85)),
        url('back.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}


/* ▼▼▼ AÇILIŞ ANİMASYONU STİLLERİ ▼▼▼ */

#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    /* ESKİ KOD: height: 100%; veya height: 100vh; olabilir */
    height: 100dvh; /* YENİ VE EN DOĞRU KOD */
    z-index: 9999;
    transition: opacity 0.3s ease-out 0s;
}

.loading-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    background-image: url('test3.webp'); 
    background-size: cover;
    background-position: center top; /* <-- DEĞİŞİKLİK BURADA */
    z-index: 1;
}

#loading-screen.fade-out {
    opacity: 0;
    pointer-events: none; /* Tıklama olaylarını engellememesi için */
}

.curtain-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2; /* Arka planın önünde olacak */
    perspective: 1500px;
    /* Bu kapsayıcının kendi arkaplanı olmamalıdır */
}

.curtain {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;

    /* 0.5 saniye bekleyip 2 saniyede açılacak */
    transition: transform 1.5s ease-in-out 0.3s; 
}

.left-curtain {
    left: 0;
    transform-origin: left center;
    background-image: url('test4.webp'); /* Sol perde görseliniz */
    background-repeat: no-repeat;
    /* ESKİ KOD: background-size: 200% 100%; */
    background-size: 100vw 100vh; /* YENİ KOD */
    background-position: left center;
    transform: rotateY(0deg);
}

.right-curtain {
    right: 0;
    transform-origin: right center;
    background-image: url('test4.webp'); /* Sağ perde görseliniz */
    background-repeat: no-repeat;
    /* ESKİ KOD: background-size: 200% 100%; */
    background-size: 100vw 100vh; /* YENİ KOD */
    background-position: right center;
    transform: rotateY(0deg);
}

.curtain.open.left-curtain {
    transform: rotateY(-110deg);
}

.curtain.open.right-curtain {
    transform: rotateY(110deg);
}

.hidden-content {
    opacity: 0;
    transition: opacity 1s ease-in 1.2s;
}

.visible-content {
    opacity: 1;
}

/* ▲▲▲ AÇILIŞ ANİMASYONU STİLLERİ BİTİŞİ ▲▲▲ */


/* ▼▼▼ ANA SAYFA İÇERİK STİLLERİ ▼▼▼ */

.logo {
    display: flex;
    justify-content: center;
    padding: 25px 0;
}

.logo img {
    max-width: 140px;
    height: auto;
    border-radius: 50%;
    border: 3px solid var(--gold);
    box-shadow: 0 0 15px var(--gold);
}

.menu-container {
    padding: 10px;
    max-width: 900px;
    margin: 0 auto;
}

.tabs {
    display: flex; /* Grid yerine Flexbox kullanıyoruz */
    flex-wrap: wrap; /* Elemanların alt satıra kaymasını sağlıyoruz */
    justify-content: center; /* Elemanları yatayda ortalıyoruz */
    gap: 15px;
    margin-bottom: 30px;
}

.tab {
    padding: 20px;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-size: 16px;
    font-weight: bold;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    border: 2px solid var(--border-gold);
    border-radius: 10px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    background-image: url('kategori.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    z-index: 1;
    height: 50px;
    align-content: center;

    /* EŞİT GENİŞLİK VE ORTALAMA İÇİN BU SATIRI EKLEYİN */
    flex: 1 1 150px;
}

.tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));
    border-radius: 8px;
    z-index: -1;
    transition: background 0.3s ease;
}

.tab:hover::before {
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3));
}

.product-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-gold);
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    border-color: var(--gold);
}

.product-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    margin-right: 20px;
    border: 2px solid var(--border-gold);
}

.product-details {
    flex-grow: 1;
}

.product-name {
    font-family: 'Cinzel', serif;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 5px;
    color: white;
}

.product-features {
    font-size: 14px;
    color: var(--marble-text);
    font-style: italic;
    opacity: 0.9;
}

.product-price {
    font-size: 20px;
    font-weight: bold;
    color: var(--gold);
    margin-left: auto;
    font-family: 'Cinzel', serif;
}


/* Kategori ve Ürün Listesi Görünürlük Kontrolü */

#product-list,
.product-view-header {
    display: none;
}

body.products-visible #category-grid {
    display: none;
}

body.products-visible #product-list,
body.products-visible .product-view-header {
    display: block; /* Flex olarak değiştirildi */
}

body.products-visible #product-list {
    display: flex;
}

body.products-visible .product-view-header {
    display: flex;
}

.product-view-header {
    margin-bottom: 20px;
    align-items: center;
    gap: 15px;
}

.back-button {
    background: transparent;
    border: 2px solid var(--border-gold);
    color: var(--marble-text);
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Lora', serif;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.back-button:hover {
    background-color: var(--gold);
    color: var(--dark-blue);
    border-color: var(--gold);
}

.category-header {
    font-family: 'Cinzel', serif;
    color: var(--gold);
    font-size: 24px;
    margin: 0;
    flex-grow: 1;
    text-align: left;
}


/* Mobil Uyum (Responsive Tasarım) */

@media (max-width: 600px) {
    .tabs {
        gap: 10px;
    }
    .tab {
        font-size: 14px;
        padding: 15px 10px;
    }
    .product-name {
        font-size: 18px;
    }
    .product-price {
        font-size: 18px;
    }
    .category-header {
        font-size: 20px;
    }
}