/* ===== Убираем отступы между блоками ===== */
.h-promo {
    margin-top: 0 !important;
}
.block-header.is-margin-top {
    margin-top: 0 !important;
}
.promo-categories-wrapper {
    margin-bottom: 0 !important;
}
.promo-categories-wrapper + * {
    margin-top: 0 !important;
}

/* ===== Мобильные: 3 колонки, перенос текста, одинаковая высота ===== */
@media (max-width: 768px) {
    .h-popular__col-5 {
        flex: 0 0 33.333% !important;
        max-width: 33.333% !important;
        padding: 0 0px !important;           /* исправлено: было -6px, стало 2px */
    }
    .h-popular__inner {
        height: 210px !important;
        display: flex;
        flex-direction: column;
    }
    .h-popular__img {
        padding: 10px 2px !important;
        height: auto !important;
        flex-shrink: 0;
    }
    .h-popular__img img {
        max-width: 100% !important;
        max-height: 110px !important;
        width: auto !important;
        height: auto !important;
    }
    .h-popular__categories {
        flex-grow: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        overflow: hidden;
    }
    .h-popular__categories-header {
        font-size: 12px !important;
        line-height: 1.3 !important;
        width: 100%;
    }
    .h-popular__categories-header a {
        font-size: 13px !important;
        line-height: 1.2 !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        display: block !important;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-top: 12px !important;
    }
    .h-popular__arrow {
        width: 20px !important;
        height: 20px !important;
    }
    .h-popular__arrow i,
    .h-popular__arrow svg {
        transform: scale(0.7) !important;
        display: inline-block !important;
    }       
    .block-header.is-margin-top {
        text-align: center !important;
        font-size: 14px !important;
        font-weight: 800 !important;
        margin-top: 10px !important;
        margin-bottom: 5px !important;
    }
    
}
/* Увеличиваем логотип на мобильных устройствах */
@media (max-width: 500px) {
    .hcenter__logo img {
        max-height: 35px !important;   /* подберите нужную высоту */
        width: auto !important;
    }
    /* Если логотип в мобильной панели (mobile-bar) */
    .mobile-bar .hcenter__logo img,
    .mobile-bar__logo img {
        max-height: 40px !important;
    }
}
/* Исправление микро-щелей между плитками на iOS */
.promo-categories-grid {
    display: flex;
    flex-wrap: wrap;
    background-color: #fff;  /* фон, совпадающий с плитками */
}
.promo-category-card {
    position: relative;
    margin-right: -1px;      /* перекрывает возможную щель */
    margin-bottom: -1px;
    background-clip: padding-box;
    backface-visibility: hidden;
    transform: translateZ(0);
}
/* Если блок находится внутри wrapper, убедимся, что фон не просвечивает */
.promo-categories-wrapper {
    background-color: #fff;
}
.delivery-note {
    color: #e53935;
    font-weight: bold;
    font-size: 14px;
    margin-right: 20px;
    white-space: nowrap;
}
@media (max-width: 768px) {
    .delivery-note {
        font-size: 10px;
        margin-right: 10px;
        white-space: normal; /* разрешить перенос на телефонах */
    }
}

.rotating-images-stack {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f5f5f5;
}
.rotating-img-1, .rotating-img-2 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 2.3s ease;
}
.rotating-img-1 {
    opacity: 1;
    z-index: 2;
}
.rotating-img-2 {
    opacity: 0;
    z-index: 1;
}
/* При добавлении класса fade-out -> первая картинка прозрачна, вторая видима */
.rotating-images-stack.fade-out .rotating-img-1 {
    opacity: 0;
}
.rotating-images-stack.fade-out .rotating-img-2 {
    opacity: 1;
}
/* Затемнение при наведении на ссылку (только когда нет активной анимации) */
.product-rotating-link .rot-img {
    transition: opacity 0.2s ease;
}
.product-rotating-link:hover .rot-img--front,
.product-rotating-link:hover .rot-img--back {
    opacity:1.7;
}
/* Чтобы наведение не мешало во время анимации переключения (когда есть класс fade-out) */
.rotating-stack.fade-out:hover .rot-img--front,
.rotating-stack.fade-out:hover .rot-img--back {
    opacity: 1; /* не затемняем во время анимации */
}