/* ==================================================
   NEVİ ÇİÇEK | TASARIM - FRONTEND ANA STİL DOSYASI
================================================== */
@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Çiçekçi Ruhuna Uygun Organik Renk Paleti */
    --flora-green-primary: #10b981;
    /* Zümrüt Yeşili (Butonlar ve Vurgular) */
    --flora-green-dark: #064e3b;
    /* Koyu Orman Yeşili (Başlıklar) */
    --flora-cream: #f8fafc;
    /* Açık Krem/Gri (Arka Plan) */
    --flora-text: #334155;
    /* Koyu Kayrak Grisi (Okunabilir Metin) */
    --flora-border: #e2e8f0;
    /* Çizgiler */

    --font-heading: 'Lexend', sans-serif;
    --font-body: 'Outfit', sans-serif;
}

body {
    font-family: var(--font-body);
    background-color: var(--flora-cream);
    color: var(--flora-text);
    -webkit-font-smoothing: antialiased;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--flora-green-dark);
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s ease;
}

/* 1600PX MAKSİMUM KAPSAYICI */
.nevi-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* --- 1. ÜST DUYURU BANDI --- */
.flora-topbar {
    background-color: var(--flora-green-primary);
    color: #ffffff;
    text-align: center;
    padding: 10px 0;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.flora-topbar a {
    color: #ffffff;
    text-decoration: underline;
    margin-left: 10px;
    font-weight: 700;
}

.flora-topbar a:hover {
    color: #d1fae5;
}

/* --- 2. ANA HEADER --- */
.flora-header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--flora-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.flora-header.header-scrolled {
    box-shadow: 0 10px 25px rgba(6, 78, 59, 0.08);
}

.header-middle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
}

/* Sol: Arama & Mobil Menü Butonu */
.header-left {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.header-search {
    position: relative;
    width: 100%;
    max-width: 450px;
}

.search-input {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 50px;
    padding: 12px 50px 12px 25px;
    font-size: 0.95rem;
    font-family: var(--font-body);
    outline: none;
    background-color: #f8fafc;
    transition: 0.3s;
}

.search-input:focus {
    border-color: var(--flora-green-primary);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 5px;
    bottom: 5px;
    width: 42px;
    background-color: var(--flora-green-primary);
    color: #ffffff;
    border: none;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.3s;
}

.search-btn:hover {
    background-color: var(--flora-green-dark);
}

/* Orta: Logo */
.header-center {
    flex: 1 1 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-logo {
    display: inline-block;
}

.header-logo img {
    max-height: 100px;
    width: auto;
    object-fit: contain;
}

.header-logo h2 {
    margin: 0;
    font-weight: 800;
    color: var(--flora-green-dark);
    letter-spacing: -0.5px;
}

/* Sağ: İkonlar */
.header-right {
    flex: 1 1 0;
    /* Sütun genişliklerini zorla eşitler */
    display: flex;
    justify-content: flex-end;
    /* İkonları en sağa yaslar */
    align-items: center;
    gap: 30px;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--flora-text);
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
}

.action-item i {
    font-size: 1.6rem;
    margin-bottom: 4px;
    transition: 0.3s;
}

.action-item span {
    font-size: 0.8rem;
    font-weight: 600;
    transition: 0.3s;
}

.action-item:hover i,
.action-item:hover span {
    color: var(--flora-green-primary);
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: 5px;
    background-color: #f59e0b;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 800;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* --- 3. ALT HEADER (KATEGORİLER) --- */
.header-bottom {
    background-color: #ffffff;
    border-top: 1px solid var(--flora-border);
}

.category-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.cat-item {
    position: relative;
}

.cat-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--flora-text);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 15px 0;
    font-family: var(--font-heading);
}

.cat-link img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.cat-link:hover {
    color: var(--flora-green-primary);
}

/* MEGA MENÜ KUTUSU */
.cat-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    background: #ffffff;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    border-radius: 0 0 12px 12px;
    padding: 20px 25px;
    min-width: 450px;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 15px);
    transition: all 0.3s ease;
    z-index: 100;
    border-top: 3px solid var(--flora-green-primary);
}

.cat-item:hover .cat-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.cat-dropdown-header {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--flora-green-primary) !important;
    border-bottom: 1px solid var(--flora-border);
    padding-bottom: 12px;
    margin-bottom: 15px;
    font-family: var(--font-heading);
}

.cat-dropdown-header:hover {
    color: var(--flora-green-dark) !important;
}

.cat-dropdown-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 20px;
}

.cat-dropdown-grid a {
    display: block;
    padding: 8px 10px;
    color: var(--flora-text);
    font-weight: 400;
    font-size: 0.9rem;
    border-radius: 6px;
}

.cat-dropdown-grid a:hover {
    background: #f8fafc;
    color: var(--flora-green-primary);
    padding-left: 15px;
}

/* --- 4. MOBİL MENÜ BİLEŞENLERİ --- */
.mobile-menu-toggle {
    background: transparent;
    border: none;
    font-size: 2rem;
    color: var(--flora-green-dark);
    padding: 0;
    margin-right: 15px;
    cursor: pointer;
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100vh;
    background: #ffffff;
    z-index: 2000;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
    padding: 20px;
}

.mobile-sidebar.active {
    left: 0;
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar-close {
    background: #f1f5f9;
    border: none;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 15px;
    top: 15px;
    cursor: pointer;
    color: var(--flora-text);
}

.sidebar-close:hover {
    background: #fee2e2;
    color: #ef4444;
}

/* Mobil Alt Kategori Akordeon */
.mobile-cat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 0;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--flora-text);
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
}

.mobile-sub-list {
    background: #f8fafc;
    padding: 10px 15px;
    border-radius: 8px;
    margin-top: 5px;
    display: none;
}

.mobile-sub-list.active {
    display: block;
}

.mobile-sub-list a {
    display: block;
    padding: 8px 0;
    font-size: 0.85rem;
    color: #475569;
    border-bottom: 1px dashed #e2e8f0;
}

.mobile-sub-list a:last-child {
    border-bottom: none;
}

.mobile-sub-link-all {
    font-weight: 700 !important;
    color: var(--flora-green-primary) !important;
}

/* --- 5. RESPONSIVE (Masaüstü ve Mobil Uyumluluk Kilitleri) --- */
@media (min-width: 993px) {

    /* Masaüstünde Hamburger Menüyü GİZLE */
    .mobile-menu-toggle {
        display: none !important;
    }
}

@media (max-width: 992px) {

    /* Tablet ve Mobilde Değişecekler */
    .header-search {
        display: none !important;
    }

    /* Arama mobilde sidebar'a gider */
    .header-bottom {
        display: none !important;
    }

    /* Mega menü mobilde gizlenir */
    .header-right {
        gap: 15px;
    }

    .action-item span {
        display: none;
    }

    /* İkon yazıları mobilde gizlenir */
    .header-logo img {
        max-height: 45px;
    }

    .action-item i {
        font-size: 1.5rem;
        margin-bottom: 0;
    }

    /* Mobil başlık padding ayarları (Resimdeki taşmayı engeller) */
    .header-middle {
        padding: 10px 0 !important;
    }

    .flora-topbar {
        padding: 15px 10px !important;
        /* Metnin rahatlaması için */
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
    }
}

/* ==================================================
   YENİ: AŞAĞI KAYDIRINCA ÜST KISMI GİZLE (SADECE MASAÜSTÜ)
================================================== */
@media (min-width: 993px) {

    /* Orta alanın (Logo, arama, ikonlar) geçiş animasyonu ayarları */
    .header-middle {
        transition: max-height 0.4s ease, padding 0.4s ease, opacity 0.3s ease;
        max-height: 150px;
        /* Standart yüksekliği kapsayacak genişlik */
        opacity: 1;
        overflow: hidden;
        /* Küçülürken içindekilerin taşmasını engeller */
    }

    /* JavaScript "header-scrolled" sınıfını eklediğinde tetiklenecek görünüm */
    .flora-header.header-scrolled .header-middle {
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
        opacity: 0;
        pointer-events: none;
        /* Gizlendiğinde yanlışlıkla tıklanmasını önler */
    }
}