:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #5b6b7c;
  --line: #e2e8f0;
  --brand: #0ea5e9;
  --brand-ink: #0369a1;
  --accent: #f97316;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --max: 1120px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(180deg, #eef5ff 0%, var(--bg) 220px);
  line-height: 1.55;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-size: 0.92em; background: #eef2ff; padding: 0.1em 0.35em; border-radius: 6px; }
.container { width: min(var(--max), calc(100% - 2rem)); margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.muted { color: var(--muted); }
.fineprint { color: var(--muted); font-size: 0.9rem; }

.site-header {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(245, 247, 251, 0.9);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; gap: 1rem; justify-content: space-between;
  min-height: 68px;
}
.logo {
  display: inline-flex; align-items: center; gap: 0.55rem;
  color: var(--ink); font-weight: 700; text-decoration: none;
}
.logo-brand {
  font-size: 1.75rem; /* was ~1rem inherited; +3 type steps */
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.logo-mark {
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--brand), #6366f1); /* fallback if img fails */
  flex-shrink: 0;
}
.logo-mark img,
.logo-mark svg {
  width: 100%;
  height: 100%;
  display: block;
}
@media (max-width: 560px) {
  .logo-brand { font-size: 1.5rem; }
  .logo-mark { width: 36px; height: 36px; }
}
.nav-links { display: flex; flex-wrap: wrap; gap: 0.85rem; }
.nav-links a { color: var(--muted); font-weight: 600; text-decoration: none; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.35rem; border-radius: 999px; padding: 0.7rem 1.15rem;
  font-weight: 700; border: 1px solid transparent; cursor: pointer;
  text-decoration: none; transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand), #6366f1);
  color: white; box-shadow: 0 8px 18px rgba(14, 165, 233, 0.28);
}
.btn-ghost {
  background: white; border-color: var(--line); color: var(--ink);
}
.btn-lg { padding: 0.95rem 1.4rem; font-size: 1.05rem; }

.hero {
  display: grid; grid-template-columns: 1.3fr 0.9fr; gap: 1.5rem;
  padding: 2.5rem 0 1.5rem;
}
.eyebrow {
  display: inline-block; color: var(--brand-ink); font-weight: 700;
  font-size: 0.85rem; letter-spacing: 0.02em; margin-bottom: 0.6rem;
}
.hero h1 { font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1.15; margin: 0 0 0.8rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.2rem; }
.hero-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.25rem 1.35rem; box-shadow: var(--shadow);
}
.hero-card h2 { margin-top: 0; font-size: 1.15rem; }
.hero-card ul { margin: 0; padding-left: 1.1rem; color: var(--muted); }

.section-title {
  display: flex; justify-content: space-between; gap: 1rem; align-items: end;
  margin: 2rem 0 1rem;
}
.section-title.centered { justify-content: center; text-align: center; flex-direction: column; align-items: center; }
.section-title h2 { margin: 0; }
.section-title p { margin: 0.35rem 0 0; color: var(--muted); }

.cat-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1rem;
}
.cat-tile {
  display: flex; flex-direction: column; gap: 0.35rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem; box-shadow: var(--shadow); color: inherit; text-decoration: none;
}
.cat-tile:hover { border-color: #bae6fd; text-decoration: none; }
.cat-tile strong { font-size: 1.1rem; }
.cat-tile span:last-child { color: var(--muted); font-size: 0.92rem; }

.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.chip {
  border: 1px solid var(--line); background: white; border-radius: 999px;
  padding: 0.45rem 0.9rem; font-weight: 600; cursor: pointer; color: var(--muted);
}
.chip.active, .chip:hover { background: #e0f2fe; color: var(--brand-ink); border-color: #7dd3fc; }

.grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; margin-bottom: 2rem;
}
.grid.grid-5 { grid-template-columns: repeat(5, 1fr); }
.tag-row { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.tag-hot {
  background: #fff7ed !important;
  color: #c2410c !important;
}
.hot-picks { margin-top: 0.5rem; }
.home-cat { margin-bottom: 0.5rem; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.card.hidden { display: none; }
.card-media {
  aspect-ratio: 1; background: #f8fafc; display: grid; place-items: center; overflow: hidden;
}
.card-media img { width: 100%; height: 100%; object-fit: contain; padding: 1rem; }
.card-body { padding: 1rem 1.05rem 1.15rem; display: flex; flex-direction: column; gap: 0.45rem; flex: 1; }
.card-body h3 { margin: 0; font-size: 1.02rem; line-height: 1.3; }
.card-body h3 a { color: inherit; text-decoration: none; }
.card-body h3 a:hover { color: var(--brand-ink); }
.tag {
  display: inline-flex; width: fit-content; background: #eef2ff; color: #4338ca;
  border-radius: 999px; padding: 0.2rem 0.55rem; font-size: 0.75rem; font-weight: 700;
}
.why { margin: 0; color: var(--muted); font-size: 0.92rem; flex: 1; }
.meta { margin: 0.2rem 0 0.4rem; }
.price { font-weight: 700; }
.price small { display: block; font-weight: 500; color: var(--muted); font-size: 0.78rem; }
.card .btn { margin-top: auto; width: 100%; }

/* Centered disclosure / how-it-works blocks */
.centered-block {
  text-align: center;
  max-width: 720px;
  margin: 2.5rem auto;
  padding: 1.75rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.centered-block h2 { margin-top: 0; }
.centered-block p, .centered-block li { color: var(--muted); }
.centered-block .steps {
  text-align: left;
  display: grid;
  gap: 0.75rem;
  margin: 1rem auto;
  max-width: 560px;
  padding-left: 1.2rem;
}
.centered-block .steps strong { color: var(--ink); }

.breadcrumbs { padding: 1rem 0 0; }
.breadcrumbs ol {
  list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 0; margin: 0;
  color: var(--muted); font-size: 0.9rem;
}
.breadcrumbs li:not(:last-child)::after { content: "›"; margin-left: 0.35rem; color: #94a3b8; }

.page-hero { padding: 1.5rem 0 0.5rem; }
.page-hero h1 { margin: 0 0 0.5rem; }
.lead { color: var(--muted); font-size: 1.05rem; }

.toolbar {
  display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center;
  margin: 1rem 0 1.25rem;
}
.sort-select, .search-wrap input {
  border: 1px solid var(--line); border-radius: 10px; padding: 0.55rem 0.75rem;
  background: white; font: inherit;
}
.search-wrap { flex: 1; min-width: 180px; }
.search-wrap input { width: 100%; }
.count { color: var(--muted); font-weight: 600; margin-left: auto; }

.product-page { padding-bottom: 2rem; }
.product-layout {
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 1.5rem; margin: 1rem 0 2rem;
}
.product-gallery {
  background: white; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem; box-shadow: var(--shadow);
}
.product-gallery img { width: 100%; object-fit: contain; max-height: 480px; margin: auto; }
.product-summary h1 { margin: 0.2rem 0 0.75rem; font-size: clamp(1.5rem, 2.5vw, 2rem); }
.price-note {
  display: grid; gap: 0.15rem; background: #fff7ed; border: 1px solid #fed7aa;
  border-radius: 12px; padding: 0.85rem 1rem; margin: 1rem 0;
}
.price-note span { color: var(--muted); font-size: 0.92rem; }
.bullets { padding-left: 1.1rem; color: var(--muted); }
.bullets li { margin-bottom: 0.35rem; }

.entity-facts, .faq, .related {
  background: white; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem 1.35rem; margin-bottom: 1.25rem; box-shadow: var(--shadow);
}
.facts { display: grid; gap: 0.65rem; margin: 0; }
.facts > div {
  display: grid; grid-template-columns: 140px 1fr; gap: 0.75rem;
  border-bottom: 1px solid var(--line); padding-bottom: 0.55rem;
}
.facts dt { font-weight: 700; color: var(--muted); }
.facts dd { margin: 0; }
.faq details {
  border-top: 1px solid var(--line); padding: 0.75rem 0;
}
.faq details:first-of-type { border-top: 0; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { color: var(--muted); margin: 0.5rem 0 0; }

.site-footer {
  margin-top: 2rem; padding: 2rem 0 1.5rem;
  background: #0f172a; color: #cbd5e1;
}
.site-footer a { color: #e2e8f0; }
.footer-grid {
  display: grid; grid-template-columns: 1.3fr 1fr 1.2fr; gap: 1.5rem;
}
.footer-links { list-style: none; padding: 0; margin: 0.5rem 0 0; }
.footer-links li { margin-bottom: 0.35rem; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid #1e293b;
  font-size: 0.9rem; color: #94a3b8;
}
.site-footer code { background: #1e293b; color: #7dd3fc; }

@media (max-width: 900px) {
  .hero, .product-layout, .footer-grid, .cat-grid { grid-template-columns: 1fr; }
  .grid, .grid.grid-5 { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
}
@media (max-width: 1100px) and (min-width: 901px) {
  .grid, .grid.grid-5 { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 560px) {
  .grid, .grid.grid-5 { grid-template-columns: 1fr; }
  .facts > div { grid-template-columns: 1fr; gap: 0.2rem; }
}


/* Product detail multi-image slideshow */
.gallery-carousel { display: flex; flex-direction: column; gap: 0.75rem; }
.gallery-main {
  position: relative; display: grid; place-items: center;
  min-height: 280px;
}
.gallery-viewport { width: 100%; position: relative; }
.gallery-slide { display: none; }
.gallery-slide.is-active { display: block; }
.gallery-slide img { width: 100%; max-height: 480px; object-fit: contain; margin: auto; }
.gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 2; width: 2.25rem; height: 2.25rem; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255,255,255,0.95);
  color: var(--ink); font-size: 1.4rem; line-height: 1; cursor: pointer;
  display: grid; place-items: center; box-shadow: var(--shadow);
}
.gallery-nav:hover { background: #e0f2fe; border-color: #7dd3fc; }
.gallery-prev { left: 0.35rem; }
.gallery-next { right: 0.35rem; }
.gallery-thumbs {
  display: flex; flex-wrap: wrap; gap: 0.45rem; justify-content: center;
}
.gallery-thumb {
  width: 64px; height: 64px; padding: 0; border-radius: 10px;
  border: 2px solid var(--line); background: #f8fafc; cursor: pointer; overflow: hidden;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumb.is-active, .gallery-thumb:hover { border-color: var(--brand); }
.gallery-dots {
  display: flex; gap: 0.4rem; justify-content: center; align-items: center;
}
.gallery-dot {
  width: 0.55rem; height: 0.55rem; border-radius: 999px; border: 0;
  background: #cbd5e1; cursor: pointer; padding: 0;
}
.gallery-dot.is-active { background: var(--brand); transform: scale(1.15); }
@media (max-width: 560px) {
  .gallery-thumb { width: 52px; height: 52px; }
  .gallery-nav { width: 2rem; height: 2rem; font-size: 1.2rem; }
}
