﻿/**
 * KAPLAN E-Ticaret Arayüzü - Global Menü & Header Modülü (menu.css)
 * Tüm sayfalarda (index, urundetay, sepet, odeme vb.) ortak çalışan standart menü ve mobil drawer mimarisi.
 */

/* ==========================================================================
   1. BRAND & HEADER TEMEL YAPISI
   ========================================================================== */
.brand-rainbow-bar {
    height: 4px;
    width: 100%;
    background: linear-gradient(90deg, #C88A75 0%, #1A2B4C 35%, #27ae60 70%, #C88A75 100%);
}

/* HEADER ARKA PLAN RESMİ (hb_login_back.jpg) VE GRADIENT KAPLAMA */
.kaplan-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.88) 0%, rgba(248, 244, 242, 0.88) 100%), url('/assets/images/hb_login_back.jpg') center/cover no-repeat !important;
    box-shadow: 0 2px 12px rgba(200, 138, 117, 0.08);
}

.brand-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0 6px 0;
}

.brand-logo-img {
    height: 42px;
    width: auto;
    object-fit: contain;
}

.header-top-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ==========================================================================
   2. ARAMA BARI (TOP BAR)
   ========================================================================== */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 0 14px 0;
}

.search-container {
    position: relative;
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 12px 54px 12px 20px;
    border: 2px solid var(--primary, #C88A75);
    border-radius: 28px;
    font-size: 14px;
    outline: none;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 14px rgba(200, 138, 117, 0.15);
    font-weight: 500;
}

.search-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: var(--secondary, #1A2B4C);
    color: #ffffff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

    .search-btn:hover {
        background: var(--secondary-hover, #111D36);
    }

/* ==========================================================================
   3. ANA NAVİGASYON BARI & LİNKLER
   ========================================================================== */
.main-nav-bar {
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid var(--gray-border, #e2e5eb);
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, #C88A75 0%, #1A2B4C 35%, #27ae60 70%, #C88A75 100%) 1;
    position: relative !important;
}

.main-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link-item {
    position: static !important;
}

    .nav-link-item > a {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 13px;
        font-weight: 600;
        color: #333;
        text-decoration: none;
        padding: 12px 14px;
        transition: all 0.2s;
    }

    .nav-link-item:hover > a {
        color: var(--primary, #C88A75);
        background: #fdf3f0;
    }

.all-filters-btn, .btn-all-filters {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 13px;
    background: var(--secondary, #1A2B4C);
    border: 1px solid var(--secondary, #1A2B4C);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    margin: 6px 0;
    text-decoration: none;
    transition: background 0.2s;
}

    .all-filters-btn:hover, .btn-all-filters:hover {
        background: var(--secondary-hover, #111D36);
    }

/* ==========================================================================
   4. KAPLAN DİNAMİK MEGA MENÜ MİMARİSİ
   ========================================================================== */
.mega-menu-container {
    display: none;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 1100 !important;
    padding-top: 2px !important;
}

    .mega-menu-container::before {
        content: '';
        position: absolute;
        top: -10px;
        left: 0;
        width: 100%;
        height: 15px;
        background: transparent;
    }

.mega-menu-inner {
    background: #ffffff !important;
    border-bottom: 3px solid var(--primary, #C88A75) !important;
    border-radius: 0 0 12px 12px !important;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15) !important;
    padding: 20px 24px !important;
    margin: 0 auto !important;
    max-width: 1320px !important;
    width: 100% !important;
    max-height: calc(85vh - 80px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

.nav-link-item:hover .mega-menu-container {
    display: block !important;
}

.mega-menu-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 16px 24px !important;
    width: 100% !important;
    align-items: start !important;
}

.mega-column {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    min-width: 0 !important;
}

.mega-col-header {
    font-size: 12.5px !important;
    font-weight: 800 !important;
    color: var(--secondary, #1A2B4C) !important;
    text-transform: uppercase !important;
    padding-bottom: 4px !important;
    border-bottom: 2px solid #fdf3f0 !important;
    margin-bottom: 6px !important;
}

.mega-item-list {
    list-style: none !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    margin: 0 !important;
    padding: 0 !important;
}

    .mega-item-list a {
        font-size: 12px !important;
        color: #555 !important;
        text-decoration: none !important;
        font-weight: 500 !important;
        display: block !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        transition: transform 0.15s, color 0.15s !important;
    }

        .mega-item-list a:hover {
            color: var(--primary, #C88A75) !important;
            font-weight: 700 !important;
            transform: translateX(3px) !important;
        }

.mega-menu-inner::-webkit-scrollbar {
    width: 6px !important;
}

.mega-menu-inner::-webkit-scrollbar-track {
    background: #f1f1f1 !important;
    border-radius: 4px !important;
}

.mega-menu-inner::-webkit-scrollbar-thumb {
    background: var(--primary, #C88A75) !important;
    border-radius: 4px !important;
}

/* ==========================================================================
   5. KULLANICI DROPDOWN & HEADER BUTONLARI
   ========================================================================== */
.custom-user-dropdown {
    position: relative !important;
    display: inline-block !important;
}

.custom-user-btn {
    position: relative !important;
    color: var(--primary, #C88A75) !important;
    text-decoration: none !important;
    font-size: 13px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 7px 14px !important;
    border-radius: 6px !important;
    border: 1px solid var(--primary, #C88A75) !important;
    background: rgba(255, 255, 255, 0.95) !important;
    font-weight: 600 !important;
    cursor: pointer !important;
}

    .custom-user-btn:hover,
    .custom-user-dropdown.active .custom-user-btn {
        background: var(--primary, #C88A75) !important;
        color: #ffffff !important;
    }

.custom-dropdown-box {
    display: none !important;
    position: absolute !important;
    top: calc(100% + 6px) !important;
    right: 0 !important;
    left: auto !important;
    background: #ffffff !important;
    border: 1px solid var(--gray-border, #e2e5eb) !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important;
    min-width: 170px !important;
    z-index: 2500 !important;
    padding: 6px 0 !important;
    list-style: none !important;
    margin: 0 !important;
}

.custom-user-dropdown.active .custom-dropdown-box {
    display: block !important;
}

.custom-dropdown-box a {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 9px 16px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #333333 !important;
    text-decoration: none !important;
}

    .custom-dropdown-box a:hover {
        background-color: #fdf3f0 !important;
        color: var(--primary, #C88A75) !important;
    }

.custom-dropdown-box .divider {
    height: 1px;
    background: var(--gray-border, #e2e5eb);
    margin: 4px 0;
}

.action-item {
    position: relative;
    color: var(--primary, #C88A75);
    text-decoration: none;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 6px;
    border: 1px solid var(--primary, #C88A75);
    background: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    cursor: pointer;
}

.badge-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--secondary, #1A2B4C);
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
}

.mobile-avatar-circle {
    display: none !important;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary, #C88A75);
    color: #fff;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* ==========================================================================
   6. OFF-CANVAS MOBİL YAN MENÜ (NAV DRAWER) & BOTTOM BAR
   ========================================================================== */
.nav-drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

    .nav-drawer-backdrop.active {
        opacity: 1;
        visibility: visible;
    }

.nav-drawer {
    position: fixed;
    top: 0;
    left: -340px;
    width: 320px;
    height: 100%;
    background: #ffffff;
    z-index: 3001;
    transition: left 0.3s ease-out;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 25px rgba(0,0,0,0.2);
}

.nav-drawer-backdrop.active .nav-drawer {
    left: 0;
}

.nav-drawer-header {
    background: linear-gradient(135deg, var(--primary, #C88A75) 0%, #a66a56 100%);
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    position: relative;
    border-radius: 0 0 16px 16px;
    border-bottom: 3px solid var(--secondary, #1A2B4C);
}

.header-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #ffffff;
    color: var(--secondary, #1A2B4C);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 8px;
    border: 2px solid var(--primary, #C88A75);
}

.drawer-close-x {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

.nav-menu-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    padding: 10px 0;
    margin: 0;
}

.nav-menu-item {
    border-bottom: 1px solid #f5f5f5;
}

.nav-menu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 20px;
    font-size: 13.5px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
}

    .nav-menu-link i.left-icon {
        font-size: 18px;
        color: var(--secondary, #1A2B4C);
        width: 26px;
    }

    .nav-menu-link:hover {
        color: var(--primary, #C88A75);
    }

.accordion-sub-menu {
    display: none;
    background: #fafafa;
    padding: 4px 0;
    border-top: 1px solid #eee;
}

    .accordion-sub-menu a {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 9px 20px 9px 48px;
        font-size: 12.5px;
        color: #555;
        text-decoration: none;
        font-weight: 500;
    }

        .accordion-sub-menu a:hover {
            color: var(--primary, #C88A75);
            font-weight: 700;
        }

.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    border-top: 1px solid var(--gray-border, #e2e5eb);
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    z-index: 1200;
    box-shadow: 0 -3px 12px rgba(0,0,0,0.08);
}

@media (min-width: 992px) {
    .mobile-bottom-nav {
        display: none !important;
    }
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #555;
    text-decoration: none;
    font-size: 11.5px;
    font-weight: 600;
    flex: 1;
    min-height: 48px;
    position: relative;
}

    .nav-item i {
        font-size: 24px;
    }

.mobile-badge {
    position: absolute;
    top: -3px;
    right: 18%;
    background: var(--primary, #C88A75);
    color: #fff;
    font-size: 9.5px;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

/* ==========================================================================
   7. DUYARLILIK (RESPONSIVE) MEDYA SORGULARI
   ========================================================================== */
@media (max-width: 991px) {
    .main-nav-bar {
        display: none !important;
    }

    #hb-header-user-wrapper, #sepet-iconu {
        display: none !important;
    }

    .mobile-avatar-circle {
        display: flex !important;
    }

    body {
        padding-bottom: 80px;
    }
}
