/* Language Switcher Styles */
.language-switcher {
    position: relative;
    margin-left: 15px;
}

.lang-btn {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #333;
    padding: 8px 15px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.lang-btn .flag {
    font-size: 18px;
}

.lang-btn .arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.lang-btn.active .arrow {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

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

.lang-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.lang-option:last-child {
    border-bottom: none;
}

.lang-option:hover {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.lang-option.active {
    background: #f8f9fa;
    font-weight: 600;
}

.lang-option .flag {
    font-size: 20px;
}

.lang-option .name {
    flex: 1;
    font-size: 14px;
}

/* RTL Support for Arabic and Chinese (when needed) */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .nav-content,
[dir="rtl"] .top-bar-content,
[dir="rtl"] .footer-content {
    flex-direction: row-reverse;
}

[dir="rtl"] .language-switcher {
    margin-left: 0;
    margin-right: 15px;
}

[dir="rtl"] .lang-dropdown {
    right: auto;
    left: 0;
}

[dir="rtl"] .product-card-v2,
[dir="rtl"] .cart-item,
[dir="rtl"] .section-header {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .nav-links {
    flex-direction: row-reverse;
}

/* Mobile Language Switcher */
@media (max-width: 768px) {
    .language-switcher {
        margin-left: 10px;
    }
    
    .lang-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .lang-dropdown {
        min-width: 180px;
    }
    
    [dir="rtl"] .language-switcher {
        margin-left: 0;
        margin-right: 10px;
    }
}
