/* 隐藏垂直滚动条 */
/* 隐藏滚动条，避免弹窗时画面伸缩*/
body::-webkit-scrollbar {
    width: 0;
}

body::-webkit-scrollbar-track {
    background: transparent;
}

body::-webkit-scrollbar-thumb {
    background: transparent;
}

/* 隐藏水平滚动条 */
/*body::-webkit-scrollbar-horizontal {*/
/*    height: 0;*/
/*}*/

/*body::-webkit-scrollbar-thumb-horizontal {*/
/*    background: transparent;*/
/*}*/

body {
    background-color: #f2f3f5;
}

.points-merchant-header {
    width: 100%;
    height: 290px;
    min-height: 0;
    position: relative;
    /* background: linear-gradient(180deg, #E21C34 0%, #E21C34 100%); */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.points-merchant-header-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    /*background: url(/static/images/points_merchant/points_merchant_header_bg_1.png) no-repeat center / 100% 100%;*/
    background: linear-gradient(286.73deg, #E21C34 19.49%, #7C0F1D 89.14%);
    z-index: 0;
}

.points-merchant-header-content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 1400px;
    width: 100%;
    box-sizing: border-box;
    padding: 0 clamp(16px, 3vw, 40px);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.points-merchant-header-top {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
}

.user-points-section {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.user-avatar {
    width: 148px;
    height: 148px;
    border-radius: 50%;
    overflow: hidden;
    background: #fff;
    box-sizing: border-box;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-points-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-points-label {
    font-family: 'SourceHanSansCN', sans-serif;
    font-size: 24px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.2;

}

.user-points-value {
    font-family: 'SourceHanSansCN', sans-serif;
    font-size: 20px;
    font-weight: 500;
    color: #FFFFFF;
    line-height: 1.2;
    display: flex;
    align-items: center;
    /*justify-content: space-between;*/
}
.user-points-value i{
    margin-left: 15px;
}

.points-merchant-header-title {
    font-size: 65px;
    line-height: 105px;
    font-weight: 400;
    font-family: 'YEFONTAoYeHei', sans-serif;
    text-shadow: none;
    margin: 0;
}

.points-merchant-header-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 60px;
    opacity: 1;
    box-sizing: border-box;
    border-radius: 30px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    position: absolute;
    top: calc(100% - 30px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.points-merchant-header-nav .points-merchant-header-nav-item {
    width: 120px;
    height: 44px;
    opacity: 1;
    border-radius: 22px;
    padding: 10px;
    box-sizing: border-box;
    font-family: 'SourceHanSansCN', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 1px;
    text-align: center;
    vertical-align: middle;
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.points-merchant-header-nav .points-merchant-header-nav-item.active_has_nav {
    background: #FFFFFF;
    color: #E21C34;
}

.points-merchant-header-nav .points-merchant-header-nav-item:hover {
    background: #FFFFFF;
    color: #E21C34;
}

.points-merchant-header-nav .points-merchant-header-nav-item img {
    width: 24px;
    height: 24px;
}

/*卡片广告区域*/
.card-ad-section {
    width: 100%;
    max-width: 1400px;
    box-sizing: border-box;
    padding: 0 clamp(16px, 2.5vw, 24px);
    /*width: var(--layout-page-width);*/
    margin: 24px auto 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    justify-content: center;
    justify-items: center;
}

.card-ad-section .card-ad {
    width: 100%;
    aspect-ratio: 690/285;
    background: url('/static/images/points_merchant/hot_card_ad_1.png') no-repeat center / cover;
}

/* 热门推荐区域 */
.hot-recommendations {
    margin: 24px auto;
    width: 100%;
    max-width: 1400px;
    box-sizing: border-box;
    padding: 0 clamp(16px, 2.5vw, 24px);
    /*width: var(--layout-page-width);*/
    height: 318px;
    display: flex;
    /*background: url('/static/images/points_merchant/hot-recommendations_bg.png')*/
    /*no-repeat center / cover;*/
    position: relative;
    z-index: 1;
}

.hot-recommendations .hot-recommendations_bg {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.hot-recommendations::after {
    content: '';
    height: 276px;
    position: absolute;
    aspect-ratio: 264/276;
    background: url('/static/images/points_merchant/decorative_pendant.png') no-repeat center / cover;
    top: 0;
    right: -115px;
    z-index: 0;
}


.hot-recommendations-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
    box-sizing: border-box;
    flex: 1;
    text-align: center;
    margin-top: 60px;
    right: 0;
    z-index: 1;
    /*transform: translate(24%, 0%);*/
}

.hot-recommendations-title {
    font-family: 'SourceHanSansCN', sans-serif;
    font-size: 30px;
    font-weight: 500;
    color: #FFFFFF;
}

.hot-recommendations-divider {
    width: 87px;
    height: 8px;
    background: #FFFFFF;
    border-radius: 4px;
}

.hot-recommendations-items {
    display: flex;
    justify-content: flex-end;
    gap: 24px;
    position: relative;
    z-index: 1;
    aspect-ratio: 264/276;
}

.recommendation-item {
    width: 214px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.recommendation-image {
    width: 214px;
    height: 214px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 8px;
}

.recommendation-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recommendation-title {
    font-family: 'SourceHanSansCN', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #333;
    line-height: 22.4px;
    margin-bottom: 4px;
    text-align: center;
}

.recommendation-points {
    font-family: 'SourceHanSansCN', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #E25A5A;
    line-height: 19.6px;
}

/* 商品分类区域 */
.products-section {
    width: 100%;
    max-width: 100%;
    margin: 48px auto 24px;
    min-height: 600px;
    box-sizing: border-box;
    padding: 0 clamp(16px, 2.5vw, 24px);
}

.products-header {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.products-title-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.products-title {
    font-family: 'YEFONTAoYeHei', sans-serif;
    font-size: 34px;
    font-weight: 400;
    color: #333;
    line-height: 47.6px;
    position: relative;
}

.products-title::after {
    position: absolute;
    content: '';
    background: url('/static/images/points_merchant/products-title_model_left.png');
    width: 30px;
    height: 20px;
    left: 0;
    top: 50%;
    transform: translate(-130%, -50%);
}

.products-title::before {
    position: absolute;
    content: '';
    background: url('/static/images/points_merchant/products-title_model_right.png');
    width: 30px;
    height: 20px;
    right: 0;
    top: 50%;
    transform: translate(130%, -50%);
}

.products-categories {
    display: flex;
    /*gap: 21px;*/
    margin: 12px 0;
}

.category-btn {
    width: 259px;
    min-width: 259px;
    padding: 10px 20px;
    box-sizing: border-box;
    border-radius: 37px;
    font-family: 'SourceHanSansCN', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #333;
    background: #FFFFFF;
    border: none;
    cursor: pointer;
}

.category-btn.active,
.category-btn:hover {
    background: #E21C34;
    color: #fff;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 332px);
    gap: 24px;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.product-card:first-child {
    position: relative;
    z-index: 1;
}

.products-grid::after {
    position: absolute;
    top: 0;
    left: 0;
    transform: translate(-50%, 00%);
    content: '';
    background: url('/static/images/points_merchant/decorative_pendant.png');
    height: 276px;
    aspect-ratio: 264/276;
}

.product-card {
    width: 332px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: none;
    background: #FFFFFF;
    cursor: pointer;
    /* 添加指针样式表示可点击 */
    transition: transform 0.2s ease;
    /* 添加过渡效果 */
}

.product-card:hover {
    transform: translateY(-5px);
    /* 悬停时上移 */
}

.product-image {
    position: relative;
    width: 100%;
    height: 214px;
    aspect-ratio: 332/214;
    overflow: hidden;
    text-align: center;
    background: #F7F8FA;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 184px;
    height: 184px;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-info {
    padding: 24px;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    border-radius: 0 0 8px 8px;
}


.product-name {
    width: 100%;
}

.product-info .product-name span {
    display: -webkit-box;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
    font-family: 'SourceHanSansCN', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #333333;
    line-height: 24px;
    min-height: 24px;
    text-align: center;
}

.product-type {
    position: absolute;
    left: 16px;
    bottom: 16px;
    max-width: calc(100% - 32px);
    width: 68px;
    height: 28px;
    padding: 0 10px;
    border-radius: 43px;
    background: #E1E1E1;
    color: #FFFFFF;
    font-family: 'SourceHanSansCN', sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 28px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 3px;
    font-family: 'DIN', 'Arial', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #E25A5A;
    line-height: normal;
}

.product-price-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.exchange-btn {
    width: 100%;
    padding: 12px;
    background: #E21C34;
    border-radius: 4px;
    font-family: 'SourceHanSansCN', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

.exchange-btn:hover {
    background: #c01528;
}

/* ------------------------------------------------------------------
 * 低分辨率适配：最低参考视口 1366×768（含常见笔记本整页无横向滚动）
 * ------------------------------------------------------------------ */

@media screen and (max-width: 1400px) {
    .card-ad-section{
        width: 1200px;
    }
    .points-merchant-header {
        height: 220px;
    }

    .points-merchant-header-title {
        font-size: clamp(32px, 5vw, 48px);
        line-height: 1.15;
    }

    .user-avatar {
        width: 96px;
        height: 96px;
    }

    .user-points-label {
        font-size: 18px;
    }

    .user-points-value {
        font-size: 16px;
    }

    .user-points-value i {
        margin-left: 8px;
    }

    .points-merchant-header-nav {
        height: 52px;
        padding: 6px;
        gap: 10px;
        top: calc(100% - 26px);
    }

    .points-merchant-header-nav .points-merchant-header-nav-item {
        width: auto;
        min-width: 96px;
        padding: 8px 14px;
        font-size: 14px;
    }

    .points-merchant-header-nav .points-merchant-header-nav-item img {
        width: 20px;
        height: 20px;
    }

    .products-section {
        margin-top: 32px;
        margin-bottom: 16px;
        min-height: 420px;
    }

    .products-title {
        font-size: 28px;
        line-height: 1.25;
    }

    .category-btn {
        width: auto;
        min-width: 112px;
        padding: 8px 16px;
        font-size: 14px;
    }

    .products-grid {
        gap: 16px;
        grid-template-columns: repeat(auto-fill, minmax(280px, 332px));
    }

    .product-info {
        padding: 16px;
        gap: 10px;
    }

    .product-price {
        font-size: 18px;
    }
}

@media screen and (max-height: 800px) {
    .points-merchant-header {
        height: 200px;
    }

    .points-merchant-header-title {
        font-size: clamp(28px, 4.2vw, 42px);
        line-height: 1.1;
    }

    .user-avatar {
        width: 88px;
        height: 88px;
    }

    .points-merchant-header-nav {
        top: calc(100% - 22px);
        height: 48px;
    }

    .products-section {
        margin-top: 24px;
        min-height: 360px;
    }
}

@media screen and (max-width: 1439px) and (max-height: 800px) {
    .products-section{
        width: 1400px;
    }
    .points-merchant-header-content{
        max-width: 1200px;
    }
    .points-merchant-header {
        height: 180px;
    }

    .user-points-label {
        font-size: 16px;
    }

    .user-points-value {
        font-size: 14px;
    }
    .products-grid {
        /*display: grid;*/
        /*grid-template-columns: repeat(4, 332px);*/
    }
}