/* ==================== 全局样式 ==================== */
body {
    padding: 0;
    background-color: #f8f8f8;
}

/* ==================== 主容器 ==================== */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 0 !important;
}

/* ==================== 顶部区域 ==================== */
.header-section {
    padding: 12px;
}

/* ==================== Banner 样式 ==================== */
.banner-area {
    background: linear-gradient(90deg, #FAE6DA, #FDF4ED);
    border-radius: 14px;
    padding: 0px 16px;
    color: #783611;
    font-weight: 600;
    margin-bottom: 8px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: 60px;
    border-top: 2px solid #fff;
}

    .banner-area::after {
        content: '';
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 120px;
        height: 100px;
        background-image: url('static/images/pages/index/shandian.png');
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center right;
        opacity: 0.15;
        pointer-events: none;
    }

.banner-title {
    font-size: 18px;
    font-weight: 600;
    color: #783611;
    position: relative;
    z-index: 1;
}

.banner-icon-left {
    width: 40px;
    height: 40px;
    margin-right: 12px;
    object-fit: contain;
    position: relative;
    z-index: 1;
}

/* ==================== 导航栏 ==================== */
.nav-container {
    display: flex;
    gap: 18px;
}

.nav-button {
    background: #fff;
    color: #000;
    padding: 8px;
    border-radius: 10px;
    font-size: 14px;
    font-family: system-ui;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}


/* ==================== 优惠券区域 ==================== */
.coupon-section {
    padding: 0 12px;
    margin-bottom: 12px;
}

.coupon-container {
    display: flex;
    align-items: center;
    gap: 0;
    width: 100%;
    min-width: 0;
}

/* 左边：新人好礼 */
.coupon-gift {
    background: linear-gradient(180deg, #FC733E 0%, #F93C51 100%);
    border-radius: 8px 0 0 8px;
    padding: 8px 10px;
    padding-right: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 100%;
    flex-shrink: 0;
    z-index: 0;
}

.gift-text {
    color: #fff;
    font-weight: 600;
    line-height: 1.2;
    font-size: 11px;
    text-align: center;
}

/* 中间和右边的背景容器 */
.coupon-content-wrapper {
    display: flex;
    align-items: center;
    flex: 1;
    background: linear-gradient(180deg, #FEF1EE 0%, #FFFFFF 100%);
    border-radius: 12px 0 0 12px;
    padding: 8px;
    padding-left: 12px;
    margin-left: -8px;
    gap: 0;
    overflow: hidden;
    min-width: 0;
    position: relative;
    z-index: 1;
}

/* 中间：优惠券列表 */
.coupon-list {
    display: flex;
    gap: 6px;
    flex: 1;
    min-width: 0;
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox 隐藏滚动条 */
    height: 100%;
    align-items: center;
}

    .coupon-list::-webkit-scrollbar {
        display: none; /* Chrome/Safari 隐藏滚动条 */
    }


.coupon-item {
    background: linear-gradient(180deg, #FC733E 0%, #F93C51 100%);
    border-radius: 8px;
    padding: 8px 8px;
    min-width: 60px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.coupon-text-top {
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
}

.coupon-text-bottom {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

/* 右边：领取按钮 */
.coupon-claim-btn {
    background: #FA2C38;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    min-width: 60px;
    margin-left: 6px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(250, 44, 56, 0.3);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

    .coupon-claim-btn:hover {
        background: #e02530;
        box-shadow: 0 4px 12px rgba(250, 44, 56, 0.4);
    }

    .coupon-claim-btn:active {
        transform: scale(0.95);
        box-shadow: 0 1px 4px rgba(250, 44, 56, 0.4);
    }

    .coupon-claim-btn:disabled {
        background: #ccc;
        cursor: not-allowed;
        box-shadow: none;
        opacity: 0.6;
    }

        .coupon-claim-btn:disabled:hover {
            background: #ccc;
            transform: none;
            box-shadow: none;
        }


.coupon-btn-text-top {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.coupon-btn-text-bottom {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

/* ==================== 模态框按钮样式 ==================== */
.coupon-modal-taobao:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(252, 132, 30, 0.4);
}

.coupon-modal-taobao:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(252, 132, 30, 0.3);
}

/* ==================== 加载指示器 ==================== */
.loading-indicator {
    text-align: center;
    padding: 20px 0;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.loading-icon {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

    .loading-icon .dot {
        width: 4px;
        height: 4px;
        background: #999;
        border-radius: 50%;
        display: inline-block;
        animation: bounce 1.4s infinite ease-in-out;
    }

        .loading-icon .dot:nth-child(1) {
            animation-delay: -0.32s;
        }

        .loading-icon .dot:nth-child(2) {
            animation-delay: -0.16s;
        }

        .loading-icon .dot:nth-child(3) {
            animation-delay: 0s;
        }

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.loading-text {
    font-size: 14px;
    color: #999;
    font-weight: 400;
}


/* ==================== 分类区域 ==================== */
.category-section {
    /* background: #fdfdfd; */
    padding: 0 10px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    border-top: 2px solid #fff;
    padding-bottom: 18px;
}

.category-tabs {
    display: flex;
    padding: 12px 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    gap: 10px;
}

    /* 隐藏滚动条（可选） */
    .category-tabs::-webkit-scrollbar {
        height: 4px;
    }

    .category-tabs::-webkit-scrollbar-track {
        background: transparent;
    }

    .category-tabs::-webkit-scrollbar-thumb {
        background: #ddd;
        border-radius: 2px;
    }

.category-tab {
    color: #000;
    font-size: 16px;
    flex-shrink: 0;
    white-space: nowrap;
    padding: 0 8px;
    text-align: center;
    cursor: pointer;
    transition: color 0.3s ease;
    background: #fff;
    padding: 5px 12px;
    border-radius: 8px;
}

    .category-tab.active {
        color: #EA516E;
        font-weight: bold;
    }

/* ==================== 产品列表容器 ==================== */
.product-list {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ==================== 产品区域 ==================== */
.product-item {
    display: flex;
    background: #fff;
    border-radius: 19px;
    padding: 8px;
    margin-bottom: 10px;
    position: relative;
}

.product-image-wrapper {
    padding-right: 8px;
    flex-shrink: 0;
}

.product-image {
    width: 120px;
    height: 120px;
    border-radius: 19px;
}

.product-info {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* ==================== 产品标题 ==================== */
.product-title {
    font-size: 14px;
    color: #000;
    line-height: 23px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    text-align: left;
}

.product-badge {
    background: #F95050;
    color: #fff;
    border-radius: 5px;
    font-size: 11px;
    padding: 2px 5px;
    margin-right: 4px;
}

/* ==================== 奖励区域 ==================== */
.reward-section {
    display: flex;
    margin-top: 18px;
    gap: 5px;
    flex-wrap: wrap;
}

@media (max-width: 500px) {
    .reward-section {
        margin-top: 6px;
    }
}

.reward-badge {
    background: linear-gradient(112deg, #E00498, #FF5B30);
    color: #fff;
    font-size: 13px;
    padding: 3px 5px;
    border-radius: 3px;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

/* ==================== 价格区域 ==================== */
.price-section {
    display: flex;
    margin-top: auto;
    align-items: flex-end;
    width: 100%;
}

.price-info {
    /* 容器 */
}

.price-current {
    color: #FA311E;
    font-weight: 500;
    font-size: 19px;
}

.price-original {
    color: #bbb6b6;
    text-decoration: line-through;
    font-weight: 500;
    font-size: 12px;
    margin-left: 5px;
}

/* ==================== 购买按钮 ==================== */
.buy-button-wrapper {
    margin-left: auto;
}

.buy-button {
    background: linear-gradient(45deg, #FE3976, #FE4B41);
    color: #fff;
    font-size: 15px;
    font-weight: 900;
    padding: 3px 14px;
    border-top-left-radius: 19px;
    border-bottom-right-radius: 19px;
    border: none;
    cursor: pointer;
}

    .buy-button.no_sell {
        border-top-left-radius: 19px;
        border-bottom-right-radius: 19px;
        background: #7E7D7D;
        font-weight: 500;
        padding: 6px 14px;
    }



/* 优惠券内容区域 */
.coupon-content {
    display: flex;
    position: relative;
}

/* 左侧价格区域 */
.coupon-left {
    background: linear-gradient(135deg, #FA8052 0%, #F34750 100%);
    color: white;
    padding: 4px 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    position: relative;
    font-size: 12px;
    letter-spacing: 1px;
    white-space: nowrap;
}



/* 优惠券主体样式 */
.coupon {
    position: relative;
    background: white;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: inline-block;
}



    /* 左右两边凹入的圆形效果 */
    .coupon::before,
    .coupon::after {
        content: '';
        position: absolute;
        width: 12px;
        height: 12px;
        background: #fff;
        border-radius: 50%;
        top: 50%;
        transform: translateY(-50%);
        z-index: 2;
    }

    .coupon::before {
        left: -6px;
    }

    .coupon::after {
        right: -6px;
    }



/* ==================== 产品库存标签 ==================== */
.product-stock-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 10px;
    z-index: 10;
    text-align: center;
    font-weight: 500;
    line-height: 1.3;
}

.product-stock-badge .stock-label {
    font-size: 10px;
    opacity: 0.9;
}

.product-stock-badge .stock-number {
    font-size: 12px;
    font-weight: 600;
    margin-top: 2px;
}
