/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; color: #1a1a1a; background: #fafafa; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button, select { font-family: inherit; }

/* === Layout === */
.container { max-width: 1280px; margin: 0 auto; padding: 0 1.25rem; }

/* === Header === */
.site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 100; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { font-size: 1.25rem; font-weight: 700; color: #1a1a1a; letter-spacing: -0.02em; }
.logo span { font-weight: 400; color: #999; }
.main-nav { display: flex; gap: 1.5rem; }
.main-nav a { font-size: 0.875rem; font-weight: 500; color: #555; transition: color 0.15s; }
.main-nav a:hover { color: #1a1a1a; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: #1a1a1a; margin: 4px 0; transition: 0.2s; }

/* === Page Header === */
.page-header { padding: 2.5rem 0 1rem; }
.page-header h1 { font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; color: #1a1a1a; }
.result-count { font-size: 0.875rem; color: #888; margin-top: 0.25rem; }

/* === Toolbar === */
.toolbar { padding-bottom: 1rem; border-bottom: 1px solid #eee; margin-bottom: 1.5rem; }
.toolbar-filters { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.75rem; }
.filter-group { display: flex; align-items: center; gap: 0.5rem; }
.filter-group label { font-size: 0.8125rem; font-weight: 500; color: #666; }
.filter-group select {
    font-size: 0.8125rem; padding: 0.4rem 2rem 0.4rem 0.75rem;
    border: 1px solid #ddd; border-radius: 6px; background: #fff;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' stroke='%23666' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 0.6rem center;
    cursor: pointer;
}
.filter-group select:focus { outline: none; border-color: #1a1a1a; }

/* === Quick Filter Chips === */
.quick-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
    font-size: 0.8125rem; font-weight: 500; padding: 0.35rem 0.85rem;
    border: 1px solid #ddd; border-radius: 100px; color: #555;
    background: #fff; transition: all 0.15s; white-space: nowrap;
}
.chip:hover { border-color: #1a1a1a; color: #1a1a1a; }
.chip.active { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }

/* === Product Grid === */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    padding-bottom: 3rem;
}

/* === Product Card === */
.product-card { position: relative; }
.product-link {
    display: block; background: #fff; border-radius: 10px;
    overflow: hidden; transition: box-shadow 0.2s, transform 0.2s;
}
.product-link:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08); transform: translateY(-2px); }

.badge-discount {
    position: absolute; top: 0.75rem; left: 0.75rem; z-index: 2;
    font-size: 0.75rem; font-weight: 600; color: #fff;
    background: #e53e3e; padding: 0.2rem 0.5rem; border-radius: 4px;
}

.product-image {
    aspect-ratio: 3/4; background: #f5f5f5; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.product-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.product-link:hover .product-image img { transform: scale(1.03); }
.no-image { color: #ccc; font-size: 0.875rem; }

.product-info { padding: 0.75rem; }
.product-brand { font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: #999; }
.product-name { font-size: 0.8125rem; font-weight: 500; color: #333; margin-top: 0.15rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { margin-top: 0.35rem; display: flex; align-items: baseline; gap: 0.4rem; }
.price-current { font-size: 0.9375rem; font-weight: 700; color: #1a1a1a; }
.price-original { font-size: 0.8125rem; color: #999; text-decoration: line-through; }
.product-cta {
    display: inline-block; margin-top: 0.5rem;
    font-size: 0.75rem; font-weight: 600; color: #1a1a1a;
    padding: 0.35rem 0.75rem; border: 1px solid #1a1a1a; border-radius: 6px;
    transition: all 0.15s;
}
.product-link:hover .product-cta { background: #1a1a1a; color: #fff; }


/* === Empty State === */
.empty-state { text-align: center; padding: 3rem 1rem; }
.empty-state h1 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.empty-state p { color: #666; margin-bottom: 1.5rem; }
.btn {
    display: inline-block; padding: 0.6rem 1.5rem;
    background: #1a1a1a; color: #fff; border-radius: 8px;
    font-size: 0.875rem; font-weight: 600; transition: background 0.15s;
}
.btn:hover { background: #333; }

/* === Category Links === */
.category-links { padding: 2rem 0 3rem; }
.category-links h2 { font-size: 1.125rem; font-weight: 600; margin-bottom: 1rem; }
.link-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.explore-link {
    font-size: 0.8125rem; font-weight: 500; padding: 0.5rem 1rem;
    background: #fff; border: 1px solid #eee; border-radius: 8px;
    transition: all 0.15s;
}
.explore-link:hover { border-color: #1a1a1a; }

/* === Footer === */
.site-footer { background: #1a1a1a; color: #ccc; padding: 3rem 0 1.5rem; margin-top: 2rem; }
.footer-content { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
.footer-brand p { font-size: 0.8125rem; margin-top: 0.5rem; line-height: 1.6; color: #999; }
.footer-brand .logo { color: #fff; }
.footer-brand .logo span { color: #666; }
.footer-links h4 { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: #fff; margin-bottom: 0.75rem; }
.footer-links a { display: block; font-size: 0.8125rem; color: #999; padding: 0.2rem 0; transition: color 0.15s; }
.footer-links a:hover { color: #fff; }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid #333; }
.footer-bottom p { font-size: 0.75rem; color: #666; }

/* === Responsive === */
@media (max-width: 1024px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
    .footer-content { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .page-header h1 { font-size: 1.5rem; }
    .main-nav { display: none; }
    .main-nav.open { display: flex; flex-direction: column; position: absolute; top: 60px; left: 0; right: 0; background: #fff; padding: 1rem 1.25rem; border-bottom: 1px solid #eee; box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
    .nav-toggle { display: block; }
    .footer-content { grid-template-columns: 1fr; gap: 1.5rem; }
    .quick-filters { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; padding-bottom: 0.25rem; }
    .product-info { padding: 0.5rem; }
    .product-name { font-size: 0.75rem; }
    .price-current { font-size: 0.8125rem; }
    .product-cta { font-size: 0.6875rem; padding: 0.25rem 0.6rem; }
}

@media (max-width: 480px) {
    .product-grid { gap: 0.5rem; }
    .product-image { aspect-ratio: 2/3; }
    .chip { font-size: 0.75rem; padding: 0.3rem 0.65rem; }
}
