:root {
  --brand: #4f46e5;
  --brand-dark: #3730a3;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 820px; }
.center { text-align: center; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 14px; }
a { color: var(--brand); text-decoration: none; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; font-size: 20px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--brand); color: #fff;
  display: grid; place-items: center; font-size: 19px;
}
.site-nav { display: flex; gap: 26px; }
.site-nav a { color: var(--muted); font-weight: 600; font-size: 15px; }
.site-nav a:hover { color: var(--brand); }

.hero {
  background: radial-gradient(1200px 420px at 15% -10%, rgba(79,70,229,.14), transparent),
              radial-gradient(900px 380px at 100% 0%, rgba(14,165,233,.12), transparent),
              var(--bg-alt);
  padding: 84px 0 72px;
}
.hero-eyebrow { color: var(--brand); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 12.5px; margin: 0 0 12px; }
.hero h1 { font-size: clamp(30px, 5vw, 46px); max-width: 760px; }
.hero-sub { color: var(--muted); font-size: 17px; max-width: 640px; margin: 0 0 28px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 12px 24px; border-radius: 999px;
  font-weight: 700; font-size: 15px; border: 1.5px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px rgba(79,70,229,.28); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: #fff; }

.section { padding: 68px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.section-head h2 { font-size: 28px; margin: 0; }
.section-note { color: var(--muted); margin: 0; font-size: 14px; }
.section p { color: var(--muted); }

.toolbar { margin-bottom: 26px; display: grid; gap: 14px; }
#searchInput {
  width: 100%; max-width: 420px; padding: 12px 16px;
  border: 1.5px solid var(--line); border-radius: 999px; font-size: 15px; outline: none;
}
#searchInput:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79,70,229,.12); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1.5px solid var(--line); background: #fff; color: var(--muted);
  padding: 7px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: all .15s ease;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 22px;
}
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.card-img {
  aspect-ratio: 1 / 1; width: 100%; object-fit: cover; background: var(--bg-alt);
}
.card-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.category-tag {
  align-self: flex-start; font-size: 12px; font-weight: 700; color: var(--brand);
  background: rgba(79,70,229,.09); padding: 4px 10px; border-radius: 999px;
}
.card-title { font-size: 15px; font-weight: 700; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.empty-state { color: var(--muted); text-align: center; padding: 40px 0; }

.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.55); }
.modal-card {
  position: relative; background: #fff; border-radius: 20px; max-width: 860px; width: 100%;
  max-height: 90vh; overflow: auto; display: grid; grid-template-columns: 1.05fr 1fr;
  animation: pop .18s ease;
}
@keyframes pop { from { transform: translateY(12px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-close {
  position: absolute; top: 10px; right: 12px; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: rgba(15,23,42,.55); color: #fff; font-size: 22px; line-height: 1; cursor: pointer;
}
.modal-gallery { position: relative; background: var(--bg-alt); min-height: 320px; }
.modal-gallery img { width: 100%; height: 100%; min-height: 320px; object-fit: cover; display: block; }
.gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.92); color: var(--ink); font-size: 22px; cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.gallery-nav.prev { left: 12px; } .gallery-nav.next { right: 12px; }
.gallery-nav:disabled { opacity: .35; cursor: default; }
.gallery-dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.gallery-dots button { width: 8px; height: 8px; border-radius: 50%; border: none; background: rgba(15,23,42,.25); padding: 0; cursor: pointer; }
.gallery-dots button.active { background: var(--brand); }
.modal-body { padding: 28px 26px; }
.modal-body h3 { font-size: 21px; margin: 12px 0 10px; }
.modal-body p { color: var(--muted); font-size: 14.5px; white-space: pre-line; }

.site-footer { border-top: 1px solid var(--line); padding: 26px 0; background: var(--bg-alt); }
.footer-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--brand); }

@media (max-width: 760px) {
  .modal-card { grid-template-columns: 1fr; max-height: 92vh; }
  .modal-gallery img, .modal-gallery { min-height: 260px; }
  .hero { padding: 60px 0 52px; }
  .section { padding: 52px 0; }
  .site-nav { gap: 16px; }
}
