/* Main Navigation */
.main-navigation {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 88888;
    transition: all 0.3s ease;
}

.main-navigation.sticky {
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

/* Logo */
.nav-logo {
    flex-shrink: 0;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    color: #333;
    font-weight: 700;
    font-size: 1.3rem;
    transition: color 0.2s;
}

.logo-link:hover {
    color: #ee4d2d;
}

.logo-icon {
    font-size: 1.8rem;
}

.logo-text {
    font-weight: 800;
    background: linear-gradient(135deg, #ee4d2d, #ff6b47);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Search Bar */
.nav-search {
    flex: 1;
    max-width: 500px;
    margin: 0 2rem;
    position: relative;
}

.search-form {
    position: relative;
}

.search-input-container {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.search-input-container:focus-within {
    border-color: #ee4d2d;
    box-shadow: 0 0 0 3px rgba(238, 77, 45, 0.1);
}

.search-input {
    flex: 1;
    padding: 0.8rem 1.2rem;
    border: none;
    background: transparent;
    font-size: 0.95rem;
    outline: none;
}

.search-input::placeholder {
    color: #6c757d;
}

.search-button {
    padding: 0.8rem 1.2rem;
    background: #ee4d2d;
    border: none;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
}

.search-button:hover {
    background: #d73211;
}

.search-icon {
    font-size: 1.1rem;
}

/* Search Suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    margin-top: 0.5rem;
    z-index: 1001;
}

.suggestions-header {
    padding: 0.8rem 1rem;
    font-weight: 600;
    color: #666;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
}

.suggestions-list {
    max-height: 200px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 0.8rem 1rem;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.9rem;
}

.suggestion-item:hover {
    background: #f8f9fa;
    color: #ee4d2d;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Categories Dropdown */
.nav-categories {
    position: relative;
}

.categories-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    background: #ee4d2d;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    font-weight: 500;
}

.categories-trigger:hover {
    background: #d73211;
}

.dropdown-arrow {
    transition: transform 0.2s;
    font-size: 0.8rem;
}

.categories-trigger:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.categories-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    margin-top: 0.5rem;
    min-width: 250px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1002;
}

.categories-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.categories-list {
    padding: 0.5rem 0;
    max-height: 400px;
    overflow-y: auto;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
    color: #333;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.category-item:hover {
    background: #f8f9fa;
    color: #ee4d2d;
    padding-left: 1.5rem;
}

.category-icon {
    font-size: 1.1rem;
}

.category-name {
    flex: 1;
}

.category-count {
    color: #666;
    font-size: 0.8rem;
}

/* Navigation Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
    font-weight: 500;
    position: relative;
}

.nav-link:hover {
    background: #f8f9fa;
    color: #ee4d2d;
}

.nav-link.active {
    color: #ee4d2d;
    background: rgba(238, 77, 45, 0.1);
}

.link-icon {
    font-size: 1.1rem;
}

.hot-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: linear-gradient(135deg, #ff4757, #ff3742);
    color: white;
    font-size: 0.6rem;
    padding: 0.2rem 0.4rem;
    border-radius: 8px;
    font-weight: 600;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Navigation Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    position: relative;
}

.action-btn:hover {
    border-color: #ee4d2d;
    color: #ee4d2d;
}

.cart-count,
.wishlist-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ee4d2d;
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    font-weight: 600;
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.user-trigger:hover {
    border-color: #ee4d2d;
    color: #ee4d2d;
}

.user-avatar {
    font-size: 1.2rem;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    margin-top: 0.5rem;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1002;
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
    color: #333;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.user-item:hover {
    background: #f8f9fa;
    color: #ee4d2d;
}

.item-icon {
    font-size: 1rem;
}

.dropdown-divider {
    height: 1px;
    background: #e9ecef;
    margin: 0.5rem 0;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 2px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: -100%;
    width: 300px;
    height: 100vh;
    background: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 9999;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #ee4d2d;
    color: white;
}

.mobile-menu-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.mobile-menu-close:hover {
    background: rgba(255,255,255,0.2);
}

.mobile-menu-content {
    padding: 1rem 0;
}

.mobile-nav-links {
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 1rem;
}

.mobile-nav-link {
    display: block;
    padding: 1rem;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f8f9fa;
    transition: all 0.2s;
}

.mobile-nav-link:hover {
    background: #f8f9fa;
    color: #ee4d2d;
    padding-left: 1.5rem;
}

.mobile-categories-title {
    padding: 1rem;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #e9ecef;
}

.mobile-category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f8f9fa;
    transition: all 0.2s;
}

.mobile-category-item:hover {
    background: #f8f9fa;
    color: #ee4d2d;
    padding-left: 1.5rem;
}

.mobile-category-count {
    color: #666;
    font-size: 0.8rem;
}

/* Body class when mobile menu is open */
body.mobile-menu-open {
    overflow: hidden;
}

body.mobile-menu-open::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .nav-search {
        max-width: 300px;
        margin: 0 1rem;
    }

    .nav-links {
        display: none;
    }

    .action-btn .btn-text {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav-container {
        height: 60px;
    }

    .nav-search,
    .nav-categories,
    .nav-actions {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-menu {
        display: block;
    }

    .logo-text {
        font-size: 1.1rem;
    }

    .logo-icon {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 0.5rem;
    }

    .mobile-menu {
        width: 280px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .categories-dropdown,
    .user-dropdown,
    .mobile-menu {
        transition: none;
    }

    .hot-badge {
        animation: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .main-navigation {
        border-bottom: 2px solid #000;
    }

    .categories-dropdown,
    .user-dropdown {
        border: 2px solid #000;
    }
}