/* =========================
           Responsive
   ========================= */


.section--foodhot {
    background-image: var(--bg-mobile, var(--bg-tablet, var(--bg-desktop)));
  color: var(--brand-black-color);
  background-color: var(--brand-grey-color);
}

.section--foodhot h1,
.section--foodhot h2,
.section--foodhot h3,
.section--foodhot p,
.section--foodhot a {
  color: var(--brand-black-color);
}
.wrap--foodhot {
    grid-template-areas: "title" "carousel" "product";
}

/* =========================
           轮播图部分
   ========================= */

.main-pic {
    grid-area: carousel;
    position: relative;
    width: 100%;
    /* 为子元素的绝对定位提供参考 */
    display: flex;
    /* 使用 flexbox 来控制内部元素的布局 */
    flex-direction: column;
    /* 让 swiper 在上，controls 在下 */
    overflow: hidden;
    justify-self: center;
}

.main-pic__container {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.main-pic__wrapper {
    margin: 0;
    padding: 0;
}

.swiper-slide {}

.main-pic__image,
.main-pic__image img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    transition: transform var(--transition-duration) var(--animation-curve);
}

/* ===============================
           轮播图分页符部分
   =============================== */

.main-pic__pagination {}

.swiper-pagination-bullet {
    width: clamp(50px, 15vw, 100px) !important;
    height: 6px !important;
    margin: 0 5px !important;
    display: inline-block !important;
    border-radius: 3px !important;
    background: var(--background-color) !important;
    opacity: .5 !important;
}

.swiper-pagination-bullet-active {
    opacity: 1 !important;
}

/* ===============================
           轮播图换页按钮部分
   =============================== */
.main-pic__controls-row {
    display: flex;
    /* 使用 flex 布局 */
    justify-content: space-between;
    /* 两端对齐：左边一个，右边一个 */
    align-items: center;
    /* 垂直居中对齐 */
    width: 100%;
    padding-top: 12px;
}

.main-pic__page-box {
    width: auto;
    /* 宽度由内容决定 */
    display: flex;
    /* 让两个按钮水平排列 */
    gap: 10px;
    align-self: flex-end;
    padding-bottom: 12px;
}

.swiper-button-prev {
    left: 0 !important;
}

.swiper-button-next {
    right: 0 !important;
}

.swiper-button-prev,
.swiper-button-next {
    appearance: none;
    -webkit-appearance: none;
    border: none;
  outline: none;
  box-shadow: none;
    background-image: none;

    position: static !important;
    margin: 0;
    width: 44px !important;
    height: 44px !important;
    border-radius: 50%;
    background-color: transparent;
   
}

.swiper-button-disabled {
    opacity: 0.5;
}

.swiper-button-next::after,
.swiper-button-prev::after {
    color: var(--brand-black-color);
     font-size: 1.2em;
    font-weight: bold;
}

.main-pic__page-box {
    display: none;
}

/* ===============================
           产品卡片部分
   =============================== */

.product-grid {
    grid-area: product;
    position: relative;
    display: grid;
    grid-template-columns: auto;
    grid-template-rows: auto auto auto;
    row-gap: 20px;
    align-items: start;
}

.product-card {
    background-color: var(--background-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: auto;
    padding: 5px 20px;
    /* max-height: 500px; */

    justify-self: center;
}

.item-1,
.item-2,
.item-3 {
    width: 70%;
}

/* =================================
           产品卡片英文标题部分
   ================================= */


.product-card__header {
    /* font-family: inherit; */
    /* color: var(--brand-grey-color); */
}

.product-card__feature {
    margin: 0;
    padding-left: 15px;
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-card__feature::before {
    /* 用 ::before 代替 ::after 更符合语义 */
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--brand-red-color);
}

/* =================================
           产品卡片图片部分
   ================================= */

.product-card__image-container {
    width: 100%;
     height: auto;
    aspect-ratio: 1 / 1;
    /* 保持图片容器为正方形 */
    overflow: hidden;
    /* 隐藏图片放大效果的溢出部分 */

}

/* .product-card__image-container img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform var(--transition-duration) var(--animation-curve);
} */

.product-card__image,
.product-card__image img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    transition: transform var(--transition-duration) var(--animation-curve);
}

/* =================================
           产品卡片中文介绍部分
   ================================= */

.product-card__body {
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-card__title {
    margin: 0;
    /* font-family: inherit; */
    /* color: var(--brand-grey-color); */
    padding: 5px 0;
    border-top: 1px solid var(--brand-grey-color);
    border-bottom: 1px solid var(--brand-grey-color);
}

.product-card__desc {
    margin-bottom: 0;
    /* font-family: inherit; */
    /* color: var(--brand-grey-color); */
    max-width: 100%;
    /* white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; */
    display: -webkit-box; 
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =================================
           装饰图片部分
   ================================= */

.deco-item-right--foodhot {
    right: 7%;
    top: 35%;
    width: 20%;
    bottom: auto;
}


/* ============================
             断点768px
   ============================ */

@media(min-width: 768px) {
    .section--foodhot {
        background-image: var(--bg-tablet, var(--bg-desktop));
        /* background-position: center top;  */
    }

    .main-pic {
        width: 70%;
        justify-self: center;
    }


    .main-pic__pagination .swiper-pagination-bullet {
        width: clamp(90px, 12vw, 120px);

    }

    .product-grid {
        grid-template-columns: auto auto auto;
        grid-template-rows: auto;
        column-gap: 20px;
    }

    .product-card {
        padding: 15px 20px;
    }

    .item-1,
    .item-2,
    .item-3 {
        width: 100%;
        /* justify-self: center; */
    }


    .product-card__body {
        padding: 15px 0;

    }

    .product-card__title {

        padding: 10px 0;

    }

    .product-card__desc {
        padding-top: 8px;
    }

    .deco-item-right--foodhot {
        top: 57%;
        right: 25%;
        width: 13%;
    }

}

/* =========================
         断点：1024px
   ========================= */

@media (min-width: 1024px) {
    .section--foodhot {
        background-image: var(--bg-desktop);
        /* background-position: center top;  */
    }


    .wrap--foodhot {
        min-height: 100vh;
        min-height: 100dvh;
        grid-template-columns: 1fr 1.2fr;
        grid-template-rows: auto 1fr;
        grid-template-areas:
            "title product"
            "carousel  product";

        align-items: start;
        gap: 2rem 3rem;
    }

    .main-pic {
        width: 100%;
        max-width: 680px;
    }
    .main-pic__container:hover .main-pic__slide img {
        transform: scale(1.05);
    }

    .main-pic__pagination {
        display: none;
    }

    .main-pic__button-prev:hover,
    .main-pic__button-next:hover {
        background-color: var(--brand-red-color);
    }

    .product-card:hover .product-card__image,
    .product-card:hover .product-card__image img {
        transform: scale(1.05);
    }

    .main-pic__page-box {
        display: flex;
    }

    .product-grid {
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: auto;
        row-gap: 60px;
        column-gap: 20px;
        
    }
        .product-card {
        padding: 5px 20px;
        max-width: 300px;
    }
    .product-card__body {
        padding: 15px 0 0 0;

    }
    .item-1,
    .item-2,
    .item-3 {
        width: 100%;
   
    }
.item-2 {
    justify-self: start;
}
    .product-grid {
        row-gap: 20px;
    }


    .deco-item-right--foodhot {
        right: 3%;
        top: 80%;
        /* bottom: 20px; */
        width: min(110px, 10vw);
    }
}

@media (min-width: 1024px) and (max-height: 850px) {
    .wrap--foodhot {
        grid-template-columns: 1fr 2fr;
    }
    .main-pic {
        width: 100%;
        /* height: 100%; */
    }
    .swiper-button-prev,
.swiper-button-next {
    width: 34px;
    height: 34px;
   
}

        .product-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
        .item-1,
    .item-2,
    .item-3 {
        width: 100%;
   
    }

}