/* Затемнение фона */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 9998;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay.show {
    display: block;
    opacity: 1;
}

/* Модальное окно каталога */
.catalog-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 1200px;
    height: 80vh;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    overflow: hidden;
}

.catalog-modal.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.catalog-container {
    display: flex;
    height: 100%;
    position: relative;
}

/* Левая колонка */
.col-1 {
    width: 300px;
    background: #f8f9fa;
    padding: 30px 0;
    border-right: 2px solid #e9ecef;
    overflow-y: auto;
}

/* Правая колонка */
.col-2 {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    background: white;
}

/* Списки */
.list-reset {
    list-style: none;
    margin: 0;
    padding: 0;
}

.col-1 ul li {
    position: relative;
}

.col-1 ul li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 30px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    position: relative;
}

.col-1 ul li a:hover,
.col-1 ul li a.active {
    background: rgba(0, 123, 255, 0.1);
    border-left-color: #007bff;
    color: #007bff;
}

/* Стрелочка */
.arr {
    width: 0;
    height: 0;
    border-left: 5px solid #999;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    margin-left: auto;
    transition: transform 0.3s ease;
}

.col-1 ul li a:hover .arr,
.col-1 ul li a.active .arr {
    border-left-color: #007bff;
    transform: translateX(3px);
}

/* Бейдж "Выгодно" */
.profit {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #ff4444;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 8px;
}

.profit img {
    width: 12px;
    height: 12px;
}

/* Подменю */
.submenu {
    display: none;
    background: white;
    border-left: 2px solid #007bff;
    margin-left: 20px;
}

.submenu.show {
    display: block;
}

.submenu li a {
    padding: 8px 20px !important;
    font-size: 14px;
    border-left: none !important;
}

.submenu li a:hover {
    background: rgba(0, 123, 255, 0.05) !important;
}

/* Контент правой колонки */
.col-2 .h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

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

.col-2 ul li a {
    color: #666;
    text-decoration: none;
    padding: 8px 0;
    display: block;
    transition: color 0.3s ease;
}

.col-2 ul li a:hover {
    color: #007bff;
}

/* Баннер */
.banner-container {
    background: #1B1B1B;
    border-radius: 24px;
    padding: 30px;
    color: white;
    margin-top: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.banner-container img {
    width: 120px;
    height: auto;
}

.catalog-banner-text .tw-text-white {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
}

.catalog-banner-text p {
    color: #ccc;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Кнопки */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-dark {
    background: #333;
    color: white;
}

.btn-telegram {
    background: #0088cc;
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Кнопка закрытия */
.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border: none;
    background: #f8f9fa;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10000;
}

.close-btn:hover {
    background: #e9ecef;
    transform: rotate(90deg);
}

/* Адаптивность */
@media (max-width: 768px) {
    .catalog-modal {
        width: 95%;
        height: 90vh;
    }
    
    .catalog-container {
        flex-direction: column;
    }
    
    .col-1 {
        width: 100%;
        height: 40%;
    }
    
    .col-2 {
        height: 60%;
    }
    
    .banner-container {
        flex-direction: column;
        text-align: center;
    }
    
    .col-1 ul li a {
        padding: 10px 20px;
    }
}

/* Для пункта меню КАТАЛОГ */
.catalog-btn {
    cursor: pointer;
}

.admin-bar .catalog-modal {
    top: calc(50% + 16px);
}

.admin-bar .overlay {
    top: 32px;
    height: calc(100% - 32px);
}
/**/
/* Мобильные стили для кнопки каталога */
@media (max-width: 768px) {
    .catalog-btn {
        cursor: pointer !important;
    }
    
    /* Стили для мобильного меню */
    .mobile-menu .catalog-btn,
    .menu-mobile .catalog-btn,
    .nav-mobile .catalog-btn {
        pointer-events: auto !important;
    }
    
    /* Убедимся, что модальное окно хорошо выглядит на мобильных */
    .catalog-modal {
        width: 95% !important;
        height: 90vh !important;
        border-radius: 8px !important;
    }
    
    .catalog-container {
        flex-direction: column !important;
    }
    
    .col-1 {
        width: 100% !important;
        max-height: 40% !important;
    }
    
    .col-2 {
        max-height: 60% !important;
        padding: 20px !important;
    }
    
    /* Улучшаем тач-интерфейс */
    .col-1 ul li a {
        padding: 15px 20px !important;
        min-height: 50px !important;
        display: flex !important;
        align-items: center !important;
    }
    
    .close-btn {
        width: 44px !important;
        height: 44px !important;
        top: 10px !important;
        right: 10px !important;
        font-size: 28px !important;
    }
}

/* Принудительные стили для кликабельных элементов */
.menu-item.catalog-btn a,
.catalog-btn.menu-item > a {
    cursor: pointer !important;
    pointer-events: auto !important;
}

/* Убираем стандартное поведение ссылок для каталога */
.menu-item.catalog-btn a[href="#"],
.menu-item.catalog-btn a[href*="#catalog"],
.menu-item.catalog-btn a[href=""] {
    pointer-events: none !important;
}

/* Для админ-бара на мобильных */
@media (max-width: 782px) {
    .admin-bar .catalog-modal {
        top: calc(50% + 32px) !important;
    }
    
    .admin-bar .overlay {
        top: 46px !important;
        height: calc(100% - 46px) !important;
    }
	a.btn.btn-telegram {
		margin-top: 10px !important;
        width: 100% !important;
	}
	a.btn.btn-dark {
		width: 100% !important;
	}
	.col-2 {
		width: 100% !important;
		padding: 8px !important;
	}
	.product-item {
    width: 50% !important;
    margin-left: -14px;
    font-size: 12px;
    padding: 0 10px;
}
.col-2 ul li {
    margin-bottom: -20px;
}
}


/**/
/* Скрываем все подменю по умолчанию */
.catalog-menu .sub-menu {
    display: none !important;
}

/* Стили для основного меню */
.catalog-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.catalog-menu > li {
    border-bottom: 1px solid #eee;
    position: relative;
}

.catalog-menu > li:last-child {
    border-bottom: none;
}

.catalog-menu > li > a {
    display: block;
    padding: 12px 15px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.3s;
    font-weight: 500;
}

.catalog-menu > li > a:hover {
    background-color: #f5f5f5;
}

/* Стили для подменю второго уровня */
.catalog-menu .sub-menu {
    background-color: #f9f9f9;
    list-style: none;
    padding: 0;
    margin: 0;
}

.catalog-menu .sub-menu li {
    border-bottom: 1px solid #e0e0e0;
}

.catalog-menu .sub-menu li:last-child {
    border-bottom: none;
}

.catalog-menu .sub-menu a {
    display: block;
    padding: 10px 15px 10px 25px;
    text-decoration: none;
    color: #666;
    font-size: 14px;
    transition: all 0.3s;
}

.catalog-menu .sub-menu a:hover {
    background-color: #eee;
    color: #333;
}

/* Кнопка раскрытия подменю */
.menu-item-has-children {
    position: relative;
}

.menu-item-has-children > a {
    padding-right: 40px !important;
}

.submenu-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    font-size: 12px;
    color: #666;
    transition: transform 0.3s;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.submenu-toggle:hover {
    color: #333;
}

.submenu-toggle.active {
    transform: translateY(-50%) rotate(90deg);
}

/* Активное состояние */
.menu-item-has-children.active > a {
    background-color: #e9e9e9;
    font-weight: bold;
}

.menu-item-has-children.active .submenu-toggle {
    color: #333;
}

/* Показываем подменю когда активно */
.catalog-menu .sub-menu.active {
    display: block !important;
}