.navbar-brand:hover::before {
    opacity: 1;
}

.navbar-brand:hover {
    transform: translateY(-2px);
}

.navbar-brand img {
    height: 44px;
    width: 44px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow:
        0 4px 12px rgba(212, 175, 55, 0.25),
        0 2px 4px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(212, 175, 55, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-brand:hover img {
    box-shadow:
        0 8px 24px rgba(212, 175, 55, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.4);
    border-color: rgba(212, 175, 55, 0.5);
    transform: rotate(-5deg) scale(1.05);
}


.navbar-brand span {
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #F4D03F 0%, #D4AF37 50%, #C4A137 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.8px;
    white-space: nowrap;
    line-height: 1;
    text-shadow: 0 2px 10px rgba(212, 175, 55, 0.3);
    transition: all 0.4s ease;
}

/* ===== NAVIGATION MENU ===== */
.navbar-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-item {
    margin: 0;
    display: flex;
    align-items: center;
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 11px 20px !important;
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    white-space: nowrap;
    line-height: 1.5;
    min-height: 46px;
    overflow: hidden;
}

/* Modern Underline Effect */
.nav-link::before {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #D4AF37, transparent);
    border-radius: 2px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Glow Effect on Hover */
.nav-link::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.nav-link:hover {
    color: #F4D03F !important;
    background: rgba(212, 175, 55, 0.08);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.15);
}

.nav-link:hover::before {
    transform: translateX(-50%) scaleX(1);
}

.nav-link:hover::after {
    opacity: 1;
}

.nav-link.active {
    color: #F4D03F !important;
    background: rgba(212, 175, 55, 0.12);
    box-shadow:
        0 4px 12px rgba(212, 175, 55, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.nav-link.active::before {
    transform: translateX(-50%) scaleX(1);
}

/* ===== RIGHT SIDE ACTIONS ===== */
.navbar-nav:last-child {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    flex-shrink: 0;
}

/* ===== USER DROPDOWN - MODERN ===== */
.dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 11px 22px !important;
    background: linear-gradient(135deg, rgba(35, 35, 35, 0.95) 0%, rgba(20, 20, 20, 0.95) 100%);
    /* backdrop-filter removed for Safari */
    border: 1.5px solid rgba(212, 175, 55, 0.3);
    border-radius: 30px;
    color: #F4D03F !important;
    font-weight: 700;
    font-size: 0.9rem;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), background 0.4s ease, border-radius 0.3s ease;
    min-height: 46px;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    will-change: transform;
}

.dropdown-toggle::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, rgba(244, 208, 63, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.dropdown-toggle:hover::before {
    opacity: 1;
}

.dropdown-toggle:hover {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(196, 161, 55, 0.15) 100%);
    border-color: #F4D03F;
    transform: translateY(-3px);
    color: #ffffff !important;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    position: relative;
    overflow: hidden;
    background: transparent;
}

.dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scaleX(0);
    width: 3px;
    height: 60%;
    background: linear-gradient(180deg, #F4D03F, #D4AF37);
    border-radius: 0 3px 3px 0;
    transition: transform 0.3s ease;
}

.dropdown-item:hover {
    background: rgba(212, 175, 55, 0.15) !important;
    color: #F4D03F !important;
    transform: translateX(4px);
    padding-left: 22px;
}

.dropdown-item:hover::before {
    transform: translateY(-50%) scaleX(1);
}

.dropdown-divider {
    border-color: rgba(255, 255, 255, 0.1) !important;
    margin: 10px 0;
    opacity: 1;
}

/* ===== CART ICON - ULTRA MODERN ===== */
#cart-toggle {
    position: relative;
    padding: 0 !important;
    background: linear-gradient(135deg, rgba(35, 35, 35, 0.95) 0%, rgba(20, 20, 20, 0.95) 100%);
    /* backdrop-filter removed */
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 50%;
    color: #F4D03F !important;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), background 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    overflow: hidden;
    will-change: transform;
}

#cart-toggle::before {
    content: '';
    position: absolute;
    inset: -50%;
    background: conic-gradient(from 0deg, transparent, rgba(212, 175, 55, 0.3), transparent);
    animation: cartRotate 3s linear infinite;
    opacity: 0;
    transition: opacity 0.4s ease;
}

@keyframes cartRotate {
    to {
        transform: rotate(360deg);
    }
}

#cart-toggle:hover::before {
    opacity: 1;
}

#cart-toggle:hover {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, rgba(244, 208, 63, 0.15) 100%);
    border-color: #F4D03F;
    transform: translateY(-4px) scale(1.08);
    box-shadow:
        0 8px 24px rgba(212, 175, 55, 0.35),
        0 4px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

#cart-toggle i {
    font-size: 1.2rem;
    position: relative;
    z-index: 1;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#cart-toggle:hover i {
    transform: scale(1.15) rotate(-10deg);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #F4D03F 0%, #D4AF37 100%);
    color: #0a0a0a;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    box-shadow:
        0 4px 12px rgba(212, 175, 55, 0.5),
        0 2px 4px rgba(0, 0, 0, 0.3);
    border: 2.5px solid #0d0d0d;
    animation: cartPulse 2s ease-in-out infinite;
    z-index: 2;
}

@keyframes cartPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* ===== MOBILE TOGGLE ===== */
.navbar-toggler {
    padding: 10px 14px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    background: rgba(45, 45, 45, 0.6);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
}

.navbar-toggler:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: #D4AF37;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(212, 175, 55, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    width: 24px;
    height: 24px;
}

/* ===== RTL SUPPORT ===== */
[dir="rtl"] .navbar-brand {
    flex-direction: row-reverse;
}

[dir="rtl"] .navbar-nav {
    flex-direction: row-reverse;
}

[dir="rtl"] .dropdown-menu {
    right: 0;
    left: auto;
    text-align: right;
}

[dir="rtl"] .cart-count {
    right: auto;
    left: -4px;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 991px) {
    .navbar {
        min-height: 60px;
    }

    .navbar .container-fluid {
        min-height: 60px;
        padding: 0 1rem;
    }

    .navbar-brand img {
        height: 36px;
        width: 36px;
    }

    .navbar-brand span {
        font-size: 1.2rem;
    }

    .navbar-collapse {
        margin-top: 16px;
        padding: 20px;
        background: rgba(26, 26, 26, 0.98);
        border-radius: 12px;
        border: 1px solid rgba(212, 175, 55, 0.2);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    }

    .navbar-nav {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .navbar-nav.mx-auto {
        margin: 0;
    }

    .nav-item {
        width: 100%;
    }

    .nav-link {
        width: 100%;
        text-align: center;
        padding: 14px 20px !important;
        justify-content: center;
    }

    .navbar-nav:last-child {
        flex-direction: column;
        width: 100%;
        margin: 16px 0 0 0;
        padding-top: 16px;
        border-top: 1px solid rgba(212, 175, 55, 0.2);
    }

    .language-switcher {
        margin: 8px auto;
        width: 100%;
        justify-content: center;
    }

    #cart-toggle {
        margin: 8px auto;
    }

    .dropdown-toggle {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .navbar .container-fluid {
        padding: 0 0.75rem;
    }

    .navbar-brand img {
        height: 32px;
        width: 32px;
    }

    .navbar-brand span {
        font-size: 1.1rem;
    }

    .nav-link {
        font-size: 0.9rem;
        padding: 12px 16px !important;
    }
}

/* ===== SMOOTH TRANSITIONS ===== */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.navbar,
.nav-link,
.dropdown-toggle,
.lang-btn,
#cart-toggle {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== ACCESSIBILITY ===== */
.nav-link:focus,
.dropdown-toggle:focus,
#cart-toggle:focus {
    outline: 2px solid rgba(212, 175, 55, 0.5);
    outline-offset: 2px;
}

.nav-link:focus:not(:focus-visible),
.dropdown-toggle:focus:not(:focus-visible),
#cart-toggle:focus:not(:focus-visible) {
    outline: none;
}