* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius: 10px;
}

body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
.header { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 20px; }
.logo { font-size: 1.3rem; font-weight: 700; color: var(--primary); white-space: nowrap; }
.header-right { display: flex; align-items: center; gap: 12px; }
.search-box { display: flex; gap: 0; }
.search-box input { padding: 8px 14px; border: 1px solid var(--border); border-right: none; border-radius: var(--radius) 0 0 var(--radius); outline: none; font-size: 0.9rem; width: 220px; }
.search-box input:focus { border-color: var(--primary); }
.search-box button { padding: 8px 16px; background: var(--primary); color: #fff; border: none; border-radius: 0 var(--radius) var(--radius) 0; cursor: pointer; font-size: 0.9rem; }
.search-box button:hover { background: var(--primary-dark); }
.contact-btn { padding: 8px 18px; background: var(--primary); color: #fff; border-radius: var(--radius); text-decoration: none; font-size: 0.9rem; white-space: nowrap; }
.contact-btn:hover { background: var(--primary-dark); }

/* Hero */
.hero { background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%); color: #fff; padding: 60px 0; text-align: center; }
.hero h1 { font-size: 2.2rem; margin-bottom: 12px; }
.hero p { font-size: 1.05rem; opacity: 0.9; }

/* Main */
.main-content { padding: 40px 20px; }

/* Filter */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.filter-btn { padding: 7px 18px; border: 1px solid var(--border); background: #fff; border-radius: 20px; cursor: pointer; font-size: 0.9rem; color: var(--text-muted); transition: all 0.2s; }
.filter-btn:hover, .filter-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Product Grid */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.loading { color: var(--text-muted); padding: 40px; text-align: center; grid-column: 1/-1; }
.empty { color: var(--text-muted); padding: 60px; text-align: center; grid-column: 1/-1; }

/* Product Card */
.product-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.product-img { width: 100%; height: 180px; object-fit: cover; background: #e2e8f0; display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-body { padding: 16px; }
.product-category { font-size: 0.78rem; color: var(--primary); background: #eff6ff; padding: 2px 8px; border-radius: 4px; display: inline-block; margin-bottom: 8px; }
.product-name { font-size: 1rem; font-weight: 600; margin-bottom: 8px; line-height: 1.4; }
.product-desc { font-size: 0.875rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tag { font-size: 0.75rem; background: #f1f5f9; color: var(--text-muted); padding: 2px 8px; border-radius: 4px; }
.product-footer { display: flex; align-items: center; justify-content: space-between; }
.product-price { font-size: 1.2rem; font-weight: 700; color: #ef4444; }
.product-price span { font-size: 0.85rem; }
.btn-detail { padding: 6px 14px; background: var(--primary); color: #fff; border: none; border-radius: 6px; cursor: pointer; font-size: 0.85rem; }
.btn-detail:hover { background: var(--primary-dark); }

/* Contact Section */
.contact-section { background: #fff; border-top: 1px solid var(--border); padding: 60px 0; text-align: center; }
.contact-section h2 { font-size: 1.6rem; margin-bottom: 10px; }
.contact-section > .container > p { color: var(--text-muted); margin-bottom: 36px; }
.contact-cards { display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; }
.contact-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 36px; min-width: 160px; }
.contact-icon { font-size: 2rem; margin-bottom: 8px; }
.contact-label { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 4px; }
.contact-value { font-size: 1rem; font-weight: 600; color: var(--primary); }

/* Footer */
.footer { background: #1e293b; color: #94a3b8; text-align: center; padding: 24px 0; font-size: 0.875rem; }

/* Modal */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 200; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.open { display: flex; }
.modal { background: #fff; border-radius: 12px; max-width: 680px; width: 100%; max-height: 90vh; overflow-y: auto; position: relative; padding: 32px; }
.modal-close { position: absolute; top: 16px; right: 16px; background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--text-muted); }
.modal-close:hover { color: var(--text); }
.modal-img { width: 100%; height: 240px; object-fit: cover; border-radius: 8px; background: #e2e8f0; display: flex; align-items: center; justify-content: center; font-size: 4rem; margin-bottom: 20px; overflow: hidden; }
.modal-img img { width: 100%; height: 100%; object-fit: cover; }
.modal-category { font-size: 0.8rem; color: var(--primary); background: #eff6ff; padding: 3px 10px; border-radius: 4px; display: inline-block; margin-bottom: 10px; }
.modal-name { font-size: 1.4rem; font-weight: 700; margin-bottom: 10px; }
.modal-price { font-size: 1.6rem; font-weight: 700; color: #ef4444; margin-bottom: 16px; }
.modal-section { margin-bottom: 16px; }
.modal-section h4 { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 6px; }
.modal-section p { font-size: 0.95rem; line-height: 1.7; }
.modal-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.modal-includes { list-style: none; }
.modal-includes li::before { content: '✓ '; color: #22c55e; }
.modal-includes li { font-size: 0.9rem; padding: 3px 0; }
.modal-contact-tip { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 8px; padding: 14px 18px; margin-top: 20px; font-size: 0.9rem; color: var(--primary); text-align: center; }

@media (max-width: 600px) {
  .hero h1 { font-size: 1.6rem; }
  .header-inner { flex-wrap: wrap; height: auto; padding: 12px 0; }
  .search-box input { width: 140px; }
}
