@font-face {
    font-family: 'Bahnschrift';
    src: url('/assets/bahnschrift.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Bahnschrift', sans-serif;
    line-height: 1.6;
    color: #333;
}

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

/* Header */
.header {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    flex-wrap: wrap;
}

.logo img {
    max-height: 50px;
}

.search-bar {
    flex: 1;
    max-width: 500px;
    margin: 0 20px;
}

.search-bar form {
    display: flex;
}

.search-bar input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
}

.search-bar button {
    padding: 10px 15px;
    background: #016db7;
    border: none;
    border-radius: 0 4px 4px 0;
    color: white;
    cursor: pointer;
}

.search-bar button:hover {
    background: #0a5588;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.lang-switcher a {
    text-decoration: none;
    color: #666;
    font-weight: 500;
}

.lang-switcher a.active {
    color: #016db7;
}

.cart-icon {
    position: relative;
}

.cart-icon a {
    color: #333;
    font-size: 24px;
    text-decoration: none;
    position: relative;
}

.cart-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #016db7;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    min-width: 20px;
    text-align: center;
}

/* Меню категорий */
.header-bottom {
    background: #2c3e50;
}

.main-menu {
    display: flex;
    align-items: center;
    position: relative;
}

.menu-catalog {
    position: relative;
}

.catalog-btn {
    background: #016db7;
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.3s;
}

.catalog-btn i {
    font-size: 18px;
}

.catalog-btn:hover {
    background: #0a5588;
}

/* ===== ОБЁРТКА МЕГА-МЕНЮ ===== */
.mega-menu-wrapper {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-width: 1400px;
    background: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    display: none;
    z-index: 1000;
    border-radius: 0 0 8px 8px;
    left: 50%;
    transform: translateX(-50%);
}

.menu-catalog:hover .mega-menu-wrapper {
    display: block;
}

.mega-menu-inner {
    display: flex;
    min-height: 400px;
    max-height: 70vh;
    width: 100%;
}

/* ===== ЛЕВАЯ КОЛОНКА: КАТЕГОРИИ (СКРОЛЛИТСЯ) ===== */
.mega-menu-categories {
    width: 280px;
    flex: 0 0 280px;
    flex-shrink: 0;
    border-right: 1px solid #eee;
    overflow-y: auto;
    overflow-x: hidden;
    background: #fafafa;
}

.mega-menu-categories::-webkit-scrollbar {
    width: 6px;
}
.mega-menu-categories::-webkit-scrollbar-track {
    background: #f1f1f1;
}
.mega-menu-categories::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}
.mega-menu-categories::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

.catalog-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: #333;
}

.catalog-item:hover,
.catalog-item.active {
    background: #016db7;
    color: white;
}

.catalog-item:hover .catalog-link,
.catalog-item.active .catalog-link {
    color: white;
}

.catalog-item:hover .catalog-arrow,
.catalog-item.active .catalog-arrow {
    color: white;
}

.catalog-link {
    flex: 1;
    color: inherit;
    text-decoration: none;
    font-weight: 500;
}

.catalog-arrow {
    color: #999;
    font-size: 12px;
    transition: transform 0.2s;
}

.catalog-item:hover .catalog-arrow {
    transform: translateX(3px);
}

/* ===== ПРАВАЯ КОЛОНКА: ПОДМЕНЮ (АДАПТИВНАЯ ШИРИНА) ===== */
.mega-menu-submenus {
    flex: 1 1 auto;
    flex-basis: 600px;
    min-width: 600px;
    max-width: 1000px;
    width: auto;
    padding: 25px 30px;
    overflow-x: hidden;
    overflow-y: auto;
    background: white;
    max-height: 70vh;
    scrollbar-width: thin;
    scrollbar-color: #ccc #f1f1f1;
}

.mega-menu-submenus::-webkit-scrollbar {
    width: 6px;
}
.mega-menu-submenus::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}
.mega-menu-submenus::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
    transition: background 0.2s;
}
.mega-menu-submenus::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

.menu-catalog:not(:hover) .mega-menu-submenus::-webkit-scrollbar-thumb {
    background: transparent;
}

.catalog-submenu {
    display: none;
    height: auto;
    min-height: 100%;
}

.catalog-submenu.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateX(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

/* ===== СЕТКА ПОДМЕНЮ (АДАПТИВНАЯ) ===== */
/* ===== СЕТКА ПОДМЕНЮ (ШИРОКИЕ КОЛОНКИ) ===== */
.submenu-grid {
    display: grid;
    /* 🔥 Увеличили минимальную ширину колонки с 180px до 220px */
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    align-content: start;
    min-width: auto;
    width: 100%;
}

.submenu-group {
    margin-bottom: 0;
    min-width: 0;
    /* 🔥 Даём группе расти по контенту */
    width: 100%;
}



.submenu-title {
    font-weight: 600;
    color: #016db7;
    text-decoration: none;
    display: block;
    margin-bottom: 12px;
    font-size: 15px;
    transition: color 0.2s;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.submenu-title:hover {
    color: #0a5588;
}

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

.submenu-list li {
    margin-bottom: 10px;
}

/* Ссылки в подменю — без жёсткого обрезания */
.submenu-list a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.4;
    transition: color 0.2s, padding-left 0.2s;
    display: block;
    /* 🔥 Разрешаем перенос только если совсем не влезает */
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.submenu-list a:hover {
    color: #016db7;
    padding-left: 5px;
}

.count {
    color: #999;
    font-size: 12px;
    margin-left: 5px;
    font-weight: normal;
    white-space: nowrap;
}

.submenu-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
    font-style: italic;
}

/* ===== ПЕРВАЯ КАТЕГОРИЯ АКТИВНА ПО УМОЛЧАНИЮ (ВИЗУАЛЬНО) ===== */
.catalog-item:first-child {
    background: #016db7;
    color: white;
}
.catalog-item:first-child .catalog-link,
.catalog-item:first-child .catalog-arrow {
    color: white;
}

/* ===== МЕНЮ ССЫЛОК СПРАВА ОТ КАТАЛОГА ===== */
.menu-links {
    display: flex;
    list-style: none;
    margin-left: 20px;
}

.menu-links li a {
    color: white;
    text-decoration: none;
    padding: 12px 15px;
    display: block;
    transition: background 0.3s;
}

.menu-links li a:hover {
    background: #016db7;
}

/* ===== АДАПТИВ ДЛЯ РАЗНЫХ ЭКРАНОВ ===== */

/* Большие экраны (1400px+) */
@media (min-width: 1400px) {
    .mega-menu-wrapper {
        max-width: 1600px;
    }
    .mega-menu-submenus {
        flex-basis: 800px;
        min-width: 600px;
    }
    .submenu-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Средние экраны (1200px - 1399px) */
@media (max-width: 1399px) and (min-width: 1200px) {
    .mega-menu-wrapper {
        max-width: 1200px;
    }
    .mega-menu-submenus {
        flex-basis: 700px;
        min-width: 550px;
    }
    .submenu-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Планшеты (992px - 1199px) */
@media (max-width: 1199px) and (min-width: 992px) {
    .mega-menu-wrapper {
        max-width: 100%;
    }
    .mega-menu-submenus {
        flex-basis: 500px;
        min-width: 400px;
    }
    .submenu-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Узкие планшеты (768px - 991px) */
@media (max-width: 991px) and (min-width: 768px) {
    .mega-menu-wrapper {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        width: 100%;
        max-width: none;
        max-height: calc(100vh - 70px);
        border-radius: 0;
    }
    
    .mega-menu-inner {
        flex-direction: column;
        max-height: 100%;
    }
    
    .mega-menu-categories {
        width: 100%;
        flex: 0 0 auto;
        max-height: 200px;
        border-right: none;
        border-bottom: 1px solid #eee;
    }
    
    .mega-menu-submenus {
        flex-basis: auto;
        min-width: auto;
        max-width: none;
        overflow-y: auto;
        padding: 20px;
    }
    
    .submenu-grid {
        grid-template-columns: repeat(2, 1fr);
        min-width: auto;
        gap: 20px;
    }
}

/* Мобильные (до 767px) */
@media (max-width: 767px) {
    .header-bottom {
        display: none !important;
    }
}

/* Hero секция */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 18px;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-primary {
    background: #016db7;
    color: white;
}

.btn-primary:hover {
    background: #0a5588;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}



/* Товары */
.products-section {
    margin-bottom: 60px;
}

.products-section h2 {
    margin-bottom: 30px;
    font-size: 28px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.product-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.product-card a {
    text-decoration: none;
    color: inherit;
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    padding: 15px;
    background: #f8f9fa;
}

.product-card h3 {
    padding: 0 15px;
    font-size: 16px;
    margin-bottom: 10px;
    height: 48px;
    overflow: hidden;
}

.price {
    padding: 0 15px;
    font-size: 20px;
    font-weight: bold;
    color: #016db7;
    margin-bottom: 10px;
}

.availability {
    padding: 0 15px 15px;
    font-size: 14px;
}

.in-stock {
    color: #28a745;
}

.out-of-stock {
    color: #dc3545;
}

.add-to-cart {
    display: block;
    width: calc(100% - 30px);
    margin: 0 15px 15px;
    padding: 10px;
    background: #016db7;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.add-to-cart:hover {
    background: #0a5588;
}

/* Страница товара */
.product-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.product-gallery {
    position: sticky;
    top: 100px;
}

.main-image {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
}

.main-image img {
    width: 100%;
    height: auto;
}

.thumbnails {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.thumbnails img {
    width: 100%;
    cursor: pointer;
    border: 1px solid #eee;
    border-radius: 4px;
    transition: border-color 0.3s;
}

.thumbnails img:hover {
    border-color: #016db7;
}

.product-info h1 {
    font-size: 28px;
    margin-bottom: 20px;
}

.product-price {
    margin-bottom: 20px;
}

.product-price .price {
    font-size: 32px;
    padding: 0;
}

.product-availability {
    margin-bottom: 20px;
}

.product-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.quantity-selector button {
    width: 40px;
    height: 40px;
    background: #f8f9fa;
    border: none;
    cursor: pointer;
    font-size: 18px;
}

.quantity-selector input {
    width: 60px;
    height: 40px;
    text-align: center;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
}

.add-to-cart-btn, .buy-now-btn {
    flex: 1;
    padding: 12px;
    font-size: 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.add-to-cart-btn {
    background: #016db7;
    color: white;
}

.buy-now-btn {
    background: #28a745;
    color: white;
}

/* Табы */
.product-tabs {
    grid-column: 1 / -1;
    margin-top: 40px;
}

.tabs-header {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    transition: color 0.3s;
}

.tab-btn.active {
    color: #016db7;
    border-bottom: 2px solid #016db7;
    margin-bottom: -2px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.product-description {
    line-height: 1.8;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table tr {
    border-bottom: 1px solid #eee;
}

.specs-table th, .specs-table td {
    padding: 12px;
    text-align: left;
}

.specs-table th {
    width: 30%;
    background: #f8f9fa;
}

/* Корзина */
.cart-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th, .cart-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.cart-table th {
    background: #f8f9fa;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 5px;
}

.quantity-control button {
    width: 30px;
    height: 30px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    cursor: pointer;
}

.quantity-control input {
    width: 50px;
    text-align: center;
    border: 1px solid #ddd;
    padding: 5px;
}

.remove-item {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 18px;
}

.cart-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    position: sticky;
    top: 100px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin: 15px 0;
    font-size: 18px;
}

.checkout-btn {
    width: 100%;
    margin-bottom: 10px;
}

.empty-cart {
    text-align: center;
    padding: 60px;
}

.empty-cart i {
    font-size: 80px;
    color: #ddd;
    margin-bottom: 20px;
}

/* Оформление заказа */
.checkout-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.checkout-form {
    background: white;
    padding: 30px;
    border: 1px solid #eee;
    border-radius: 8px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.checkout-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    position: sticky;
    top: 100px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
}

.order-total {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 20px;
    font-size: 18px;
}

.order-success {
    text-align: center;
    padding: 60px;
}

.order-success i {
    font-size: 80px;
    color: #28a745;
    margin-bottom: 20px;
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination a {
    padding: 8px 12px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
}

.pagination a.active {
    background: #016db7;
    color: white;
    border-color: #016db7;
}

/* Хлебные крошки */
.breadcrumbs {
    padding: 15px 0;
    color: #666;
    font-size: 14px;
}

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

.breadcrumbs a:hover {
    color: #016db7;
}

/* ===== МОБИЛЬНОЕ МЕНЮ ===== */
.mobile-menu {
    display: none;
    background: #2c3e50;
    padding: 10px;
    position: relative;
}

.mobile-menu-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-menu-content {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 1000;
    overflow-y: auto;
    padding-bottom: 80px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.mobile-menu-content.active {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Главные ссылки */
.mobile-main-links {
    padding: 10px 0;
}

.mobile-main-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

.mobile-main-link:hover {
    background: #f8f9fa;
    color: #016db7;
}

.mobile-main-link i {
    width: 20px;
    color: #016db7;
}

/* Блок "Каталог" с раскрывающимся списком */
.mobile-catalog-wrapper {
    border-bottom: 1px solid #eee;
}

.mobile-catalog-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 15px 20px;
    background: none;
    border: none;
    color: #333;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    text-align: left;
}

.mobile-catalog-toggle i {
    color: #016db7;
    transition: transform 0.3s;
}

.mobile-catalog-toggle i.toggle-icon {
    color: #999;
}

.mobile-catalog-toggle.active i.toggle-icon {
    transform: rotate(180deg);
}

.mobile-catalog-list {
    display: none;
    background: #fafafa;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.mobile-catalog-list.active {
    display: block;
    max-height: 2000px;
    padding: 10px 0;
}

/* ===== КАТЕГОРИЯ (1 УРОВЕНЬ) ===== */
.mobile-category {
    display: block;
    border-bottom: 1px solid #eee;
    width: 100%;
}

/* Заголовок категории: ссылка + кнопка в одной строке */
.mobile-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.mobile-category-link {
    flex: 1;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
}

.mobile-category-link:hover {
    color: #016db7;
    background: #f8f9fa;
}

/* ===== ПОДКАТЕГОРИИ (2 УРОВЕНЬ) ===== */
.mobile-submenu {
    display: none;
    position: static !important;
    width: 100% !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
    background: #f8f9fa;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
    flex: none !important;
    order: 999 !important;
}

.mobile-submenu.active {
    display: block !important;
    max-height: 2000px;
}

/* 🔥 Заголовок подкатегории: ссылка + кнопка в одной строке */
.mobile-submenu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    border-bottom: 1px solid #eee;
}

.mobile-submenu-link {
    flex: 1;
    padding: 12px 20px 12px 55px;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s, color 0.2s;
}

.mobile-submenu-link:hover {
    color: #016db7;
    background: #f0f0f0;
}

/* ===== ПОД-ПОДКАТЕГОРИИ (3 УРОВЕНЬ) ===== */
.mobile-subsubmenu-wrapper {
    display: block;
    width: 100%;
}

.mobile-subsubmenu {
    display: none;
    position: static !important;
    width: 100% !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
    background: #f0f0f0;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
    flex: none !important;
}

.mobile-subsubmenu.active {
    display: block !important;
    max-height: 2000px;
}

.mobile-subsubmenu-link {
    display: block;
    padding: 10px 20px 10px 80px;
    color: #666;
    text-decoration: none;
    font-size: 13px;
    border-bottom: 1px solid #e0e0e0;
}

.mobile-subsubmenu-link:hover {
    color: #016db7;
    background: #e8e8e8;
}

.mobile-subsubmenu-link .count {
    font-size: 11px;
    color: #999;
    white-space: nowrap;
    margin-left: 10px;
}

/* ===== КНОПКИ РАСКРЫТИЯ (СТРЕЛКИ) ===== */
.toggle-submenu,
.toggle-subsubmenu {
    padding: 12px 20px;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    transition: transform 0.3s, color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    flex-shrink: 0;
}

.toggle-submenu:hover,
.toggle-subsubmenu:hover {
    color: #016db7;
}

.toggle-submenu.active i,
.toggle-subsubmenu.active i {
    transform: rotate(90deg);
    color: #016db7;
}

/* ===== АДАПТИВ: Гарантируем вертикальность на мобильных ===== */
@media (max-width: 992px) {
    .catalog-submenu,
    .mobile-submenu,
    .mobile-subsubmenu {
        position: static !important;
        display: none;
        width: 100% !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        bottom: auto !important;
        transform: none !important;
        box-shadow: none !important;
        grid-template-columns: 1fr !important;
    }
    
    .mobile-submenu.active,
    .mobile-subsubmenu.active {
        display: block;
    }
    
    .mobile-submenu-link {
        padding-left: 50px;
    }
    
    .mobile-subsubmenu-link {
        padding-left: 75px;
    }
    
    @media (max-width: 480px) {
        .mobile-submenu-link {
            padding-left: 40px;
        }
        .mobile-subsubmenu-link {
            padding-left: 60px;
        }
        .mobile-category-link,
        .mobile-submenu-link,
        .mobile-subsubmenu-link {
            font-size: 13px;
        }
        .toggle-submenu,
        .toggle-subsubmenu {
            min-width: 40px;
            padding: 12px 15px;
        }
    }
}
@media (max-width: 768px) {
    .header-top {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        padding: 10px 0;
        gap: 10px;
    }
    
    /* Логотип — СЛЕВА */
    .logo {
        order: 1;
        flex: 0 0 auto;
    }
    
    .logo img {
        max-height: 40px;
    }
    
    /* Язык + корзина — СПРАВА на одной линии */
    .header-actions {
        order: 2;
        display: flex;
        align-items: center;
        gap: 12px;
        flex: 0 0 auto;
    }
    
    .lang-switcher {
        display: flex;
        align-items: center;
        gap: 5px;
        font-size: 13px;
    }
    
    .lang-switcher a {
        padding: 5px 8px;
        font-weight: 600;
        text-decoration: none;
        color: #666;
    }
    
    .lang-switcher a.active {
        color: #016db7;
    }
    
    .lang-switcher span {
        color: #ccc;
        font-size: 12px;
    }
    
    .cart-icon a {
        font-size: 20px;
        color: #333;
    }
    
    .cart-count {
        top: -8px;
        right: -8px;
        padding: 2px 5px;
        font-size: 10px;
        min-width: 18px;
    }
    
    /* Поиск — на новой строке ПОД первой линией */
    .search-bar {
        order: 3;
        width: 100%;
        max-width: 100%;
        margin: 8px 0 0 0;
    }
    
    .search-bar form {
        display: flex;
        width: 100%;
    }
    
    .search-bar input {
        flex: 1;
        padding: 8px 12px;
        font-size: 13px;
        border-radius: 4px 0 0 4px;
        height: 36px;
        border: 1px solid #ddd;
        border-right: none;
    }
    
    .search-bar button {
        padding: 0 12px;
        height: 36px;
        border-radius: 0 4px 4px 0;
        font-size: 14px;
        background: #016db7;
        color: white;
        border: none;
        cursor: pointer;
    }
    
    .header-bottom {
        display: none;
    }
    
    .mobile-menu {
        display: block;
        padding: 8px 15px;
        background: #2c3e50;
        position: relative;
    }
    
.mobile-menu-toggle {
    padding: 8px 12px;
    font-size: 20px;
    width: auto;
    /* 🔥 Добавляем выравнивание иконки СПРАВА */
    justify-content: flex-end;
    display: flex;
    align-items: center;
    
    max-width: 200px;
    background: none;
    border: none;
    color: white; /* Или #007bff для голубого */
    cursor: pointer;
}
    
    .mobile-menu-content {
        top: 65px;
        left: 15px;
        right: 15px;
        border-radius: 8px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-page {
        grid-template-columns: 1fr;
    }
    
    .cart-container, .checkout-container {
        grid-template-columns: 1fr;
    }
    
    .catalog-submenu {
        position: static;
        width: 100%;
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 32px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    /* ===== ЕЩЁ КОМПАКТНЕЕ ДЛЯ ОЧЕНЬ УЗКИХ ЭКРАНОВ (до 480px) ===== */
    @media (max-width: 480px) {
        .header-top {
            padding: 8px 0;
            gap: 12px;
        }
        
        .logo img {
            max-height: 36px;
        }
        
        .header-actions {
            gap: 8px;
        }
        
        .lang-switcher {
            font-size: 12px;
            gap: 3px;
        }
        
        .lang-switcher a {
            padding: 4px 6px;
        }
        
        .lang-switcher span {
            font-size: 10px;
        }
        
        .cart-icon a {
            font-size: 18px;
        }
        
        .cart-count {
            top: -7px;
            right: -7px;
            padding: 1px 4px;
            font-size: 9px;
            min-width: 16px;
        }
        
        .search-bar {
            margin: 5px 0 0 0;
        }
        
        .search-bar input {
            padding: 8px 10px;
            font-size: 12px;
            height: 34px;
        }
        
        .search-bar button {
            padding: 0 10px;
            height: 34px;
            font-size: 13px;
        }
        
        .mobile-menu {
            padding: 6px 12px;
        }
        
        .mobile-menu-toggle {
            padding: 6px 10px;
            font-size: 18px;
            max-width: 180px;
        }
        
        .mobile-menu-content {
            top: 60px;
            left: 10px;
            right: 10px;
        }
    }
}

/* Footer */
.footer {
    background: #1a1a2e;
    color: #fff;
    padding: 60px 0 20px;
    margin-top: 60px;
}

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

.footer-col h3 {
    margin-bottom: 20px;
    font-size: 18px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background: #016db7;
}

.footer-col p {
    color: #aaa;
    line-height: 1.6;
    margin-bottom: 20px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col ul li a:hover {
    color: #016db7;
    padding-left: 5px;
}

.contact-info li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.contact-info li i {
    width: 25px;
    color: #016db7;
}

.contact-info li a, .contact-info li span {
    color: #aaa;
    text-decoration: none;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s;
}

.social-links a:hover {
    background: #016db7;
    transform: translateY(-3px);
}

/* Логотип разработчика */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-bottom p {
    color: #aaa;
    font-size: 14px;
}

.developer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #aaa;
    font-size: 14px;
}

.developer-logo img {
    height: 55px;
    width: auto;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.developer-logo img:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .developer-logo {
        justify-content: center;
    }
}

.footer-bottom p {
    color: #aaa;
    font-size: 14px;
}

.payment-methods {
    display: flex;
    gap: 15px;
    font-size: 24px;
    color: #aaa;
}

/* Cookie consent */
.cookie-consent {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: #1a1a2e;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.cookie-consent p {
    margin: 0;
    font-size: 14px;
}

.cookie-consent button {
    background: #016db7;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

/* Scroll to top */
.scroll-top {
    position: fixed;
    bottom: 80px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #016db7;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    z-index: 999;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.scroll-top:hover {
    background: #0a5588;
    transform: translateY(-3px);
}

/* Notification */
#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
}

.notification {
    background: white;
    padding: 12px 20px;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    animation: slideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification.success {
    border-left: 4px solid #28a745;
}

.notification.error {
    border-left: 4px solid #dc3545;
}

.notification.info {
    border-left: 4px solid #17a2b8;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Header scrolled */
.header-scrolled {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Loading spinner */
.loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #016db7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive footer */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-consent {
        flex-direction: column;
        text-align: center;
    }
    
    .scroll-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
} 


/* Блокировка прокрутки страницы при открытом мобильном меню */
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Фикс для мобильных браузеров */
@media (max-width: 992px) {
    body.menu-open {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
    }
}