﻿/* Top Bar - REVERTED to original dark theme */
.top-bar {
    background-color: white;
    color: white;
    padding: 5px;
    position: relative;
    z-index: 10;
}

.mobile-user-profile .user-mobile-details, .user-avatar-mobile {
    display: none;
}

.mobile-header-actions {
    display: none;
}

.mobile-bottom-nav {
    display: none;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
    min-height: 60px;
    position: relative;
}

.logo, .header-actions {
    display: flex;
    align-items: center;
}

    .logo img {
        height: 40px;
        vertical-align: middle;
    }
/* Main Nav - REVERTED to original overlapping tab style */

.main-nav {
    display: flex;
    align-items: flex-end;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

    .main-nav ul {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        align-items: flex-end;
        gap: 4px;
        margin-bottom: -5px; /* Overlap effect */
    }

        .main-nav ul li {
            padding-bottom: 0;
        }

            .main-nav ul li a {
                color: white;
                text-decoration: none;
                font-size: 14px;
                font-weight: 500;
                padding: 9px 0;
                border-radius: 10px 10px 0 0;
                display: block;
                text-align: center;
                width: 140px;
                transition: background-color 0.3s;
            }

                .main-nav ul li a.active {
                    background-color: #482875; /*padding-top: 15px;*/
                    position: relative;
                }

                .main-nav ul li a:not(.active) {
                    background-color: #4828757A;
                }

.header-actions {
    gap: 1.5rem;
}
/* Promo Section - Unchanged */

.promo-section {
    background-color: #482875;
    color: white;
    padding: 30px 20px 30px 20px;
    text-align: center;
}

.promo-container h1 {
    font-size: 1.5rem;
    font-weight: normal;
    margin: 0;
    outline: none;
}

.promo-container h2 {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 5px 0 20px 0;
}

.search-container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.search-bar-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.search-bar-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    position: relative;
}

.search-bar-top-links {
    display: flex;
    gap: 1rem;
    position: absolute;
    bottom: 0;
}

    .search-bar-top-links:first-child {
        left: 0;
    }

    .search-bar-top-links:last-child {
        right: 0;
    }

.search-bar-main {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-bar-wrapper .nav-item {
    background: #fdf5ec;
    color: #434343;
    border-radius: 8px;
    padding: 0.9rem 1.8rem;
    height: 50px;
    border: 1px solid #e6c6a2;
    font-weight: 500;
    text-decoration: none;
}

    .search-bar-wrapper .nav-item:hover {
        background: #fff;
        color: #a16a2c;
    }

.search-bar-main .nav-item {
    background: #fdf5ec;
    color: #434343;
    border-radius: 8px;
    padding: 0.9rem 1.8rem;
    height: 50px;
    border: 1px solid #e6c6a2;
    font-weight: 500;
    text-decoration: none;
}

    .search-bar-main .nav-item:hover {
        background: #fff;
        color: #a16a2c;
    }

.search-bar-main .sub-header-actions {
    flex-shrink: 0;
    position: relative;
}
    /* Dropdown scroll fix */

    .search-bar-main .sub-header-actions .dropdown-menu {
        max-height: 300px;
        overflow-y: auto;
    }
/* Tedarikçiler dropdown scroll */

.tedarikci-dropdown {
    max-height: 440px !important;
    overflow-y: auto !important;
    min-width: 250px !important;
    border-radius: 8px !important;
    scrollbar-width: thin;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
    border: none !important;
}
/* Tedarikçiler butonu stili düzeltme */

.search-bar-wrapper .categories-dropdown {
    flex-shrink: 0;
    position: relative;
}

.categories-btn {
    background: #F4F3F3;
    color: #434343;
    border-radius: 8px;
    padding: 0.9rem 2.5rem;
    height: 50px;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: all 0.3s ease;
}

    .categories-btn:hover {
        background: #fff;
        color: #a16a2c;
    }

    .categories-btn .fa-chevron-down {
        font-size: 12px;
    }
/* 2. Search Bar Style Update */

.search-bar {
    display: flex;
    align-items: center;
    background-color: #F4F3F3;
    border-radius: 10px;
    padding: 5px;
    width: 100%;
    height: 50px;
    flex-grow: 1;
}

    .search-bar .fa-search {
        color: #555;
        margin: 0 10px 0 15px;
        font-size: 18px;
        cursor: pointer;
    }

    .search-bar input {
        border: none;
        outline: none;
        flex-grow: 1;
        font-size: 16px;
        background: transparent;
        height: 100%;
        color: #333;
    }

    .search-bar .categories-btn {
        background-color: #e0e0e0;
        color: #333;
        border: none;
        border-radius: 8px;
        padding: 0 20px;
        font-size: 16px;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 8px;
        height: 40px;
        margin-right: 5px;
        white-space: nowrap;
    }

    .search-bar .categories-dropdown .dropdown-menu {
        right: 0;
        left: auto;
    }
/* Tüm Ürünleri Gör Linki - Kategoriler butonunun üstünde */

.all-products-link-top {
    color: #F4F3F3;
    text-decoration: underline;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.3rem 0 1rem 0;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: inline-block;
}

    .all-products-link-top:hover {
        color: #e0e0e0;
        text-decoration: none;
    }
/* Expo Tedarikçisi Ol Linki - Mağazalar butonunun üstünde */

.expo-tedarikci-link {
    color: #F4F3F3;
    text-decoration: underline;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.3rem 0 1rem 0;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: inline-block;
}

    .expo-tedarikci-link:hover {
        color: #e0e0e0;
        text-decoration: none;
    }
/* --- User Info Display Styles (Header component uyumlu) --- */

.pp-user-info-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: #f8fafc;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    min-height: 44px;
    min-width: 200px;
    opacity: 1;
    transform: translateY(0);
}

    .pp-user-info-display:hover {
        background: #f1f5f9;
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .pp-user-info-display[aria-expanded="true"] {
        background: #e2e8f0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }

.header-actions .dropdown {
    position: relative;
}

    .header-actions .dropdown .dropdown-menu {
        position: absolute !important;
        top: 100% !important;
        left: auto !important;
        right: 0 !important;
        transform: none !important;
        margin-top: 0.25rem !important;
        min-width: 240px !important;
        width: 300px !important;
        max-width: 370px !important;
        white-space: normal !important;
    }
/* Kategoriler ve Tedarikçiler Dropdown Positioning Fix */

.categories-dropdown .dropdown-menu, .search-bar-main .sub-header-actions .dropdown .dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: auto !important;
    transform: none !important;
    margin-top: 0.25rem !important;
    z-index: 1050 !important;
}
/* Tedarikçiler dropdown'ı için özel pozisyonlama */

.search-bar-main .sub-header-actions .dropdown {
    position: relative;
}
/* Kategoriler dropdown container */

.categories-dropdown {
    position: relative;
}
/* Tüm dropdown menüler için Popper.js override */

.dropdown-menu[data-bs-popper] {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: auto !important;
    transform: none !important;
    margin-top: 0.25rem !important;
}
/* Özel dropdown menüler için z-index */

.search-bar-main .dropdown-menu, .categories-dropdown .dropdown-menu {
    z-index: 1050 !important;
}

.pp-user-avatar {
    font-size: 1.2rem;
    color: #ff8006;
    transition: all 0.3s ease;
}

.pp-user-info-display:hover .user-avatar {
    color: #e67300;
    transform: scale(1.05);
}

.pp-user-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.pp-user-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.8rem;
}

.pp-user-email {
    font-size: 0.85rem;
    color: #64748b;
}

.pp-user-company {
    font-size: 0.85rem;
    color: #ff8006;
    font-weight: 500;
}

.pp-user-role {
    font-size: 0.8rem;
    color: #ff8006;
    font-weight: 600;
    text-transform: uppercase;
}
/* Dropdown Header için Kullanıcı Bilgileri */

.dropdown-header {
    border: none !important;
    margin: 0 !important;
}

.dropdown-user-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dropdown-user-email, .dropdown-user-company {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #64748b;
}

    .dropdown-user-email i, .dropdown-user-company i {
        width: 16px;
        color: #94a3b8;
        font-size: 0.8rem;
    }
/* Sepet Butonu */

.sepet-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    background: #f8fafc;
    color: #475569;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    text-decoration: none;
    white-space: nowrap;
    position: relative;
}

    .sepet-btn:hover {
        background: rgba(255, 128, 6, 0.1);
        color: #ff8006;
    }

    .sepet-btn .badge {
        position: absolute;
        top: -5px;
        right: -5px;
        background-color: #ff8006;
        color: white;
        border-radius: 50%;
        padding: 2px 6px;
        font-size: 12px;
        font-weight: bold;
        min-width: 20px;
        text-align: center;
    }
/* Auth Buttons - Giriş Yap ve Kayıt Ol */

.auth-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.auth-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    border: 2px solid transparent;
    white-space: nowrap;
}

    .auth-btn i {
        font-size: 1rem;
    }

.login-btn {
    margin-left: 0;
    text-decoration: underline;
    font-size: 16px;
    color: #482875;
    background: transparent;
}

    .login-btn:hover {
        text-decoration: none;
    }

.register-btn {
    background: #fff;
    color: black;
    border-color: #ff8006;
    box-shadow: 3px 3px 0 0 #482875;
    border: 1px solid #482875;
}

    .register-btn:hover {
        background: #ff8006;
        color: white;
    }
/* Shimmer/Skeleton Loader Styles */

.shimmer {
    animation: shimmer-animation 1.5s infinite linear;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    color: transparent !important;
    border-radius: 4px;
}
/* Shimmer User Info Display için özel stil */

.pp-user-info-display.shimmer-loading {
    min-width: 200px;
    min-height: 44px;
    justify-content: flex-start;
}

    .pp-user-info-display.shimmer-loading .pp-user-avatar.shimmer {
        width: 24px;
        height: 24px;
        border-radius: 50%;
        flex-shrink: 0;
    }

    .pp-user-info-display.shimmer-loading .pp-user-details {
        flex: 1;
        min-height: 32px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

.pp-user-details .shimmer-line {
    display: block;
    height: 12px;
    margin-bottom: 4px;
    border-radius: 6px;
}

    .pp-user-details .shimmer-line:last-child {
        margin-bottom: 0;
    }

    .pp-user-details .shimmer-line.name {
        width: 100px;
        height: 14px;
    }

    .pp-user-details .shimmer-line.role {
        width: 120px;
        height: 11px;
    }

@keyframes shimmer-animation {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.dropdown-menu {
    border-radius: 8px;
    border: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    background-color: #fff;
}

.profile .dropdown-item {
    padding: 0.6rem 1.2rem;
    color: #475569;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.dropdown-item {
    padding: 0.6rem 1.2rem;
    color: #475569;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    font-size: 0.85rem;
}

    .dropdown-item:hover {
        background-color: #ff8c4220;
        color: #ff8006;
    }

    .dropdown-item i {
        margin-right: 0.5rem;
        width: 20px;
        text-align: center;
    }

.kategori-dropdown.dropdown-menu {
    min-width: 350px !important;
    max-width: 1050px !important;
    width: auto !important;
    max-height: 520px !important;
    padding: 0 !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: auto !important;
    transform: none !important;
    margin-top: 0.25rem !important;
    z-index: 1050 !important;
}

.header-kategori-container {
    display: flex;
    transition: width 0.3s ease-in-out;
    overflow: hidden;
    max-height: 520px;
}

.header-kategori-panel {
    width: 350px;
    flex-shrink: 0;
    max-height: 520px;
    overflow-y: auto;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    padding: 6px;
    scrollbar-width: thin;
}

    .header-kategori-panel:last-child {
        border-right: none;
    }

.header-kategori-item {
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 3px 0;
}

    .header-kategori-item:hover {
        background: rgba(255, 128, 6, 0.1);
    }

    .header-kategori-item.active {
        background: rgba(255, 128, 6, 0.15);
    }

.header-kategori-link {
    text-decoration: none;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border-radius: 8px;
    font-size: 0.95rem;
}

    .header-kategori-link:hover {
        color: #ff8006;
        text-decoration: none;
        background: rgba(255, 128, 6, 0.05);
    }

.float-end {
    display: flex;
    align-items: center;
    color: #94a3b8;
    font-size: 0.85rem;
    margin-left: auto;
    padding-left: 10px;
}

@media (max-width: 1200px) {
    .search-container {
        width: auto;
    }
}


@media (max-width: 1100px) {
    .main-nav {
        left: 45%;
    }

        .main-nav ul li a {
            font-size: 12px;
            width: 100px;
        }

    .header-actions {
        gap: 0.5rem;
    }

    .pp-user-name {
        font-size: 0.7rem;
    }
}

@media (max-width: 992px) {
    .expo-tedarikci-link {
        padding: 0.3rem 0 0.5rem 0;
    }

    .all-products-link-top {
        padding: 0.3rem 0 0.5rem 0;
    }

    .search-bar-top {
        margin-top: 0.8rem;
    }
}

.mobile-nav-dropdown .dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important; /* 10px space from right edge */
    left: auto !important;
    transform: none !important; /* Remove transform for right alignment */
    margin-bottom: 0.5rem !important;
    width: 100%;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.1);
    z-index: 1011; /* Ensure it's above other elements */
}

.mobile-nav-dropdown .dropdown-item.active, .mobile-nav-dropdown .dropdown-item.active:hover {
    color: #482875;
    background-color: #f0ebf5;
    font-weight: 700;
}

.nav-dropdown-btn.dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    max-width: 180px;
    width: 150px;
    color: #482875;
    font-weight: 600;
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .nav-dropdown-btn.dropdown-toggle:hover {
        background-color: #f1f5f9;
        border-color: #cbd5e1;
    }

.mobile-bottom-nav .dropup {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
}

    .mobile-bottom-nav .dropup .mobile-nav-item-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: #4a4a4a;
        text-decoration: none;
        font-size: 11px;
        font-weight: 500;
        gap: 4px;
        text-align: center;
    }

        .mobile-bottom-nav .dropup .mobile-nav-item-content i {
            font-size: 20px;
            margin-bottom: 2px;
        }

    .mobile-bottom-nav .dropup .dropdown-menu {
        position: absolute !important;
        bottom: 100% !important;
        right: 10px !important; /* 10px space from right edge */
        left: auto !important;
        transform: none !important; /* Remove transform for right alignment */
        margin-bottom: 0.5rem !important;
        max-width: calc(100vw - 20px); /* Max width of screen minus 10px padding on each side */
        width: max-content; /* Allow content to define width, up to max-width */
        border-radius: 8px;
        border: 1px solid #e2e8f0;
        box-shadow: 0 -5px 15px rgba(0,0,0,0.1);
        z-index: 1011; /* Ensure it's above other elements */
    }

@media (max-width: 768px) {
    body {
        padding-bottom: 50px; /* Height of bottom nav */
    }

    .search-container {
        width: 100% !important;
    }

    .search-bar-top {
        margin-top: 0;
    }

    .main-nav, .header-actions {
        display: none;
    }

    .mobile-header-actions {
        display: block;
    }

    .header-container {
        justify-content: space-between;
        align-items: center;
        padding: 0 1rem;
    }

    .pp-header .logo img {
        width: auto;
        height: 30px;
    }

    .promo-section {
        padding: 20px 15px 25px 15px;
    }

    .promo-container h1 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    .promo-container h2 {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }

    .search-bar-main {
        gap: 1rem;
        align-items: stretch;
    }

    .search-bar-wrapper {
        flex-direction: column;
    }

    .search-bar-main .categories-desktop {
        display: none;
    }

    .search-bar-main .sub-header-actions {
        padding-top: 0;
    }

    .search-bar-wrapper .categories-dropdown {
        padding-top: 0;
    }

    .search-bar-top {
        flex-direction: row;
        gap: 0.5rem;
        position: static;
    }

    .search-bar-top-links {
        position: static;
    }

    .mobile-user-profile {
        display: flex;
        align-items: center;
        gap: 0.3rem;
        text-decoration: none;
        color: inherit;
        background-color: #f8fafc;
        border: 1px solid #e2e8f0;
        padding: 0.5rem 0.5rem;
        border-radius: 8px;
        transition: all 0.2s ease;
        max-width: 160px;
    }

        .mobile-user-profile:hover {
            background-color: #f1f5f9;
            border-color: #cbd5e1;
        }

        .mobile-user-profile .user-avatar-mobile {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 20px;
            height: 20px;
            color: #64748b;
            font-size: 12px;
            flex-shrink: 0;
        }

        .mobile-user-profile .user-details, .mobile-user-profile .user-mobile-details {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            overflow: hidden;
            flex: 1;
            min-width: 0;
        }

        .mobile-user-profile .user-name, .mobile-user-profile .user-company {
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            width: 100%;
        }

        .mobile-user-profile .user-name {
            font-weight: 600;
            font-size: 0.85rem;
            color: #1e293b;
            line-height: 1.2;
        }

        .mobile-user-profile .user-company, .mobile-user-profile .user-email {
            font-size: 0.7rem;
            color: #64748b;
            line-height: 1.1;
        }

    .mobile-profile-dropdown {
        position: relative;
    }

    .top-header-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        gap: 10px;
    }

    .mobile-profile-dropdown .dropdown-menu {
        position: absolute !important;
        top: calc(100% + 5px) !important;
        transform: none !important;
        width: 220px !important;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15) !important;
        border: 1px solid #e2e8f0 !important;
        z-index: 1001;
        margin-top: 0 !important;
        background: #fff;
        font-size: 0.8rem;
    }

    .top-header-row .dropdown {
        width: unset;
    }

    .dropdown-item {
        padding: 0.4rem 1rem;
    }

        .dropdown-item .rz-button {
            padding: 0 !important;
            min-height: 0 !important;
            font-size: 0.8rem !important;
        }
    /* Bottom Nav Bar */

    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0; /*        height: 65px;*/
        background: #ffffff;
        border-top: 1px solid #e0e0e0;
        box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.05);
        z-index: 1010;
        justify-content: space-around;
        align-items: flex-start;
        padding-top: 8px;
    }

        .mobile-nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            flex: 1;
            color: #4a4a4a;
            text-decoration: none;
            font-size: 11px;
            font-weight: 500;
            gap: 4px;
            text-align: center;
        }

        .mobile-nav-item i {
            font-size: 20px;
            margin-bottom: 2px;
        }

        .mobile-nav-item.active, .mobile-nav-item:hover {
            color: #ff8006;
        }
}
