/**
 * Базовые стили для header и footer
 * Эти стили дополняют существующие стили сайта
 */

/* Header Styles */
#main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.main-navigation {
    width: 100%;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-container {
    flex-shrink: 0;
}

.logo-link {
    display: inline-block;
    text-decoration: none;
}

.logo-image {
    height: 40px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
    flex: 1;
    justify-content: center;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

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

/* Language Selector */
.language-selector {
    position: relative;
}

.lang-button {
    background: none;
    border: 1px solid #ddd;
    padding: 0.5rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.lang-button:hover {
    border-color: #0066cc;
    background-color: #f5f5f5;
}

.lang-code {
    font-weight: bold;
    font-size: 0.9rem;
}

.lang-name {
    font-size: 0.9rem;
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    list-style: none;
    padding: 0.5rem 0;
    min-width: 150px;
    z-index: 1001;
}

.lang-dropdown li {
    margin: 0;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: #333;
    transition: background-color 0.3s ease;
}

.lang-option:hover {
    background-color: #f5f5f5;
}

/* Cart and Search */
.cart-link,
.search-button {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    text-decoration: none;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.cart-link:hover,
.search-button:hover {
    color: #0066cc;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 4px;
}

.hamburger {
    width: 25px;
    height: 3px;
    background-color: #333;
    transition: all 0.3s ease;
}

/* Footer Styles */
#main-footer {
    background-color: #1a1a1a;
    color: #ffffff;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section {
    margin-bottom: 1.5rem;
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #ffffff;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #cccccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover,
.footer-links a.active {
    color: #ffffff;
}

.social-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: #cccccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.copyright {
    margin: 0;
    color: #cccccc;
    font-size: 0.9rem;
}

.legal-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.legal-links a {
    color: #cccccc;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.legal-links a:hover {
    color: #ffffff;
}

/* Main Content */
#main-content {
    min-height: calc(100vh - 200px);
}

/* RTL Support */
[dir="rtl"] .nav-container {
    direction: rtl;
}

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

[dir="rtl"] .footer-bottom {
    direction: rtl;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        padding: 1rem;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        padding: 2rem;
        transition: left 0.3s ease;
        box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
    }
    
    .nav-menu.mobile-open {
        left: 0;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-actions {
        gap: 0.5rem;
    }
    
    .lang-name {
        display: none;
    }
    
    .cart-text {
        display: none;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .logo-image {
        height: 30px;
    }
    
    .nav-container {
        padding: 0.75rem;
    }
}

