﻿body {
    font-family: 'Segoe UI', sans-serif;
}

.welcome-bar {
    text-align: center;
    padding: 25px;
    background: linear-gradient(to right, #4facfe, #00f2fe);
    color: white;
    font-size: 1.5em;
    font-weight: 600;
    border-radius: 10px;
    margin-bottom: 30px;
}

.toolbar-section {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}

.sort-dropdown,
.category-dropdown {
    padding: 10px 15px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #ccc;
    min-width: 180px;
}

.section {
    margin-bottom: 40px;
    padding: 0 20px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    border-left: 5px solid #00b894;
    padding-left: 10px;
}

.sub-heading {
    font-size: 20px;
    color: #444;
    margin: 25px 0 15px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 15px;
    text-align: center;
    position: relative;
    transition: transform 0.2s;
}

    .product-card:hover {
        transform: translateY(-5px);
    }

    .product-card img {
        max-height: 160px;
        object-fit: contain;
        width: 100%;
        margin-bottom: 10px;
    }

    .product-card h3 {
        font-size: 16px;
        margin: 8px 0;
        color: #333;
        min-height: 42px;
    }

.price, .regular-price {
    font-weight: bold;
    color: #2d3436;
    margin-bottom: 8px;
}

.old-price {
    text-decoration: line-through;
    color: #888;
    margin-right: 5px;
}

.new-price {
    color: #d63031;
    font-weight: bold;
}

.btn {
    background: #00cec9;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    margin-top: 5px;
    font-weight: 500;
    transition: background 0.3s;
}

    .btn:hover {
        background: #00b894;
    }

.top-seller .badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #e17055;
    color: white;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
}

.old-price {
    text-decoration: line-through;
    color: #888;
    margin-right: 5px;
}

.new-price {
    color: #d9534f;
    font-weight: bold;
}

.regular-price {
    color: #333;
}

.price {
    margin: 10px 0;
}

.product-rating {
    display: flex;
    justify-content: center; /* 水平居中 */
    align-items: center;
    margin: 8px auto; /* 垂直间距 + 自动居中 */
    font-size: 14px;
    color: #FFA500; /* 星星颜色 */
    text-align: center;
}


    .product-rating .stars {
        display: inline-flex;
        margin-right: 5px;
    }

        .product-rating .stars i {
            color: #FFA500;
            margin-right: 2px;
            font-size: 16px;
        }

    .product-rating .review-count {
        color: #555;
        font-size: 13px;
        margin-left: 4px;
    }
/* Product Listing Section */
.section {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.section-title {
    color: #2c3e50;
    font-size: 28px;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f2f5;
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid #eaeaea;
    display: flex;
    flex-direction: column;
    height: 100%;
}

    .product-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    }

    .product-card img {
        width: 100%;
        height: 200px;
        object-fit: cover;
        border-bottom: 1px solid #f5f5f5;
    }

    .product-card h3 {
        color: #34495e;
        font-size: 18px;
        margin: 15px 15px 8px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

.product-rating {
    display: flex;
    align-items: center;
    margin: 0 15px 12px;
    gap: 5px;
}

    .product-rating .star {
        color: #FFD700;
        font-size: 16px;
    }

.review-count {
    color: #7f8c8d;
    font-size: 13px;
}

.price {
    margin: 0 15px 15px;
    font-weight: 600;
    font-size: 18px;
}

.old-price {
    text-decoration: line-through;
    color: #95a5a6;
    font-size: 15px;
    margin-right: 8px;
}

.new-price {
    color: #e74c3c;
}

.regular-price {
    color: #27ae60;
}

.btn {
    display: inline-block;
    background: #3498db;
    color: white;
    text-align: center;
    padding: 10px 0;
    margin: 0 15px 15px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s;
}

    .btn:hover {
        background: #2980b9;
    }

/* Pagination Styles */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
    grid-column: 1 / -1;
}

.page-link {
    padding: 8px 20px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

    .page-link:hover {
        background: #3498db;
        color: white;
        border-color: #3498db;
    }

.page-label {
    color: #7f8c8d;
    font-size: 14px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }

    .section-title {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .pagination-controls {
        flex-direction: column;
        gap: 10px;
    }
}
.product-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    /* 现在1200px容器可以放5个（240x5=1200）*/
}