/* ========== 优惠券专属样式 ========== */
:root {
    --primary: #ff6b3e;
    --primary-dark: #e55a2e;
    --primary-light: #fff0eb;
    --card-white: #ffffff;
    --text-dark: #0f172a;
    --text-gray: #475569;
    --text-muted: #94a3b8;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 30px -12px rgba(0, 0, 0, 0.12);
}

.coupon-section {
    background: #f8fafc;
    padding: 20px 0 60px;
}
.container {
    margin: 0 auto;
    padding: 0 20px;
}

/* 快速分类 */
.quick-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 25px;
    justify-content: center;
}
.quick-cats .cat-item {
    background: white;
    padding: 5px 16px;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}
.quick-cats .cat-item:hover,
.quick-cats .cat-item.active {
    background: var(--primary);
    color: white;
}

/* 搜索框 */
.coupon-search {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}
.search-box {
    display: flex;
    background: #f1f5f9;
    border-radius: 48px;
    padding: 4px 4px 4px 18px;
    align-items: center;
    border: 1px solid #e2e8f0;
    width: 280px;
}
.search-box input {
    border: none;
    background: transparent;
    padding: 8px 8px;
    flex: 1;
    outline: none;
    font-size: 0.85rem;
}
.search-box button {
    background: var(--primary);
    border: none;
    color: white;
    padding: 6px 16px;
    border-radius: 40px;
    font-weight: 500;
    cursor: pointer;
}
.search-box button:hover {
    background: var(--primary-dark);
}

/* 头部区域 */
.coupon-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 30px;
}
.coupon-header h3 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #1e293b, #2d3a4e);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    margin: 0;
}
.countdown-box {
    background: #1e1e2a;
    padding: 6px 20px;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    gap: 12px;
    align-items: center;
}
.countdown-box i {
    color: #ffb347;
}
.timer {
    background: #00000040;
    padding: 4px 12px;
    border-radius: 40px;
    letter-spacing: 1px;
}

/* 商品网格 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

/* 商品卡片 */
.product-card {
    background: var(--card-white);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-sm);
    position: relative;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}
.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #ff4d4f;
    color: white;
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    z-index: 2;
}
.product-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: #f3f4f6;
    transition: transform 0.3s;
}
.product-card:hover .product-img {
    transform: scale(1.02);
}
.product-info {
    padding: 16px 16px 20px;
}
.product-title {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--text-dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 48px;
    margin-bottom: 8px;
}
.shop-info {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    margin: 8px 0 4px;
}
.coupon-price {
    background: #fff0eb;
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 30px;
    display: inline-block;
}
.current-price {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--primary);
}
.current-price small {
    font-size: 0.8rem;
    font-weight: 500;
}
.old-price {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-left: 6px;
}
.sold {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 6px;
}
.coupon-tag {
    background: #fef3e8;
    border-left: 3px solid var(--primary);
    padding: 6px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    margin: 12px 0;
    display: flex;
    justify-content: space-between;
}
.btn-coupon {
    background: var(--primary);
    border: none;
    color: white;
    font-weight: 600;
    padding: 8px 0;
    width: 100%;
    border-radius: 44px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-coupon:hover {
    background: var(--primary-dark);
    transform: scale(0.98);
}

/* Toast 提示 */
.toast-message {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    background: #1e293b;
    color: white;
    padding: 12px 24px;
    border-radius: 60px;
    font-weight: 500;
    font-size: 0.9rem;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
    backdrop-filter: blur(8px);
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    gap: 10px;
}
.toast-message.show {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

/* 响应式 */
@media (max-width: 768px) {
    .product-grid {
        gap: 14px;
    }
    .coupon-header h3 {
        font-size: 1.3rem;
    }
    .current-price {
        font-size: 1.25rem;
    }
    .search-box {
        width: 100%;
    }
    .coupon-search {
        justify-content: stretch;
    }
}
@media (max-width: 480px) {
    .product-grid {
        gap: 12px;
    }
    .product-info {
        padding: 12px;
    }
}