/* ── Design tokens ── */
:root {
  --primary:       #4f46e5;
  --primary-dark:  #4338ca;
  --primary-light: #eef2ff;
  --wa:            #25d366;
  --wa-dark:       #1da851;
  --text:          #0f172a;
  --muted:         #64748b;
  --border:        #e2e8f0;
  --surface:       #ffffff;
  --bg:            #f8fafc;
  --radius-sm:     6px;
  --radius:        12px;
  --radius-lg:     18px;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow:        0 4px 16px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.05);
  --shadow-lg:     0 10px 40px rgba(0,0,0,.12);
  --font:          'Inter', system-ui, -apple-system, sans-serif;
  --transition:    0.2s ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }

/* ── Header ── */
.site-header {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #fff;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(79,70,229,.4);
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -.5px;
  color: #fff;
  flex-shrink: 0;
}
.header-search { flex: 1; max-width: 520px; }
.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 14px;
  color: var(--muted);
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 10px 14px 10px 42px;
  border: none;
  border-radius: 50px;
  font-size: .95rem;
  font-family: var(--font);
  outline: none;
  background: rgba(255,255,255,.18);
  color: #fff;
  transition: var(--transition);
  backdrop-filter: blur(8px);
}
.search-input::placeholder { color: rgba(255,255,255,.65); }
.search-input:focus { background: rgba(255,255,255,.25); }
.search-btn {
  margin-left: 8px;
  padding: 9px 20px;
  background: rgba(255,255,255,.25);
  color: #fff;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 50px;
  font-size: .9rem;
  font-weight: 600;
  transition: var(--transition);
  flex-shrink: 0;
  font-family: var(--font);
}
.search-btn:hover { background: rgba(255,255,255,.35); }
.header-nav { flex-shrink: 0; }
.nav-link {
  padding: 8px 18px;
  border: 1.5px solid rgba(255,255,255,.4);
  border-radius: 50px;
  font-size: .875rem;
  font-weight: 500;
  color: #fff;
  transition: var(--transition);
}
.nav-link:hover { background: rgba(255,255,255,.15); }

/* ── Hero section (when no search) ── */
.hero {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #fff;
  text-align: center;
  padding: 3.5rem 1.5rem 5rem;
}
.hero h1 { font-size: clamp(1.8rem, 5vw, 3rem); font-weight: 800; margin-bottom: .75rem; letter-spacing: -.5px; }
.hero p { font-size: 1.1rem; opacity: .85; max-width: 500px; margin: 0 auto; }

/* ── Category filter ── */
.category-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 64px;
  z-index: 90;
}
.category-bar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: .75rem 1.5rem;
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.category-bar-inner::-webkit-scrollbar { display: none; }
.cat-pill {
  padding: 7px 18px;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  font-size: .875rem;
  font-weight: 500;
  background: var(--surface);
  color: var(--muted);
  white-space: nowrap;
  transition: var(--transition);
  flex-shrink: 0;
}
.cat-pill:hover { border-color: var(--primary); color: var(--primary); }
.cat-pill.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ── Main layout ── */
.page-body { max-width: 1280px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }

.results-info {
  font-size: .9rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

/* ── Product grid ── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.5rem;
}

/* ── Product card ── */
.product-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.card-image-wrap { position: relative; }
.card-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.card-image--placeholder {
  width: 100%;
  height: 220px;
  background: linear-gradient(135deg, var(--primary-light) 0%, #ddd6fe 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
}
.card-category-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: .75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 50px;
  backdrop-filter: blur(6px);
  letter-spacing: .3px;
}
.card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: .5rem;
}
.card-title { font-size: 1.05rem; font-weight: 700; color: var(--text); line-height: 1.3; }
.card-price { font-size: 1.35rem; font-weight: 800; color: var(--primary); }
.card-desc { font-size: .875rem; color: var(--muted); line-height: 1.5; flex: 1; }
.card-meta { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: auto; padding-top: .25rem; }
.meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .78rem;
  color: var(--muted);
  background: var(--bg);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}
.wa-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: var(--wa);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-weight: 700;
  margin-top: .75rem;
  transition: background var(--transition), transform var(--transition);
}
.wa-btn:hover { background: var(--wa-dark); transform: scale(1.01); }
.wa-btn:active { transform: scale(.98); }

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 5rem 1.5rem;
  color: var(--muted);
}
.empty-state svg { margin: 0 auto 1.5rem; opacity: .35; }
.empty-state h2 { font-size: 1.4rem; color: var(--text); margin-bottom: .5rem; }

/* ── Footer ── */
.site-footer {
  background: #0f172a;
  color: rgba(255,255,255,.6);
  text-align: center;
  padding: 2.5rem 1.5rem;
  font-size: .875rem;
  margin-top: 4rem;
}
.footer-inner { display: flex; flex-direction: column; gap: .6rem; align-items: center; }
.footer-brand { font-weight: 700; color: #fff; font-size: 1rem; }
.footer-contact { display: flex; align-items: center; gap: 6px; }

/* ── Toast ── */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  z-index: 9999;
}
.toast {
  background: #1e293b;
  color: #fff;
  padding: .875rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  box-shadow: var(--shadow-lg);
  animation: slideIn .25s ease;
  max-width: 320px;
}
.toast.error { background: #dc2626; }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}
@media (max-width: 768px) {
  .header-inner { gap: 1rem; }
  .header-nav { display: none; }
  .search-btn { display: none; }
  .search-input { padding-right: 14px; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .card-image, .card-image--placeholder { height: 180px; }
  .page-body { padding: 1.5rem 1rem 3rem; }
}
@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr; }
  .hero { padding: 2.5rem 1rem 4rem; }
  .header-inner {
    height: auto;
    flex-wrap: wrap;
    padding: .75rem 0;
    gap: .5rem;
  }
  .header-search {
    display: block;
    flex: 0 0 100%;
    max-width: 100%;
  }
  .search-btn { display: flex; }
  .category-bar { top: 0; }
}
