/* Navbar Component Styles */
.main-navbar {
    background: linear-gradient(to right, #1e3a8a, #3b82f6);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.navbar-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    gap: 2rem;
}

/* Logo */
.brand-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 800;
    white-space: nowrap;
}

.brand-logo img {
    height: 64px;
    width: auto;
}

/* Desktop Navigation */
.nav-menu {
    display: flex;
    gap: 2.5rem;
    align-items: center;
    list-style: none;
    margin: 0 0 0 auto;
    padding: 0;
}

.nav-menu a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s;
    position: relative;
}

.nav-menu a:hover {
    color: #fff;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #fff;
    transition: width 0.3s;
}

.nav-menu a:hover::after {
    width: 100%;
}

.mobile-nav-action {
    display: none;
}

.mobile-nav-action a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
}

.mobile-nav-action a i {
    font-size: 1rem;
}

/* Right Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-toggle,
.cart-button {
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    position: relative;
}

.search-toggle:hover,
.cart-button:hover {
    background: rgba(255,255,255,0.25);
    transform: scale(1.05);
}

.cart-button i,
.search-toggle i {
    font-size: 1.1rem;
}

.cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: #fff;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
}

/* Currency Selector */
.currency-selector-wrapper {
    position: relative;
}

.currency-toggle {
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    height: 40px;
    padding: 0 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.85rem;
    font-weight: 600;
}

.currency-toggle:hover {
    background: rgba(255,255,255,0.25);
    transform: scale(1.05);
}

.currency-toggle i {
    font-size: 1rem;
}

.currency-code {
    font-size: 0.85rem;
}

.currency-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1000;
    overflow: hidden;
}

.currency-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.currency-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #1f2937;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.currency-option:hover {
    background: #f3f4f6;
}

.currency-flag {
    font-size: 1.5rem;
    line-height: 1;
}

.currency-name {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Cart Dropdown */
.cart-dropdown-wrapper {
    position: relative;
}

.cart-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    width: 360px;
    max-height: 500px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1001;
}

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

.cart-dropdown-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 600;
    color: #111827;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-items-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 0.5rem;
}

.cart-dropdown-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    transition: background 0.2s;
    position: relative;
    margin-bottom: 0.5rem;
}

.cart-dropdown-item:hover {
    background: #f9fafb;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cart-item-price {
    font-size: 0.875rem;
    color: #3b82f6;
    font-weight: 700;
}

.cart-item-remove {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #fee2e2;
    color: #ef4444;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.cart-item-remove:hover {
    background: #ef4444;
    color: #fff;
}

.cart-dropdown-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid #e5e7eb;
}

.cart-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.cart-subtotal-label {
    color: #6b7280;
}

.cart-subtotal-amount {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
}

.cart-actions {
    display: flex;
    gap: 0.5rem;
}

.cart-btn {
    flex: 1;
    padding: 0.625rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.cart-btn-outline {
    background: #fff;
    color: #3b82f6;
    border: 1px solid #3b82f6;
}

.cart-btn-outline:hover {
    background: #eff6ff;
    color: #3b82f6;
}

.cart-btn-primary {
    background: #3b82f6;
    color: #fff;
}

.cart-btn-primary:hover {
    background: #2563eb;
    color: #fff;
}

.cart-empty {
    padding: 2rem 1.25rem;
    text-align: center;
    color: #9ca3af;
}

.cart-empty i {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    opacity: 0.3;
}

.auth-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-login {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-login:hover {
    background: rgba(255,255,255,0.25);
    color: #fff;
}

.btn-register {
    background: #fff;
    color: #1e3a8a;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-register:hover {
    background: #f1f5f9;
    color: #1e3a8a;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-dashboard,
.btn-logout {
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.btn-dashboard {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
}

.btn-dashboard:hover {
    background: rgba(255,255,255,0.25);
    color: #fff;
}

.btn-logout {
    background: #ef4444;
    color: #fff;
    border: none;
}

.btn-logout:hover {
    background: #dc2626;
    color: #fff;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: #fff;
    transition: all 0.3s;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Search Bar */
.search-bar {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 0;
    display: none;
}

.search-bar.active {
    display: block;
}

.search-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.search-input-wrapper {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-input-wrapper input {
    width: 100%;
    padding: 0.75rem 3.5rem 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 25px;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.search-input-wrapper button {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: #3b82f6;
    border: none;
    color: #fff;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.search-input-wrapper button:hover {
    background: #2563eb;
}

/* Mobile Responsive */
@media (max-width: 992px) {
    .menu-toggle {
        display: flex;
        order: -1;
    }

    .navbar-wrapper {
        padding: 0 1rem;
    }

    .navbar-main {
        height: 60px;
        gap: 1rem;
        position: relative;
    }

    .brand-logo {
        flex: 1;
        order: 0;
    }

    .brand-logo img {
        height: 48px;
    }

    .brand-logo a {
        font-size: 1.25rem;
    }

    .nav-actions {
        order: 1;
        gap: 0.5rem;
    }

    .nav-menu {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 280px;
        height: calc(100vh - 60px);
        background: linear-gradient(to bottom, #1e3a8a, #3b82f6);
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 1rem 0;
        margin: 0;
        transition: left 0.3s ease-in-out;
        overflow-y: auto;
        box-shadow: 2px 0 15px rgba(0,0,0,0.2);
        z-index: 999;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        width: 100%;
        padding: 1rem 1.5rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        display: block;
    }

    .nav-menu a::after {
        display: none;
    }

    .nav-menu a:hover {
        background: rgba(255,255,255,0.1);
    }

    .search-toggle,
    .cart-button {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }

    .search-toggle i,
    .cart-button i {
        font-size: 1rem;
    }

    .nav-actions .user-actions,
    .nav-actions .auth-buttons {
        display: none;
    }

    .mobile-nav-action {
        display: block;
    }

    .mobile-nav-action a {
        padding: 1rem 1.5rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        color: #fff;
    }

    .mobile-nav-action.logout a {
        color: #fecdd3;
    }

    .btn-login,
    .btn-register {
        padding: 0.4rem 0.875rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    .search-bar {
        top: 60px;
    }
}

@media (max-width: 768px) {
    .navbar-main {
        gap: 0.5rem;
    }

    .auth-buttons {
        gap: 0.25rem;
    }

    .user-actions {
        gap: 0.35rem;
    }

    .btn-dashboard,
    .btn-logout {
        padding: 0.4rem 0.75rem;
        font-size: 0.78rem;
    }

    .btn-login {
        padding: 0.35rem 0.625rem;
        font-size: 0.75rem;
    }

    .btn-register {
        padding: 0.35rem 0.625rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 576px) {
    .navbar-wrapper {
        padding: 0 0.75rem;
    }

    .navbar-main {
        gap: 0.5rem;
        height: 56px;
    }

    .menu-toggle {
        width: 36px;
        height: 36px;
    }

    .menu-toggle span {
        width: 18px;
    }

    .brand-logo img {
        height: 44px;
    }

    .brand-logo a {
        font-size: 1.1rem;
    }

    .nav-actions {
        gap: 0.35rem;
    }

    .search-toggle,
    .cart-button {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .search-toggle i,
    .cart-button i {
        font-size: 0.95rem;
    }

    .cart-count {
        font-size: 0.65rem;
        padding: 1px 4px;
        min-width: 16px;
    }

    .btn-login,
    .btn-register {
        padding: 0.3rem 0.5rem;
        font-size: 0.7rem;
    }

    .nav-menu {
        top: 56px;
        height: calc(100vh - 56px);
        width: 260px;
    }

    .search-bar {
        top: 56px;
        padding: 0.75rem 0;
    }

    .search-container {
        padding: 0 0.75rem;
    }

    .search-input-wrapper input {
        padding: 0.625rem 3rem 0.625rem 0.875rem;
        font-size: 0.875rem;
    }

    .search-input-wrapper button {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
    }

    .cart-dropdown {
        width: calc(100vw - 1.5rem);
        right: -0.75rem;
    }

    .cart-item-image {
        width: 50px;
        height: 50px;
    }

    .cart-item-name {
        font-size: 0.8rem;
    }

    .cart-item-price {
        font-size: 0.8rem;
    }

    .cart-dropdown-footer {
        padding: 0.875rem 1rem;
    }

    .cart-actions {
        flex-direction: column;
    }

    .cart-btn {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 380px) {
    .navbar-main {
        height: 52px;
    }

    .brand-logo a {
        font-size: 1rem;
    }

    .brand-logo img {
        height: 24px;
    }

    .menu-toggle {
        width: 32px;
        height: 32px;
    }

    .search-toggle,
    .cart-button {
        width: 28px;
        height: 28px;
    }

    .btn-login,
    .btn-register {
        padding: 0.25rem 0.4rem;
        font-size: 0.65rem;
    }

    .nav-menu {
        top: 52px;
        height: calc(100vh - 52px);
    }

    .search-bar {
        top: 52px;
    }

    .cart-dropdown-header {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
    }

    .cart-item-image {
        width: 45px;
        height: 45px;
    }

    .cart-subtotal-amount {
        font-size: 1rem;
    }
}
