/* =========================================================
   Best Food Items (Home) — clean + no duplicates
   Fix: huge whitespace + missing button + equal card heights
   ========================================================= */

/* 1) SECTION SPACING (убираем “воздух”) */
.best-food-items-section.section-padding {
    padding-top: 40px !important;
    padding-bottom: 40px !important;
}

/* В теме на мобиле .section-title может получать огромный padding.
   Гасим только внутри best-food */
.best-food-items-section .section-title {
    padding: 0 !important;
    margin: 0 0 12px 0 !important;
}

.best-food-items-section .section-title .sub-title {
    font-size: 13px !important;
    line-height: 1.2 !important;
    letter-spacing: 1.2px !important;
    margin-bottom: 6px !important;
}

.best-food-items-section .section-title h2 {
    font-weight: 900 !important;
    font-size: 42px !important;
    line-height: 1.15 !important;
    margin: 0 !important;
}

/* 2) SWIPER: никаких фиксированных высот, тянем карточки */
.best-food-items-section .bestFoodItems-slider {
    height: auto !important;
    margin-top: 0 !important;
}

.best-food-items-section .bestFoodItems-slider .swiper-wrapper {
    align-items: stretch !important;
    height: auto !important;
}

.best-food-items-section .bestFoodItems-slider .swiper-slide {
    height: auto !important;
    display: flex !important;
}

.best-food-items-section .bestFoodItems-slider .single-food-items {
    width: 100%;
    height: auto !important;
    display: flex !important;
}

/* 3) CARD LAYOUT: кнопка не должна “пропадать/обрезаться” */
.best-food-items-section .dishes-card.style2 {
    width: 100%;
    height: 100%;
    display: flex !important;
    flex-direction: column !important;
    overflow: visible !important;
    /* важно */
}

.best-food-items-section .dishes-card.style2 .dishes-content {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    overflow: visible !important;
}

.best-food-items-section .dishes-card.style2 .dishes-content .mt-auto {
    margin-top: auto !important;
}

/* Жёстко: кнопку показывать всегда */
.best-food-items-section .dishes-card.style2 .theme-btn,
.best-food-items-section .dishes-card.style2 button.theme-btn {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    justify-content: center !important;
    align-items: center !important;
}

/* 4) CIRCLE AROUND PHOTO (центр + вокруг) */
.best-food-items-section .dishes-card.style2 .dishes-thumb {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding-top: 12px !important;
}

.best-food-items-section .dishes-card.style2 .dishes-thumb>img {
    position: relative !important;
    z-index: 2 !important;
    width: 160px !important;
    height: 160px !important;
    object-fit: cover !important;
    border-radius: 50% !important;
}

.best-food-items-section .dishes-card.style2 .circle-shape {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 1 !important;
    width: 190px !important;
    height: 190px !important;
    pointer-events: none !important;
}

.best-food-items-section .dishes-card.style2 .circle-shape img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

/* 5) EQUAL HEIGHTS:
      title = 2 строки всегда,
      ingredients = 3 строки всегда */
.best-food-items-section .dishes-card.style2 .dishes-content h3 {
    font-size: 20px !important;
    line-height: 1.2 !important;
    margin-bottom: 10px !important;

    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    overflow: hidden !important;

    min-height: calc(1.2em * 2) !important;
}

.best-food-items-section .popular-ingredients {
    font-size: 13px !important;
    line-height: 1.35 !important;
    color: #6b7280 !important;

    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;
    overflow: hidden !important;

    min-height: calc(1.35em * 3) !important;
    margin-bottom: 10px !important;
}

/* граммаж меньше */
.best-food-items-section .dishes-card.style2 h6.text-theme-color {
    font-size: 13px !important;
    font-weight: 600 !important;
    margin-bottom: 10px !important;
}

/* 6) BOTTOM WHITESPACE: pagination + CTA link */
.best-food-items-section .bestFoodItems-pagination {
    margin-top: 12px !important;
    padding: 0 !important;
}

.best-food-items-section .text-center.mt-4 {
    margin-top: 12px !important;
    /* вместо огромного */
}

.single-food-items,
.dishes-card,
.dishes-content {
    overflow: visible !important;
}

.dishes-content {
    position: relative;
    z-index: 2;
}

.dishes-thumb {
    position: relative;
    z-index: 1;
}

.best-food-items-section.section-padding {
    padding-top: 50px;
    padding-bottom: 50px;
}

.best-food-items-section .section-title {
    margin-bottom: 20px;
}

/* === BEST FOOD: STOP SWIPER FROM STRETCHING HEIGHT === */
.best-food-items-section .bestFoodItems-slider,
.best-food-items-section .bestFoodItems-slider .swiper-wrapper,
.best-food-items-section .bestFoodItems-slider .swiper-slide {
    height: auto !important;
}

/* Swiper по умолчанию тянет элементы по высоте — запрещаем */
.best-food-items-section .bestFoodItems-slider .swiper-wrapper {
    align-items: flex-start !important;
    /* ВАЖНО: не stretch */
}

/* Слайд пусть живёт по контенту */
.best-food-items-section .bestFoodItems-slider .swiper-slide {
    display: flex !important;
}

/* Карточка занимает ширину, высота — по контенту, кнопка не исчезает */
.best-food-items-section .bestFoodItems-slider .single-food-items {
    width: 100%;
    display: flex !important;
}

.best-food-items-section .dishes-card.style2 {
    width: 100%;
    display: flex !important;
    flex-direction: column !important;
}

.best-food-items-section .dishes-card.style2 .dishes-content {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
}

.best-food-items-section .dishes-card.style2 .dishes-content .mt-auto {
    margin-top: auto !important;
}

/* FORCE: auto-height slides for Best Food slider only */
.best-food-items-section .bestFoodItems-slider .swiper-slide {
    height: auto !important;
}

/* ============================
   BestFood: move title into the "air"
   ============================ */

/* 1) Центруем текст по вертикали относительно этой пустоты:
      сдвигаем блок заголовка вниз */

/* 2) На планшете/мобиле сдвиг меньше */
@media (max-width: 991px) {
    .best-food-items-section .section-title {
        transform: translateY(50px);
    }
}

@media (max-width: 575px) {
    .best-food-items-section .section-title {
        transform: translateY(35px);
    }
}

/* ============================
   BestFood: fine-tune title vertical position
   ============================ */

/* Было ~80px — делаем компактнее */

/* Планшет */
@media (max-width: 991px) {
    .best-food-items-section .section-title {
        transform: translateY(40px);
    }
}

/* Мобилка */
@media (max-width: 575px) {
    .best-food-items-section .section-title {
        transform: translateY(28px);
    }
}