* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f5f5f5; color: #333; line-height: 1.5; }
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { background: #1a1a2e; color: #fff; padding: 16px 0; position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.logo { color: #fff; font-size: 22px; font-weight: 700; letter-spacing: -0.5px; }
.logo:hover { text-decoration: none; color: #60a5fa; }
.main-nav { display: flex; gap: 16px; }
.main-nav a { color: #cbd5e1; font-size: 14px; }
.main-nav a:hover { color: #fff; text-decoration: none; }
.search-form { margin-left: auto; display: flex; }
.search-form input { padding: 8px 14px; border: none; border-radius: 6px 0 0 6px; font-size: 14px; width: 260px; outline: none; }
.search-form button { padding: 8px 16px; background: #2563eb; color: #fff; border: none; border-radius: 0 6px 6px 0; cursor: pointer; font-size: 14px; }
.search-form button:hover { background: #1d4ed8; }

/* Footer */
.site-footer { background: #1a1a2e; color: #94a3b8; padding: 20px 0; margin-top: 40px; text-align: center; font-size: 13px; }

/* Breadcrumbs */
.breadcrumbs { padding: 16px 0; font-size: 13px; color: #64748b; }
.breadcrumbs a { color: #2563eb; }

/* Category Grid */
.section-title { font-size: 24px; font-weight: 700; margin: 30px 0 20px; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin-bottom: 30px; }
.cat-card { background: #fff; border-radius: 12px; padding: 24px; text-align: center; transition: box-shadow 0.2s, transform 0.2s; border: 1px solid #e2e8f0; }
.cat-card:hover { box-shadow: 0 8px 25px rgba(0,0,0,0.1); transform: translateY(-2px); text-decoration: none; }
.cat-card h3 { font-size: 17px; margin-bottom: 8px; color: #1e293b; }
.cat-card .count { color: #64748b; font-size: 13px; }
.cat-card .price-range { color: #2563eb; font-size: 13px; margin-top: 4px; }

/* Product Grid */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.product-card { background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid #e2e8f0; transition: box-shadow 0.2s, transform 0.2s; display: flex; flex-direction: column; }
.product-card:hover { box-shadow: 0 8px 25px rgba(0,0,0,0.1); transform: translateY(-2px); text-decoration: none; }
.product-card .card-img { aspect-ratio: 1; background: #f8fafc; display: flex; align-items: center; justify-content: center; padding: 16px; }
.product-card .card-img img { max-height: 200px; object-fit: contain; }
.product-card .card-body { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.product-card .card-brand { font-size: 11px; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.product-card .card-title { font-size: 14px; font-weight: 600; color: #1e293b; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card .card-specs { font-size: 12px; color: #94a3b8; margin-bottom: 8px; }
.product-card .card-specs span { display: inline-block; background: #f1f5f9; padding: 2px 6px; border-radius: 4px; margin: 2px 2px 2px 0; }
.product-card .card-price { margin-top: auto; }
.card-price .price { font-size: 18px; font-weight: 700; color: #dc2626; }
.card-price .old-price { font-size: 13px; color: #94a3b8; text-decoration: line-through; margin-left: 6px; }
.card-price .discount { display: inline-block; background: #dcfce7; color: #16a34a; font-size: 11px; padding: 2px 6px; border-radius: 4px; margin-left: 6px; }
.card-rating { font-size: 12px; color: #f59e0b; margin-top: 6px; }
.no-image { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #cbd5e1; font-size: 13px; }

/* Catalog Layout */
.catalog-layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; }
.catalog-sidebar { background: #fff; border-radius: 12px; padding: 20px; border: 1px solid #e2e8f0; align-self: start; position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow-y: auto; }
.sidebar-title { font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.brand-list { list-style: none; }
.brand-list li { margin-bottom: 6px; }
.brand-list a { font-size: 13px; color: #475569; display: flex; justify-content: space-between; padding: 4px 8px; border-radius: 6px; }
.brand-list a:hover, .brand-list a.active { background: #eff6ff; color: #2563eb; text-decoration: none; }
.brand-list .brand-count { color: #94a3b8; font-size: 12px; }

/* Sorting & Pagination */
.catalog-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.catalog-toolbar .results-count { font-size: 14px; color: #64748b; }
.sort-select { padding: 8px 12px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 13px; background: #fff; }
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 30px; }
.pagination a, .pagination span { padding: 8px 14px; border-radius: 8px; font-size: 13px; border: 1px solid #e2e8f0; }
.pagination a { background: #fff; color: #475569; }
.pagination a:hover { background: #eff6ff; text-decoration: none; }
.pagination .current { background: #2563eb; color: #fff; border-color: #2563eb; }

/* Product Page */
.product-page { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; background: #fff; border-radius: 16px; padding: 32px; margin-top: 20px; border: 1px solid #e2e8f0; }
.gallery { }
.gallery-main { aspect-ratio: 1; background: #f8fafc; border-radius: 12px; display: flex; align-items: center; justify-content: center; padding: 20px; margin-bottom: 12px; }
.gallery-main img { max-height: 400px; object-fit: contain; }
.gallery-thumbs { display: flex; gap: 8px; overflow-x: auto; }
.gallery-thumbs img { width: 64px; height: 64px; object-fit: contain; border: 2px solid #e2e8f0; border-radius: 8px; cursor: pointer; padding: 4px; background: #f8fafc; }
.gallery-thumbs img:hover, .gallery-thumbs img.active { border-color: #2563eb; }

.product-info .product-brand { font-size: 13px; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.product-info h1 { font-size: 24px; font-weight: 700; margin-bottom: 16px; }
.product-info .price-block { margin: 16px 0; }
.price-block .main-price { font-size: 32px; font-weight: 700; color: #dc2626; }
.price-block .old { font-size: 18px; color: #94a3b8; text-decoration: line-through; margin-left: 12px; }
.price-block .save-badge { display: inline-block; background: #dcfce7; color: #16a34a; padding: 4px 10px; border-radius: 6px; font-size: 13px; margin-left: 12px; font-weight: 600; }
.price-block .currency { font-size: 14px; color: #64748b; }

.specs-table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.specs-table th, .specs-table td { padding: 8px 12px; text-align: left; border-bottom: 1px solid #f1f5f9; font-size: 14px; }
.specs-table th { color: #64748b; font-weight: 500; width: 140px; }
.specs-table td { color: #1e293b; }

.variants-section { margin: 20px 0; }
.variants-section h3 { font-size: 14px; color: #475569; margin-bottom: 8px; }
.variant-options { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.variant-btn { padding: 6px 14px; border: 2px solid #e2e8f0; border-radius: 8px; font-size: 13px; cursor: pointer; background: #fff; color: #475569; transition: 0.15s; }
.variant-btn:hover { border-color: #2563eb; text-decoration: none; }
.variant-btn.active { border-color: #2563eb; background: #eff6ff; color: #2563eb; }

.rating-stars { color: #f59e0b; font-size: 18px; }
.rating-text { color: #64748b; font-size: 14px; }

/* Reviews */
.reviews-section, .relations-section { background: #fff; border-radius: 16px; padding: 32px; margin-top: 24px; border: 1px solid #e2e8f0; }
.reviews-section h2, .relations-section h2 { font-size: 20px; margin-bottom: 20px; }
.review-card { border-bottom: 1px solid #f1f5f9; padding: 16px 0; }
.review-card:last-child { border: none; }
.review-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.review-author { font-weight: 600; font-size: 14px; }
.review-date { font-size: 12px; color: #94a3b8; }
.review-title { font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.review-text { font-size: 14px; color: #475569; line-height: 1.6; }
.review-rating { color: #f59e0b; }

/* Related Products Horizontal Scroll */
.related-scroll { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 12px; }
.related-scroll .product-card { min-width: 200px; max-width: 200px; flex-shrink: 0; }
.related-scroll .product-card .card-img img { max-height: 140px; }

/* Sale Section */
.sale-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }

/* Responsive */
@media (max-width: 768px) {
    .catalog-layout { grid-template-columns: 1fr; }
    .catalog-sidebar { position: static; max-height: none; }
    .product-page { grid-template-columns: 1fr; }
    .header-inner { flex-direction: column; gap: 12px; }
    .search-form { margin-left: 0; width: 100%; }
    .search-form input { width: 100%; }
}
