* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f0f2f5;
    color: #1a1a2e;
    min-height: 100vh;
}

header {
    background: linear-gradient(135deg, #009ffd, #2a2a72);
    color: white;
    padding: 24px 20px;
    text-align: center;
}

header h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.subtitle {
    margin-top: 6px;
    font-size: 14px;
    opacity: 0.85;
}

/* Stats bar */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 32px;
    padding: 16px 20px;
    background: white;
    border-bottom: 1px solid #e0e0e0;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: #2a2a72;
}

.stat-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Filters */
.filters {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.filters select,
.filters input {
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    min-width: 160px;
    cursor: pointer;
}

.filters select:focus,
.filters input:focus {
    outline: none;
    border-color: #009ffd;
    box-shadow: 0 0 0 3px rgba(0, 159, 253, 0.15);
}

/* Products grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    padding: 0 20px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #888;
    font-size: 16px;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

/* Product card */
.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.product-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: #f5f5f5;
}

.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    color: white;
}

.discount-badge.high {
    background: #00c853;
}

.discount-badge.medium {
    background: #ff9800;
}

.discount-badge.low {
    background: #ff5722;
}

.product-info {
    padding: 14px;
}

.product-name {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

.product-store {
    font-size: 12px;
    color: #888;
    margin-bottom: 4px;
}

.product-category {
    font-size: 11px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.product-prices {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-original {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}

.price-sale {
    font-size: 18px;
    font-weight: 700;
    color: #e53935;
}

.price-currency {
    font-size: 12px;
    font-weight: 400;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.pagination button {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.pagination button:hover:not(:disabled) {
    background: #009ffd;
    color: white;
    border-color: #009ffd;
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination button.active {
    background: #2a2a72;
    color: white;
    border-color: #2a2a72;
}

.pagination .page-info {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #666;
    padding: 0 8px;
}

/* Mobile */
@media (max-width: 600px) {
    .stats-bar {
        gap: 16px;
    }
    .filters {
        flex-direction: column;
    }
    .filters select,
    .filters input {
        width: 100%;
    }
    .products-grid {
        grid-template-columns: 1fr;
    }
}
