/* ===== Google Font Import - Poppins ===== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600&display=swap');
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding-top: 205px;
    transition: padding-top 0.3s ease;
}

/* Navbar base styles */
.navbar-top, .navbar-bottom {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 1030;
    will-change: transform;
    transition: transform 0.3s ease;
}

.navbar-top {
    background-color: white;
    padding: 15px 0;
    top: 0;
    transform: translateY(0);
    height: auto;
    min-height: 80px;
    z-index: 1031;
}

.navbar-bottom {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 10px 0;
    top: 80px;
    transform: translateY(0);
    height: auto;
    min-height: 60px;
    z-index: 1030;
}

.navbar-bottom .container {
    position: relative !important;
}

body.navbar-top-hidden .navbar-top {
    transform: translateY(-100%);
}

body.navbar-top-hidden .navbar-bottom {
    transform: translateY(-80px);
}

/* Logo */
.logo {
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo i {
    font-size: 2rem;
    margin-right: 10px;
}

/* Search container */
.search-container {
    max-width: 600px;
    width: 100%;
    position: relative;
    z-index: 1032;
}

.search-box {
    border-radius: 50px;
    overflow: visible;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    position: relative;
    background: white;
}

/* Category dropdown */
.category-dropdown {
    position: relative;
    max-width: 180px;
    width: 100%;
    z-index: 1033;
}

.category-toggle {
    border: none;
    border-right: 1px solid #dee2e6;
    background-color: #f8f9fa;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    font-weight: 500;
    color: var(--dark-text);
    border-radius: 50px 0 0 50px;
    height: 100%;
}

.category-toggle:hover {
    background-color: #e9ecef;
}

.category-toggle i {
    margin-left: 8px;
    transition: transform 0.3s ease;
    font-size: 0.9rem;
}

.category-toggle.active i {
    transform: rotate(180deg);
}

.category-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 999999 !important;
    overflow: hidden;
    margin-top: 5px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.category-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.category-option {
    padding: 14px 20px;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 1px solid #f1f1f1;
    display: flex;
    align-items: center;
    color: var(--dark-text);
}

.category-option:last-child {
    border-bottom: none;
}

.category-option:hover {
    background-color: var(--primary-color);
    color: white;
    padding-left: 30px;
}

.category-option i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.search-input {
    border: none;
    padding: 12px 20px;
    flex: 1;
    min-width: 0;
}

.search-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0 25px;
    transition: all 0.3s;
    border-radius: 0 50px 50px 0;
    white-space: nowrap;
}

.search-btn:hover {
    background-color: #5a32a3;
}

/* Bottom navbar - with active state */
.nav-link {
    color: #495057;
    font-weight: 500;
    padding: 10px 20px !important;
    border-radius: 8px;
    transition: all 0.3s;
    margin: 0 2px;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.nav-link i {
    margin-right: 8px;
    font-size: 1.1rem;
}

.nav-link:hover {
    background-color: rgba(111, 66, 193, 0.1);
    color: var(--primary-color);
}

/* Active state for main nav links */
.nav-link.active {
    background-color: rgba(111, 66, 193, 0.15);
    color: var(--primary-color);
    font-weight: 600;
}

.nav-link.active i {
    color: var(--primary-color);
}

/* Animated arrow for dropdown toggles */
.nav-link .dropdown-arrow {
    margin-left: 8px;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.nav-link .dropdown-arrow.rotated {
    transform: rotate(180deg);
}

.cart-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Top actions */
.top-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.top-action-link {
    color: #495057;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    text-decoration: none;
    margin-left: 10px;
    white-space: nowrap;
}

.top-action-link:hover {
    background-color: rgba(111, 66, 193, 0.1);
    color: var(--primary-color);
}

.top-action-link i {
    margin-right: 5px;
}

/* Custom dropdown menu */
.custom-dropdown-menu {
    position: absolute;
    z-index: 999999;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    min-width: 200px;
    display: none;
    padding: 8px 0;
    border: 1px solid rgba(0,0,0,0.08);
    animation: dropdownFadeIn 0.2s ease;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.custom-dropdown-menu.show {
    display: block;
}

.dropdown-item-custom {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
}

.dropdown-item-custom:last-child {
    border-bottom: none;
}

.dropdown-item-custom i {
    width: 24px;
    margin-right: 12px;
    color: var(--primary-color);
    font-size: 1.1rem;
    transition: transform 0.2s;
}

.dropdown-item-custom:hover {
    background-color: #f8f9fa;
    padding-left: 28px;
}

.dropdown-item-custom:hover i {
    transform: scale(1.1);
}

/* Active state for dropdown items */
.dropdown-item-custom.active {
    background-color: rgba(111, 66, 193, 0.1);
    color: var(--primary-color);
    font-weight: 500;
}

.dropdown-item-custom.active i {
    color: var(--primary-color);
}

/* Backdrop overlay */
.dropdown-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
}

/* .dropdown-backdrop.show {
    display: block;
}*/

/* Responsive */
@media (max-width: 991px) {
    .navbar-bottom .navbar-nav-wrapper {
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        padding-bottom: 5px;
    }

    .navbar-bottom .navbar-nav {
        flex-wrap: nowrap;
        justify-content: flex-start;
        width: max-content;
    }

    .category-menu {
        z-index: 999999 !important;
    }
}

@media (max-width: 576px) {
    .logo {
        font-size: 1.5rem;
    }

    .logo i {
        font-size: 1.8rem;
    }

    .hero-section {
        padding: 40px 20px;
        text-align: center;
    }

    .hero-section .display-4 {
        font-size: 2rem;
    }

    .top-action-link span {
        display: none;
    }

    .top-action-link i {
        margin-right: 0;
        font-size: 1.2rem;
    }

    .cart-badge {
        top: 0;
        right: 0;
    }

    .custom-dropdown-menu {
        min-width: 200px;
    }
}