/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px 0;
    text-align: center;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.logo-icon {
    font-size: 48px;
}

.logo h1 {
    font-size: 36px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.slogan {
    color: #666;
    font-size: 16px;
}

/* Search Section */
.search-section {
    padding: 30px 0;
}

.search-box {
    display: flex;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto 20px;
}

.search-input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.search-btn {
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s;
}

.search-btn:hover {
    transform: scale(1.05);
}

.filter-box {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.filter-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid transparent;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
    background: white;
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
}

/* Products Section */
.products-section {
    padding: 20px 0 60px;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 15px;
}

.section-title {
    font-size: 24px;
    color: #333;
}

.product-count {
    color: #666;
    font-size: 14px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* Product Card */
.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

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

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 15px;
}

.current-price {
    font-size: 24px;
    font-weight: 700;
    color: #e74c3c;
}

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

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #666;
}

.sales-count {
    background: #fff3cd;
    color: #856404;
    padding: 3px 8px;
    border-radius: 10px;
}

.buy-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    margin-top: 15px;
    transition: transform 0.2s;
}

.buy-btn:hover {
    transform: scale(1.02);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 20px;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 32px;
    cursor: pointer;
    color: #999;
}

.modal-close:hover {
    color: #333;
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.2);
    color: white;
    text-align: center;
    padding: 30px 0;
}

.footer p {
    margin: 5px 0;
}

.icp a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    font-size: 13px;
    transition: opacity 0.3s;
}

.icp a:hover {
    opacity: 1;
    text-decoration: underline;
}

.disclaimer {
    font-size: 12px;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    .logo h1 {
        font-size: 28px;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .products-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading {
    text-align: center;
    padding: 50px;
    font-size: 18px;
    color: white;
    animation: pulse 1.5s infinite;
}

/* No Products */
.no-products {
    text-align: center;
    padding: 50px;
    background: white;
    border-radius: 15px;
    grid-column: 1 / -1;
}

.no-products-icon {
    font-size: 64px;
    margin-bottom: 20px;
}
