/* Genel Sayfa Stilleri */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Poppins', sans-serif;
    background: #f4f6f9; /* DEĞİŞTİRİLDİ: Arka plan ana sayfa ile aynı yapıldı */
}

/* Sol Üst Logo Alanı */
.site-header {
    position: absolute;
    top: 30px;
    left: 40px;
    display: flex;
    align-items: center;
    color: #333; /* Beyaz arka planda görünmesi için renk koyu yapıldı */
    font-size: 1.5em;
    font-weight: 600;
    z-index: 10;
}

.logo {
    max-width: 40px; 
    height: auto;
    margin-right: 10px;
}

/* Giriş Panelinin Konteyneri */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 100vh;      /* EKLENDİ: İçerik az olsa bile panelin ortalanmasını sağlar */
    padding: 20px;          /* EKLENDİ: Mobil cihazlarda kenarlara yapışmasını engeller */
    box-sizing: border-box; /* EKLENDİ: Padding'in boyutları bozmasını engeller */
}

/* Giriş Panelinin Kendisi (ANA DEĞİŞİKLİK BURADA) */
.login-panel {
    background-color: #ffffff; /* DEĞİŞTİRİLDİ: Panel arka planı beyaz yapıldı */
    padding: 40px 50px;
    width: 100%;
    max-width: 450px;          /* DEĞİŞTİRİLDİ: Maksimum genişlik verildi */
    box-sizing: border-box;
    border-radius: 12px;       /* DEĞİŞTİRİLDİ: Köşeler yuvarlatıldı */
    box-shadow: 0 4px 25px rgba(0,0,0,0.1); /* DEĞİŞTİRİLDİ: Modern bir gölge eklendi */
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-panel h2 {
    margin: 0 0 10px 0;
    color: #333;
    font-weight: 600;
}

.login-panel .subtitle {
    margin-bottom: 30px;
    color: #666;
    font-size: 0.9em;
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
    max-width: 400px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
    font-size: 0.9em;
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box; 
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #FF6B00; 
    box-shadow: 0 0 8px rgba(255, 107, 0, 0.2);
}

.options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85em;
    margin-bottom: 25px;
    max-width: 400px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.remember-me {
    display: flex;
    align-items: center;
}

.remember-me input {
    margin-right: 5px;
}

.options a {
    color: #2ECC71; 
    text-decoration: none;
    transition: color 0.3s ease;
}

.options a:hover {
    color: #25a25a;
}

.login-button {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    background: #FF6B00; 
    color: white;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.login-button:hover {
    background: #e65c00; 
    transform: translateY(-2px); 
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.4);
}

.signup-link {
    margin-top: 25px;
    font-size: 0.9em;
    color: #555;
}

.signup-link a {
    color: #FF6B00; 
    font-weight: 600;
    text-decoration: none;
}

.signup-link a:hover {
    text-decoration: underline;
}

/* Hata ve Başarı Mesajları */
#message-container {
    margin-bottom: 15px;
    font-size: 0.9em;
    font-weight: 500;
    min-height: 20px;
    max-width: 400px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.message.error {
    color: #e74c3c; /* Kırmızı */
}

.message.success {
    color: #2ECC71; /* Yeşil */
}


/* ========================================= */
/* ANA SAYFA STİLLERİ                      */
/* ========================================= */

body.homepage {
    display: block;
    justify-content: initial;
    align-items: initial;
    overflow-y: auto; 
    background-color: #f4f6f9; 
}

.main-header {
    background-color: #243043;
    color: #ffffff;
    padding: 0 40px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo-container a {
    font-size: 1.8em;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
}

.category-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
}

.category-nav ul li a {
    color: #f1f1f1;
    text-decoration: none;
    padding: 25px 20px;
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.category-nav ul li a:hover {
    background-color: #FF6B00;
    color: #ffffff;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-bar {
    display: flex;
}

.search-bar input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px 0 0 5px;
    outline: none;
    border-right: none;
}

.search-bar button {
    padding: 8px 12px;
    border: none;
    background-color: #FF6B00;
    color: white;
    cursor: pointer;
    border-radius: 0 5px 5px 0;
}

.action-link {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.action-link:hover {
    color: #2ECC71;
}

.action-link i {
    margin-right: 5px;
}

.main-content {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.hero-banner {
    background: linear-gradient(135deg, #FF6B00, #ff8c3a);
    color: white;
    padding: 50px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 40px;
}

.product-section h2 {
    font-size: 1.8em;
    color: #333;
    margin-bottom: 20px;
    border-bottom: 2px solid #FF6B00;
    padding-bottom: 10px;
    display: inline-block;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.product-card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.product-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.product-card h3 {
    font-size: 1.1em;
    color: #333;
    margin: 15px 10px;
}

.product-card .price {
    font-size: 1.2em;
    font-weight: 600;
    color: #243043;
    margin-bottom: 15px;
}

.add-to-cart-btn {
    width: 80%;
    padding: 12px;
    margin-bottom: 20px;
    border: none;
    border-radius: 8px;
    background: #2ECC71;
    color: white;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.add-to-cart-btn:hover {
    background: #25a25a;
}

.main-footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    background-color: #243043;
    color: #f1f1f1;
}

/* ========================================= */
/* PROFİL İKONU STİLLERİ (YENİ)            */
/* ========================================= */

.profile-icon {
    width: 42px;
    height: 42px;
    background-color: #FF6B00; /* Ana renk: Turuncu */
    color: #ffffff;
    border-radius: 50%; /* Tam yuvarlak yapar */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.4em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.profile-icon:hover {
    transform: scale(1.1); /* Üzerine gelince hafif büyüsün */
}

/* ========================================= */
/* RESPONSIVE TASARIM (MOBİL UYUMLULUK)    */
/* @media screen and (max-width: 768px)    */
/* ========================================= */

@media (max-width: 768px) {

    /* --- Genel Ayarlar --- */
    body {
        /* Mobil cihazlarda metinlerin daha okunaklı olması için */
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    /* --- Giriş ve Kayıt Sayfaları İçin Ayarlar --- */
    
    .login-panel {
        /* Mobil görünümde iç boşlukları azaltıyoruz */
        padding: 30px 25px;
    }

    .site-header {
        /* Logonun mobil ekranda daha iyi konumlanması için */
        top: 20px;
        left: 20px;
        font-size: 1.2em;
    }


    /* --- Ana Sayfa İçin Ayarlar --- */

    .main-header {
        /* Mobil için header'ın iç boşluğunu azaltıyoruz */
        padding: 0 20px;
    }

    .header-content {
        /* Öğelerin alt alta gelmesini ve yüksekliğin otomatik ayarlanmasını sağlıyoruz */
        flex-direction: column;
        height: auto;
        padding: 15px 0;
    }
    
    .logo-container a {
        margin-bottom: 15px; /* Logo ile menü arasına boşluk */
    }

    .category-nav ul {
        /* Menü elemanlarının alt alta gelmesini sağlıyoruz */
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .category-nav ul li a {
        padding: 10px 0;
        display: block;
        width: 100%;
        text-align: center;
    }

    .header-actions {
        /* Arama çubuğu ve profil ikonunu menünün altına alıyoruz */
        flex-direction: column; /* EKLENDİ: Arama ve linklerin alt alta gelmesi için */
        margin-top: 15px;
        width: 100%;
        justify-content: center;
        gap: 15px; /* DEĞİŞTİRİLDİ: Dikey boşluk */
    }

    .search-bar {
        width: 90%; /* Arama çubuğunun genişliğini ayarlıyoruz */
        justify-content: center; /* EKLENDİ */
    }

    .main-content {
        /* Ana içeriğin kenar boşluklarını azaltıyoruz */
        margin-top: 20px;
        padding: 0 15px;
    }

    .hero-banner {
        /* Karşılama panelinin boşluklarını ve yazı boyutunu küçültüyoruz */
        padding: 30px 20px;
    }

    .hero-banner h1 {
        font-size: 1.8em;
    }
    .product-section h2 {
        /* Bölüm başlığının boyutunu küçültüyoruz */
        font-size: 1.5em;
    }
    
    .product-grid {
        /* Ürün kartları arasındaki boşluğu azaltıyoruz */
        gap: 15px;
    }
}

/* ========================================= */
/* PROFİL DROPDOWN MENÜ STİLLERİ (YENİ)    */
/* ========================================= */

.user-auth-links {
    display: flex;
    gap: 20px;
}

.profile-container {
    position: relative; /* Menünün pozisyonunu buna göre ayarlayacağız */
    display: inline-block;
}

.dropdown-menu {
    display: block; 
    position: absolute;
    top: calc(100% + 10px); /* İkonun 10px altına konumlandır */
    right: 0;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    width: 150px;
    padding: 8px;
    z-index: 1001;
    overflow: hidden;
    /* Başlangıçta gizli olması için */
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.2s ease-in-out;
}

.dropdown-menu.show {
    /* Menüyü gösteren class */
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-menu .logout-button {
    width: 100%;
    padding: 10px 12px;
    border: none;
    background-color: transparent;
    color: #333;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9em;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.dropdown-menu .logout-button:hover {
    background-color: #f5f5f5;
    color: #e74c3c; /* Üzerine gelince kırmızı olsun */
}