/* Modern Sephora-Style Navbar */

.modern-navbar {
    margin: 0;
    padding: 0;
    position: relative;
}

/* Topbar Styles */
.topbar {
    font-size: 0.875rem;
    min-height: 40px;
    position: relative;
}

.topbar-announcement {
    font-size: 0.875rem;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.user-links {
    z-index: 10;
}

/* Main Header Styles - Shadow removed for cleaner look */

.navbar-brand {
    text-decoration: none;
    color: #000 !important;
}

.search-wrapper {
    max-width: 500px;
    margin: 0 auto;
}

.search-form .form-control,
.search-form .form-control-lg,
.search-wrapper .form-control,
.search-wrapper .form-control-lg {
    border: none !important;
    padding: 12px 50px 12px 20px !important;
    font-size: 16px;
    transition: none !important;
    background: #f8f9fa !important;
    box-shadow: none !important;
    border-color: transparent !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
}

.search-form .form-control:focus,
.search-form .form-control-lg:focus,
.search-wrapper .form-control:focus,
.search-wrapper .form-control-lg:focus,
.search-form .form-control:active,
.search-form .form-control-lg:active,
.search-wrapper .form-control:active,
.search-wrapper .form-control-lg:active {
    background: #f8f9fa !important;
    box-shadow: none !important;
    outline: none !important;
    border-color: transparent !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
    border: none !important;
}

.header-actions .header-action-item {
    color: #000;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.header-actions .header-action-item:hover {
    color: #666;
}

.action-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #dc3545;
    color: white;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    line-height: 1.2;
}

/* Navigation Menu */
/* Clean borderless design */

.nav-menu-list {
    list-style: none;
    min-height: 50px;
}

.nav-menu-item {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-menu-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.nav-menu-link:hover {
    color: #000 !important;
}

.dropdown-menu {
    border-radius: 8px;
    margin-top: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.dropdown-item {
    font-size: 0.875rem;
    padding: 8px 16px;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #000;
}

/* Mega Menu Styles */
.mega-menu-item {
    position: relative;
}

.mega-menu-item:hover .mega-dropdown,
.mega-dropdown:hover {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0);
}

.mega-dropdown {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    width: 100%;
    background: #f8f9fa !important;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: none;
    border-radius: 0;
    margin-top: 0;
}

/* Marquee Styles */
.mega-marquee {
    width: 100%;
    overflow: hidden;
    padding: 6px 0;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.marquee-content {
    display: inline-block;
    padding-left: 100%;
    animation: scroll-left linear infinite;
    font-weight: 500;
    letter-spacing: 0.5px;
    animation-duration: inherit;
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

.mega-dropdown .container-fluid {
    padding-top: 40px;
}

.mega-dropdown.show {
    opacity: 1;
    visibility: visible;
    display: block;
}

.mega-category {
    text-align: center;
    padding: 15px;
    transition: all 0.3s ease;
    background: transparent;
}

.mega-category:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
}

.category-image {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 50%;
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
}

.category-image img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.category-image i {
    transition: all 0.3s ease;
}

.category-image:hover img,
.category-image:hover i {
    transform: scale(1.1);
}

.category-image:hover {
    border-color: var(--bs-primary);
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-info) 100%);
}

.category-image:hover i {
    color: white !important;
}

.mega-title {
    color: #333;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
}

.mega-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-submenu li {
    margin-bottom: 6px;
}

.mega-submenu a {
    color: #666;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    display: block;
    padding: 4px 8px;
    border-radius: 4px;
}

.mega-submenu a:hover {
    color: #000;
    background-color: #f8f9fa;
}

/* Minimal action icons */
.header-actions .action-icon i {
    font-size: 1.2rem;
}

.action-badge {
    font-size: 0.7rem;
    padding: 1px 5px;
    min-width: 16px;
}

/* Search Bar Styles */
.search-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.search-form .input-group {
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.search-form .form-control {
    border: 2px solid #e9ecef;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.search-form .form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: none;
}

.search-categories select {
    min-width: 150px;
    border: 2px solid #e9ecef;
    border-left: none;
    border-right: none;
    background-color: #f8f9fa;
}

.search-form .btn {
    border-radius: 0 50px 50px 0;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--bs-primary);
    border-left: none;
}

/* Search Suggestions */
.search-suggestions {
    top: 100%;
    left: 0;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

/* Header Actions */
.header-actions {
    gap: 1rem;
}

.header-action-item {
    transition: transform 0.3s ease;
    padding: 0.5rem;
    border-radius: 0.5rem;
}

.header-action-item:hover {
    transform: translateY(-2px);
}

.action-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #f8f9fa;
    color: var(--bs-primary);
    transition: all 0.3s ease;
}

.header-action-item:hover .action-icon {
    background-color: var(--bs-primary);
    color: white;
    transform: scale(1.1);
}

.action-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.action-text small {
    font-size: 0.75rem;
    line-height: 1;
}

.action-text strong {
    font-size: 0.9rem;
    line-height: 1;
}

/* Mega Menu Styles */
.mega-nav {
    padding: 0;
    position: relative;
}

.mega-menu-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
}

.mega-menu-item {
    position: relative;
}

.mega-menu-link {
    display: block;
    padding: 1rem 1.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.mega-menu-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white !important;
}

.mega-menu-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background-color: white;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.mega-menu-link:hover::after,
.mega-menu-item:hover .mega-menu-link::after {
    width: 80%;
}

/* Categories Dropdown */
.categories-menu {
    position: static;
}

.categories-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    padding: 2rem 0;
}

.categories-menu:hover .categories-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-title {
    color: var(--bs-primary);
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--bs-primary);
}

.mega-submenu {
    list-style: none;
    padding: 0;
}

.mega-submenu li {
    margin-bottom: 0.5rem;
}

.mega-submenu a {
    color: #6c757d;
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
    padding: 0.25rem 0;
}

.mega-submenu a:hover {
    color: var(--bs-primary);
    padding-left: 0.5rem;
}

/* Mobile Styles */
@media (max-width: 991.98px) {
    .topbar {
        font-size: 0.75rem;
    }
    
    .topbar .col-md-6:first-child .d-flex {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .topbar .col-md-6:first-child span {
        margin-bottom: 0.25rem;
        margin-right: 0 !important;
    }
    
    .main-header {
        padding: 0.75rem 0;
    }
    
    .search-wrapper {
        margin: 1rem 0;
    }
    
    .header-actions .action-text {
        display: none !important;
    }
    
    .header-actions {
        justify-content: space-around !important;
    }
    
    .mega-nav {
        display: none;
    }
    
    .navbar-brand {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .search-categories {
        display: none;
    }
    
    .search-form .input-group {
        border-radius: 25px;
    }
    
    .search-form .btn {
        border-radius: 0 25px 25px 0;
    }
    
    .header-action-item {
        padding: 0.25rem;
    }
    
    .action-icon {
        width: 40px;
        height: 40px;
    }
}

/* Sticky Navbar Effect - Only Navigation Menu */
.main-nav.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    animation: slideDown 0.3s ease;
    background: white;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid #e9ecef;
}

.main-nav.sticky .nav-menu-list {
    min-height: 45px;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Loading Animation for Search */
.search-loading {
    position: absolute;
    right: 80px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--bs-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

/* Responsive Design for New Layout */
@media (max-width: 991.98px) {
    .search-wrapper {
        max-width: none !important;
        margin: 15px 0;
    }
    
    .header-actions {
        justify-content: center !important;
        margin-top: 15px;
    }
    
    .header-actions .header-action-item {
        margin: 0 15px;
    }
    
    .mega-dropdown {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        padding: 20px;
        overflow-y: auto;
    }
    
    .mega-category {
        margin-bottom: 20px;
    }
    
    .category-image {
        width: 60px;
        height: 60px;
    }
    
    .category-image img {
        width: 45px;
        height: 45px;
    }
    
    .category-image i {
        font-size: 1.8rem !important;
    }
}

/* Mobile Header Styles */
.mobile-header {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.mobile-menu-btn {
    border: none;
    background: none;
    padding: 0;
}

.mobile-menu-btn:focus {
    box-shadow: none;
}

.mobile-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items-center;
    justify-content: center;
    font-weight: bold;
    min-width: 18px;
}

.mobile-search-wrapper .input-group-text {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-right: none;
    border-radius: 25px 0 0 25px;
}

.mobile-search-wrapper .form-control {
    border: 1px solid #dee2e6;
    border-left: none;
    border-radius: 0 25px 25px 0;
    padding-left: 0;
}

.mobile-search-wrapper .form-control:focus {
    border-color: #007bff;
    box-shadow: none;
}

.mobile-search-wrapper .input-group-text + .form-control:focus {
    border-left: none;
}

@media (max-width: 991.98px) {
    .d-lg-none {
        display: block !important;
    }
    
    .d-none.d-lg-block {
        display: none !important;
    }
}

@media (max-width: 767.98px) {
    .topbar .user-links {
        text-align: center !important;
    }
    
    .topbar .user-links a {
        font-size: 0.8rem;
        margin: 0 10px !important;
    }
    
    .main-header {
        padding: 15px 0;
    }
    
    .navbar-brand {
        font-size: 1.5rem !important;
        text-align: center;
    }
    
    .nav-menu-list {
        flex-direction: column;
        align-items: stretch !important;
    }
    
    .nav-menu-link {
        justify-content: center;
        padding: 12px !important;
    }
    
    .mega-dropdown {
        padding: 15px;
    }
    
    .mega-dropdown .row > div {
        margin-bottom: 15px;
    }
}