/* --- DEĞİŞKENLER VE ANA AYARLAR --- */
@import url('../fonts/fonts.css');

:root {
    --primary-blue: #003177;
    --accent-blue: #0d6efd;
    --light-gray: #f8f9fa;
    --text-dark: #2d3436;
    --text-muted: #636e72;
    --transition: all 0.2s ease-in-out;
    --shadow: 0 15px 35px rgba(0,0,0,0.15);
    --radius-lg: 15px;
    --radius-md: 10px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Exo', sans-serif;
}

body {
    background-color: #fff;
    color: var(--text-dark);
    line-height: 1.6;
}

/* --- HEADER VE NAVİGASYON --- */
.main-header {
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1100; 
    position: sticky;
    top: 0; /* Header hep en üstte */
}

.category-nav-wrapper {
    background: #fff;
    border-bottom: 1px solid #f1f2f6;
    position: relative;
    z-index: 1090;
}

.category-scroll-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
}

/* --- KATEGORİ HAPLARI --- */
.nav-cat-pill {
    position: static; /* Alt menünün tüm genişlikte açılması için şart */
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    transition: var(--transition);
    display: flex;
    align-items: center;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
}

.cat-blue { background: #f0f7ff; color: var(--primary-blue); }
.cat-orange { background: #fff4e5; color: #ff8000; }
.cat-green { background: #ebfbee; color: #2b8a3e; }

/* --- MEGA MENÜ (TIKLAYINCA/HOVERDA ÜSTTE AÇILAN) --- */
.sub-menu-header {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 100%; /* Kategori barının hemen altı */
    left: 0;
    width: 100%;
    background: #ffffff;
    box-shadow: var(--shadow);
    padding: 25px;
    z-index: 10000;
    border-bottom: 3px solid var(--accent-blue);
    transform: translateY(0); /* Zıplama efekti yerine sabit duruş */
    transition: opacity 0.2s ease;
    pointer-events: none;
    
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.nav-cat-pill:hover .sub-menu-header,
.nav-cat-pill:focus .sub-menu-header {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.sub-menu-header a {
    display: flex !important;
    padding: 10px 15px !important;
    color: var(--text-dark) !important;
    text-decoration: none !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    border-radius: 8px;
}

.sub-menu-header a:hover {
    background: var(--light-gray);
    color: var(--accent-blue) !important;
}

/* --- DİĞER BİLEŞENLER (SİDEBAR & PRODUCT) --- */
.sidebar-cat-item {
    display: block;
    padding: 10px 15px;
    color: var(--text-dark);
    font-weight: 600;
    text-decoration: none;
}

.product-card {
    border: 1px solid #f1f2f6;
    border-radius: var(--radius-lg);
    background: #fff;
    transition: var(--transition);
}

.product-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-5px);
}

.product-img-wrapper {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-img-wrapper img {
    max-width: 80%;
    object-fit: contain;
}

.add-to-cart-btn {
    background: var(--primary-blue);
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: var(--radius-md);
    cursor: pointer;
    width: 100%;
}

/* --- MOBİL --- */
@media (max-width: 991px) {
    .sub-menu-header {
        position: fixed;
        top: 60px; /* Mobilde daha yukarıda */
        grid-template-columns: 1fr;
        height: auto;
        max-height: 80vh;
        overflow-y: auto;
    }
}
