

.container {
    width: 90% !important;
    max-width: 90% !important;
    padding-left: 15px;
    padding-right: 15px;
}


.product-grid {
    display: grid;
    /* Создаем колонки: минимум 220px */
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    /* Важно: задаем расстояние между рядами КАРТОЧЕК */
    row-gap: 10px; 
    column-gap: 10px;
    align-items: start;
}
.product-card {
    display: grid;
    /* Карточка занимает 4 ряда основной сетки */
    grid-row: span 4;
    /* Включаем subgrid для рядов */
    grid-template-rows: subgrid; 
    
    background: #ffffff;
    border: 2px solid #2e5f99;
  border-radius: 15px; /* Немного скругляем углы */
	padding: 0px;
    max-height: 400px;
    box-sizing: border-box;
    overflow: hidden;
	
	position: relative; /* дополнение от стикера */
	
	transition: box-shadow 0.3s ease, transform 0.3s ease; /* Плавность эффекта */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* Легкая тень в обычном состоянии */
}

/* Эффект при наведении на всю область карточки */
.product-card:hover {
    /* Параметры тени: смещение по X, по Y, размытие, растяжение, цвет */
    box-shadow: 0 10px 25px rgba(0,0,0,0.15); 
    
    /* Дополнительно: можно слегка приподнять карточку (на 4 пикселя вверх) */
    transform: translateY(-4px);
    
    z-index: 10; /* Чтобы тень не перекрывалась соседними карточками */
}


/* 1-й ряд: Изображение */
.product-card__image {
    grid-row: 1;
    text-align: center;
}
.product-card__image img {
    height: 150px;
    object-fit: contain;
}

/* 2-й ряд: Заголовок */
.product-card__title {
    grid-row: 2;
    margin: 10px 0;
    font-size: 16px;
	font-weight: bold;
    text-align: center !important; /* !important чтобы перебить остатки стилей темы */
}
.product-card__title a {
    text-decoration: none;
    color: #333;
    display: block;
}

/* 3-й ряд: Описание */
.product-card__description {
	padding: 5px;
    grid-row: 3;
    font-size: 12px;
    color: #777;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 4-й ряд: Цена и кнопка */
.product-card__bottom {
    grid-row: 4;
    align-self: end; /* Всегда прижато к низу */
    padding-top: 10px;
}

.product-card__price {
    font-size: 18px;
    font-weight: bold;
	color: #e74c3c; 
    text-align: center !important; /* Центрируем цену */
    margin-bottom: 8px;
    display: block;
}

.btn-buy {
	font-size: 14px;
    font-weight: bold;
    display: block;
    width: 100%;
    padding: 10px;
    background: #2e5f99;
    color: #fff;
     border: 2px solid #2e5f99;
	border-radius: 12px; /* Немного скругляем углы */
    text-transform: uppercase;
    cursor: pointer;
	transition: background-color 0.3s ease, color 0.3s ease; /* Плавный переход */
}
/* Состояние при наведении */
.btn-buy:hover {
    background-color: #229ac8; /* Новый цвет при наведении (например, красный) */
    color: #ffffff;            /* Цвет текста (можно оставить прежним) */
    cursor: pointer;          /* Убеждаемся, что курсор меняется на палец */
}


.sticker-sale {
    position: absolute;
    top: 0px;
    left: 0px;
    background-color: #e74c3c; /* Красный цвет акции */
    color: #ffffff;
    padding: 4px 10px;
    font-size: 16px;
    font-weight: bold;
    /*text-transform: uppercase;*/
    z-index: 10;
    border-radius: 2px;
    pointer-events: none; /* Чтобы стикер не мешал кликать по картинке */
}

/* --- Общие настройки ного меню --- */
.custom-menu {

    background: #333;
    position: relative;
    z-index: 1000;
}

.custom-menu__checkbox {
    display: none; /* Скрываем технический чекбокс */
}

/* --- Десктопное меню --- */
.custom-menu__list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
	 justify-content: center; /* Это свойство выравнивает пункты меню по центру */
}

.custom-menu__item {
    position: relative;
	justify-content: center;
	text-align: center; 
}

.custom-menu__link {
    display: block;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 13px;
    transition: background 0.3s;
	justify-content: center;
	text-align: center; 
}

.custom-menu__item:hover > .custom-menu__link {
    background: #2e5f99;
}

/* Выпадающее меню (Desktop) */

/* Выпадающее меню — ГЛАВНАЯ ПРАВКА */
.custom-menu__dropdown {
    position: absolute;
    top: 100%;
    /* Используем логическое начало: на LTR это слева, на RTL это справа */
    inset-inline-start: 0; 
    background: white;
    border: 1px solid #ddd;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    min-width: 220px;
    display: none;
    padding: 15px;
    /* Текст выравнивается согласно направлению контейнера */
    text-align: start; 
}

.custom-menu__item:hover .custom-menu__dropdown {
    display: block;
}

.custom-menu__sublist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.custom-menu__sublist li a {
    display: block;
    padding: 8px 0;
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.custom-menu__sublist li a:hover {
    color: #e74c3c;
}

.custom-menu__all {
    display: block;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    font-weight: bold;
    color: #333;
    text-decoration: none;
	justify-content: center;
	text-align: center; 
}

/* --- Мобильное меню (Burger) --- */
.custom-menu__burger {
    display: none; /* Скрыто на ПК */
    padding: 15px;
    cursor: pointer;
    background: #222;
    color: #fff;
    align-items: center;
    gap: 10px;
}

.burger-line {
    width: 20px;
    height: 2px;
    background: #fff;
    position: relative;
}
.burger-line::before, .burger-line::after {
    content: '';
    width: 20px;
    height: 2px;
    background: #fff;
    position: absolute;
    left: 0;
}
.burger-line::before { top: -6px; }
.burger-line::after { bottom: 6px; }

@media (max-width: 767px) {
    .custom-menu__burger {
        display: flex; /* Показываем на мобильных */
    }

    .custom-menu__list {
        display: none; /* Скрываем список */
        flex-direction: column;
        background: #333;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
    }

    /* Открытие меню по клику на бургер */
    .custom-menu__checkbox:checked ~ .custom-menu__list {
        display: flex;
    }

    .custom-menu__item {
        border-bottom: 1px solid #444;
    }

    .custom-menu__dropdown {
        position: static;
        display: block; /* Выпадашки на мобильных видны сразу под категориями */
        background: #444;
        border: none;
        padding-left: 30px;
    }

    .custom-menu__sublist li a {
        color: #ccc;
    }
}








/* 1. Сетка модуля Рекомендуемые (Центрирование на странице) */
.featured-horizontal-section {
    width: 100%;
    margin: 40px 0;
    text-align: center;
}

.featured-grid-h {
    display: grid;
    /* Создает колонки по 320px, сколько влезет, и центрирует их */
    grid-template-columns: repeat(auto-fit, 320px);
    justify-content: center;
    gap: 20px;
    padding: 20px 0;
}

/* 2. Основной контейнер горизонтальной карточки */
.p-card-h-full {
    display: grid;
    /* Две колонки: 130px под фото, остальное под текст */
    grid-template-columns: 130px 1fr;
    /* Два ряда: верхний (резиновый) и нижний под кнопку (40px) */
    grid-template-rows: 1fr 40px;
    width: 320px;
    height: 200px;
    background: #ffffff;
    border: 2px solid #2e5f99;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
    text-align: left; /* Базовое выравнивание */
}

/* Эффект при наведении на всю карточку */
.p-card-h-full:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* 3. Левая часть: Изображение */
.p-card-h__image {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-right: 1px solid #eee;
}

.p-card-h__image img {
    max-width: 100%;
    max-height: 140px;
    object-fit: contain;
}

/* 4. Правая часть: Контент */
.p-card-h__content {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    padding: 12px;
    overflow: hidden;
}

.p-card-h__title {
    margin: 0 0 5px 0;
    font-size: 15px;
    line-height: 1.2;
}

.p-card-h__title a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
}

.p-card-h__description {
    font-size: 12px;
    color: #777;
    margin-bottom: 8px;
    flex-grow: 1;
    /* Обрезка текста до 3 строк */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 5. Блок цены с надписью Акция */
.p-card-h__price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
    margin-top: auto;
}

.text-sale-label {
    color: #e74c3c;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.price-main, .price-new {
    font-weight: bold;
    font-size: 17px;
    color: #000;
}

.price-new {
    color: #e74c3c;
}

.price-old {
    color: #999;
    text-decoration: line-through;
    font-size: 12px;
}

/* 6. Кнопка на всю ширину (занимает оба столбца внизу) */
.btn-buy-full-width {
    grid-column: 1 / span 2;
    grid-row: 2;
    width: 100%;
    height: 40px;
    background: #333;
    color: #fff;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 12px;
    transition: background 0.3s;
}

.btn-buy-full-width:hover {
    background: #e74c3c;
}



.featured-grid-h {
    display: grid;
    /* Создаем колонки: минимум 220px */
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    /* Важно: задаем расстояние между рядами КАРТОЧЕК */
    row-gap: 10px; 
    column-gap: 10px;
    align-items: start;
}

/* Центрируем модуль на странице */
.featured-horizontal-section {
    padding: 4px 0;
    width: 100%;
}

