/* *****************************************轮播图******************************* */
.banner-box {
    width: 100%;
    position: relative;
}

.swiper-banner {
    width: 100%;
    height: 21vw;
    overflow: hidden;
}

.banner-item {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    position: relative;
}

.banner-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 768px) {
    .swiper-banner {
        height: 30vw;
    }
}

@media (max-width: 480px) {
    .swiper-banner {
        height: 40vw;
    }
}

/* 轮播分页器自定义 */
.swiper-banner .swiper-pagination-bullets {
    bottom: 5% !important;
}

.swiper-banner .swiper-pagination-bullet {
    width: .75VW !important;
    height: .75VW !important;
    border-radius: 50% !important;
    margin: .5VW !important;
    background-color: var(--bg) !important;
}


.swiper-banner .swiper-pagination-bullet-active {
    background-color: var(--highlight) !important;
}


/* 自定义按钮 */

.swiper-banner .swiper-button-prev {
    width: 3.124vw;
    height: 3.124vw;
    box-sizing: border-box;
    padding: 0.729vw;
    background-color: hsla(0, 0%, 100%, .2);
    border-radius: 50%;
    position: absolute;
    left: 10%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
}


.swiper-banner .swiper-button-prev:hover,
.swiper-banner .swiper-button-next:hover {
    background-color: hsla(0, 0%, 100%, .5);
}

.swiper-banner .swiper-button-next {
    width: 3.124vw;
    height: 3.124vw;
    box-sizing: border-box;
    padding: 0.729vw;
    background-color: hsla(0, 0%, 100%, .2);
    border-radius: 50%;
    position: absolute;
    right: 10%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
}

.swiper-banner .swiper-button-prev:after,
.swiper-banner .swiper-button-next:after {
    font-size: 1.874vw !important;
}


/*  搜索框 */
.app-search {
    width: 100%;
    background-color: var(--primary);
    border-top: 4px solid;
    border-image-source: linear-gradient(to right, #8fc31f, #fff100, #8fc31f);
    border-image-slice: 1;
    box-sizing: border-box;
    box-shadow: var(--shadow-md);
}

.search-box {
    padding: var(--space-2);
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.search-input {
    position: relative;
    display: inline-block;
}

.search-input input[type="text"] {
    width: 300px;
    height: 2rem;
    padding: 0 1rem 0 2.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    outline: none;
    background-color: var(--bg);
    -webkit-border-radius: var(--radius-lg);
    -moz-border-radius: var(--radius-lg);
    -ms-border-radius: var(--radius-lg);
    -o-border-radius: var(--radius-lg);
}

.search-input input::placeholder {
    color: #666;
    font-size: 1rem;
    letter-spacing: 1px;
}


.search-icon {
    position: absolute;
    left: 0.625rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
}

.search-icon img {
    width: 1.5rem;
    height: 1.5rem;
}

.search-btn {
    margin-left: var(--space-2);
    color: var(--fg);
    font-size: 1.25rem;
    letter-spacing: 0.1rem;
}

@media (max-width: 768px) {
    .search-input input[type="text"] {
        width: 240px;
    }

    .search-icon img {
        width: 1.2rem;
        height: 1.2rem;
    }

    .search-btn {
        font-size: 1.1rem;
        margin-left: 0;
    }
}

/* 部分标题 */
.section-header {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-4);
    padding-top: var(--space-14);
    padding-bottom: var(--space-12);
}

.section-title-zh {
    margin: 0;
    font-weight: bold;
    color: var(--fg);
}

.section-title-en {
    margin: 0;
    color: var(--primary);
    text-align: center;
}

.section-icon {
    display: none;
}

@media (max-width: 768px) {
    .section-header {
        padding-top: var(--space-12);
    }

    .section-icon img {
        height: 48px;
    }
}


/* 热门商品 */
.product-categories {
    padding-top: var(--space-8);
    padding-bottom: var(--space-12);
}

/* 商品大类 */
.categories-list {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-xl);
    list-style: none;
}

.categories-card {
    padding: var(--space-2) var(--space-6);
    border-radius: 2rem;
    -webkit-border-radius: 2rem;
    -moz-border-radius: 2rem;
    -ms-border-radius: 2rem;
    -o-border-radius: 2rem;
    cursor: pointer;
}

.categories-card.active {
    background-color: var(--primary);
    color: var(--white);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease;
    -webkit-transition: box-shadow 0.3s ease;
    -moz-transition: box-shadow 0.3s ease;
    -ms-transition: box-shadow 0.3s ease;
    -o-transition: box-shadow 0.3s ease;
}

/* 普通状态 */
.categories-card .categories-image img:nth-child(1) {
    display: block;
}

.categories-card .categories-image img:nth-child(2) {
    display: none;
}

/* 激活时切换 */
.categories-card.active .categories-image img:nth-child(1) {
    display: none;
}

.categories-card.active .categories-image img:nth-child(2) {
    display: block;
}


.categories-image {
    width: 3rem;
    height: auto;
    display: flex;
    justify-content: center;
}

.categories-title {
    margin-top: var(--space-1);
    text-align: center;
    letter-spacing: 0.1rem;
}

/* 商品小类 */
.categories-items {
    margin-top: var(--space-6);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-12);
    list-style: none;
    position: absolute;

}

.items-name {
    color: #706f6f;
}

.product-placeholder {
    height: 0;
}


/* 商品列表 */
.product-list,
.activity-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-6);
}

.product-card {
    flex: 1 1 calc(16.67% - var(--space-6));
    max-width: calc(16.67% - var(--space-6));
    box-sizing: border-box;
    cursor: pointer;
    background-color: var(--white);
    border-radius: var(--radius);
    -webkit-border-radius: var(--radius);
    -moz-border-radius: var(--radius);
    -ms-border-radius: var(--radius);
    -o-border-radius: var(--radius);
}

@media (max-width: 1024px) {
    .product-card {
        flex: 1 1 calc(33.33% - var(--space-6));
        max-width: calc(33.33% - var(--space-6));
    }
}

@media (max-width: 480px) {

    .product-list,
    .activity-list {
        gap: var(--space-4);
    }

    .product-card {
        flex: 1 1 calc(50% - var(--space-4));
        max-width: calc(50% - var(--space-4));
    }
}

.product-card:hover {
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease;
    -webkit-transition: box-shadow 0.3s ease;
    -moz-transition: box-shadow 0.3s ease;
    -ms-transition: box-shadow 0.3s ease;
    -o-transition: box-shadow 0.3s ease;
}


/* .product-card.active .product-image img {
    border: 0.25rem solid var(--primary);
}

.product-card.active .product-info {
    background-color: var(--primary);
    color: var(--white);
}

.product-card.active .product-info .product-price {
    color: var(--white);
}

.product-card.active .product-info .straight-line {
    background-color: var(--white);
} */

/* 普通状态 */
.product-card .product-info .product-description img:nth-child(1) {
    display: block;
}

.product-card .product-info .product-description img:nth-child(2) {
    display: none;
}

/* 激活时切换 */
.product-card.active .product-info .product-description img:nth-child(1) {
    display: none;
}

.product-card.active .product-info .product-description img:nth-child(2) {
    display: block;
}

.green-border {
    width: 50%;
    height: 1rem;
    margin-left: var(--space-4);
    background-color: var(--primary);
    border-top-left-radius: var(--radius);
    border-top-right-radius: var(--radius);
}

.product-image {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    object-fit: cover;
    display: block;
    border-top-left-radius: var(--radius);
    border-top-right-radius: var(--radius);
    /* border-radius: var(--radius);
    -webkit-border-radius: var(--radius);
    -moz-border-radius: var(--radius);
    -ms-border-radius: var(--radius);
    -o-border-radius: var(--radius); */
}

.product-info {
    padding: var(--space-2);
    box-sizing: border-box;
}

/* .product-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;

    line-height: 1.5em;
    height: calc(1.5em * 2);
} */

.product-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-price {
    margin: 0;
    color: var(--primary-deep);
    font-size: 1.25rem;
    font-weight: bold;
    font-family: "Arial", "Roboto Mono", "Courier New", monospace;
}

@media (max-width: 768px) {
    .product-price {
        font-size: 1.1rem;
    }
}

.product-price .currency {
    font-size: .875rem;
}

.product-description {
    display: flex;
    align-items: center;
}

.product-description img {
    width: 1rem;
    height: auto;
}

.more-items {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: var(--space-lg);
}


.more-items .btn-more {
    padding: var(--space-2) var(--space-8);
    border-radius: var(--radius-lg);
    background-color: var(--primary);
    color: var(--white);
    font-size: 1.2rem;
    letter-spacing: 0.1rem;
    border: none;
    cursor: pointer;
    -webkit-border-radius: var(--radius-lg);
    -moz-border-radius: var(--radius-lg);
    -ms-border-radius: var(--radius-lg);
    -o-border-radius: var(--radius-lg);
}

.more-items .btn-more a {
    color: var(--white);
}

@media (max-width: 768px) {
    .more-items {
        margin-top: var(--space-10);
    }

    .more-items .btn-more {
        font-size: 1rem;
        padding: var(--space-2) var(--space-6);
    }
}

/* 资讯 */
.news-box {
    display: flex;
    align-items: stretch;
}

.news-poster {
    width: 48%;
    position: relative;
}

.news-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


.news-poster .news-poster-overlay {
    width: 100%;
    padding: var(--space-2);
    box-sizing: border-box;
    position: absolute;
    left: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    color: var(--white);
    display: flex;
    align-items: center;
}

.news-poster-overlay .news-info {
    width: 90%;
    padding-right: 10%;
    box-sizing: border-box;
}

.news-poster-overlay .news-info .news-title {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    letter-spacing: 0.2rem;
}

.news-poster-overlay .news-info .news-subtitle {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.1rem;
}

.news-poster-overlay .news-date {
    text-align: right;
    font-family: "Arial", "Roboto Mono", "Courier New", monospace;
}


.news-poster-overlay .news-date .date-day {
    font-size: 1.35rem;
    letter-spacing: 0.1rem;
}

.news-poster-overlay .news-date .date-year {
    padding-top: var(--space-1);
    border-top: 1px solid var(--white);
    font-size: 1rem;
    text-align: center;
    letter-spacing: 0.4rem;
}



.news-list {
    width: 52%;
    background-color: var(--primary-light);
    padding-left: var(--space-8);
    padding-right: var(--space-4);
    padding-top: var(--space-4);
    padding-bottom: var(--space-12);
    font-weight: 600;
    list-style: none;
}

.news-item {
    display: flex;
    align-items: center;
    margin-top: var(--space-8);
    padding-left: var(--space-2);
    position: relative;
}

.news-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background-color: var(--white);
}

.news-title {
    flex: 1;
    padding-right: 10%;
    box-sizing: border-box;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.news-date {
    flex-shrink: 0;
}


@media (max-width: 1024px) {
    .news-box {
        display: block;
    }

    .news-poster,
    .news-list {
        width: 100%;
    }

    .news-list {
        padding-left: var(--space-4);
        padding-bottom: var(--space-8);
    }

    .news-item {
        margin-top: var(--space-4);
    }

}

@media (max-width: 480px) {
    .news-poster .news-poster-overlay {
        display: block;
    }

    .news-poster-overlay .news-info {
        width: 100%;
        padding-right: 0;
    }

    .news-poster-overlay .news-info .news-title {
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .news-poster-overlay .news-date {
        display: none;
    }

    .news-title {
        padding-right: 0;
    }

    .news-date {
        display: none;
    }
}