/* ===== ОБЩИЕ СТИЛИ ===== */
 {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== ШАПКА ===== */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 15px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo a {
    font-size: 28px;
    font-weight: 700;
    text-decoration: none;
    color: #2c3e50;
    letter-spacing: 1px;
}

/* ===== НАВИГАЦИОННОЕ МЕНЮ ===== */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

.main-nav > ul > li {
    position: relative;
}

.main-nav > ul > li > a {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #555;
    font-weight: 500;
    font-size: 16px;
    padding: 8px 0;
    transition: color 0.3s;
}

.main-nav > ul > li > a i:first-child {
    font-size: 16px;
}

.main-nav > ul > li > a i.fa-chevron-down {
    font-size: 12px;
    transition: transform 0.3s;
}

.main-nav > ul > li:hover > a i.fa-chevron-down {
    transform: rotate(180deg);
}

.main-nav > ul > li > a:hover,
.main-nav > ul > li > a.active {
    color: #3498db;
}

/* Выпадающее меню */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s;
    z-index: 1000;
}

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

.dropdown-menu li {
    padding: 0;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: #2c3e50;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.dropdown-menu a i {
    width: 18px;
    color: #7f8c8d;
}

.dropdown-menu a:hover {
    background: #f8f9fa;
    color: #3498db;
    padding-left: 25px;
}

.dropdown-menu a:hover i {
    color: #3498db;
}

.dropdown-divider {
    height: 1px;
    background: #ecf0f1;
    margin: 8px 0;
}

.badge {
    display: inline-block;
    padding: 2px 6px;
    background: #e74c3c;
    color: white;
    font-size: 10px;
    border-radius: 10px;
    margin-left: 8px;
    font-weight: 600;
}

/* ===== ПЕРЕКЛЮЧАТЕЛЬ ЯЗЫКОВ ===== */
.language-selector {
    position: relative;
    margin-left: 28px;
    margin-top: 7px;
    /* border: 3px solid #ff0000; */
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: #f8f9fa;
    border: 1px solid #ecf0f1;
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
    color: #2c3e50;
    transition: all 0.3s;
    min-width: 130px;
}

.lang-btn:hover {
    background: #ecf0f1;
    border-color: #bdc3c7;
}

.lang-btn .fi {
    font-size: 18px;
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.lang-btn .lang-name {
    flex: 1;
    text-align: left;
}

.lang-btn i {
    font-size: 12px;
    color: #7f8c8d;
    transition: transform 0.3s;
}

.language-selector.active .lang-btn i {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 180px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    list-style: none;
    padding: 8px 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1000;
}

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

.lang-dropdown li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.2s;
    color: #2c3e50;
}

.lang-dropdown li:hover {
    background: #f8f9fa;
}

.lang-dropdown li.active {
    background: #3498db;
    color: white;
}

.lang-dropdown li .fi {
    font-size: 18px;
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Уведомление о смене языка */
.lang-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #2c3e50;
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(100px);
    opacity: 0;
    transition: all 0.3s;
    z-index: 9999;
}

.lang-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.lang-notification .fi {
    font-size: 20px;
    border-radius: 3px;
}

/* ===== ХЛЕБНЫЕ КРОШКИ ===== */
.breadcrumbs {
    padding: 20px 0;
    font-size: 14px;
    color: #777;
}

.breadcrumbs a {
    color: #3498db;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

/* ===== ПАНЕЛЬ СОРТИРОВКИ ===== */
.sorting-panel {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.sorting-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.sorting-controls label {
    font-weight: 500;
    color: #555;
}

.sorting-controls select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 14px;
    min-width: 200px;
}

.sorting-controls button {
    padding: 8px 16px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.sorting-controls button:hover {
    background: #2980b9;
}

.loading-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #7f8c8d;
    font-size: 14px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== ГАЛЕРЕЯ ===== */
.gallery-section h1 {
    margin-bottom: 30px;
    text-align: center;
    color: #2c3e50;
    font-weight: 400;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.gallery-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    animation: fadeInUp 0.5s ease-out;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s;
}

.gallery-item img:hover {
    transform: scale(1.05);
}

.gallery-item h3 {
    padding: 15px 15px 5px;
    font-size: 18px;
    color: #2c3e50;
}

.gallery-item p {
    padding: 0 15px 10px;
    font-size: 14px;
    color: #666;
}

.item-meta {
    padding: 10px 15px 15px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #95a5a6;
    border-top: 1px solid #ecf0f1;
}

.item-category {
    background: #f0f7ff;
    padding: 2px 8px;
    border-radius: 12px;
    color: #3498db;
}

.load-more-container {
    text-align: center;
    margin: 40px 0;
}

#loadMoreBtn {
    padding: 12px 30px;
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
    min-width: 200px;
}

#loadMoreBtn:hover {
    background: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#loadMoreBtn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== СТРАНИЦА ПРОДУКТА ===== */
.product-header {
    margin-bottom: 40px;
    text-align: center;
}

.product-header h1 {
    font-size: 36px;
    color: #2c3e50;
    margin-bottom: 30px;
    font-weight: 400;
}

.product-video {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.product-video video {
    width: 100%;
    height: auto;
    display: block;
}

.product-summary {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    margin: 40px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #3498db;
}

.product-summary h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 500;
}

.product-content {
    background: #fff;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.content-section {
    margin-bottom: 50px;
}

.content-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 500;
    padding-bottom: 10px;
    border-bottom: 1px solid #ecf0f1;
}

.content-text {
    line-height: 1.8;
    margin-bottom: 25px;
}

.content-image {
    max-width: 600px;
    margin: 25px auto;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s;
}

.content-image:hover {
    transform: translateY(-5px);
}

.content-image img {
    width: 100%;
    height: auto;
    display: block;
}

.image-caption {
    padding: 10px;
    background: #f8f9fa;
    text-align: center;
    font-size: 14px;
    color: #7f8c8d;
    border-top: 1px solid #ecf0f1;
}

.content-table {
    width: 100%;
    margin: 25px 0;
    border-collapse: collapse;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    overflow: hidden;
}

.content-table th {
    background-color: #3498db;
    color: white;
    padding: 12px 15px;
    text-align: left;
    font-weight: 500;
}

.content-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #ecf0f1;
}

.content-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.content-table tr:hover {
    background-color: #f1f7fd;
}

.content-quote {
    background: #f8f9fa;
    border-left: 5px solid #3498db;
    padding: 25px;
    margin: 30px 0;
    font-style: italic;
    font-size: 18px;
    color: #2c3e50;
    border-radius: 0 6px 6px 0;
}

.quote-author {
    text-align: right;
    margin-top: 15px;
    font-weight: 500;
    color: #7f8c8d;
    font-style: normal;
}

.product-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #ecf0f1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: #f8f9fa;
    border-radius: 6px;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.3s;
}

.nav-link:hover {
    background: #3498db;
    color: white;
}

/* ===== МОДАЛЬНОЕ ОКНО ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    padding: 20px;
    text-align: center;
    overflow: auto;
}

.modal-content {
    max-width: 90%;
    max-height: 80vh;
    margin: 40px auto;
    border-radius: 5px;
}

.close-modal {
    position: fixed;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    color: #bbb;
}

#modalCaption {
    color: white;
    padding: 20px;
    font-size: 18px;
    max-width: 800px;
    margin: 0 auto;
}

/* ===== ФУТЕР ===== */
footer {
    background-color: #bfe1ab;
    color: #ecf0f1;
    padding: 40px 0;
    margin-top: 50px;
}

.footer-content {
    text-align: center;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .header-container {
        justify-content: center;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .sorting-panel {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sorting-controls {
        flex-direction: column;
    }
    
    .sorting-controls select,
    .sorting-controls button {
        width: 100%;
    }
    
    .product-header h1 {
        font-size: 28px;
    }
    
    .product-content {
        padding: 20px;
    }
    
    .product-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .lang-dropdown {
        right: auto;
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
    }
    
    .language-selector.active .lang-dropdown {
        transform: translateX(-50%) translateY(0);
    }
}