/* ============================================================
   theme.css — "Clinical Blue" design layer
   Loaded LAST (after site / niche-tag / home / pages) so it can
   restyle chrome, cards and buttons without editing those files.
   Mobile-first details are at the bottom.
   ============================================================ */

/* ---------- Base & accessibility ---------- */
html { -webkit-text-size-adjust: 100%; }
body { font-size: 16px; line-height: 1.55; text-rendering: optimizeLegibility; }
h1, h2, h3, h4 { letter-spacing: -.015em; }
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--c-green-400);
  outline-offset: 2px;
}
::selection { background: var(--c-green-100); color: var(--c-ink-900); }

/* ---------- Trust bar (above the header) ---------- */
.trust-bar {
  background: var(--c-green-900);
  color: rgba(255,255,255,.88);
  font-size: 12.5px;
  font-weight: 500;
}
.trust-bar-inner {
  max-width: 1280px; margin: 0 auto; padding: 8px 20px;
  display: flex; align-items: center; justify-content: center;
  gap: 8px 22px; flex-wrap: wrap; text-align: center;
}
.trust-bar span { display: inline-flex; align-items: center; gap: 6px; }
.trust-bar svg { width: 13px; height: 13px; fill: #5eead4; flex-shrink: 0; }
.trust-bar a { color: #fff; font-weight: 600; text-underline-offset: 2px; }

/* ---------- Header / navigation ---------- */
.site-nav {
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--surface-border);
  box-shadow: 0 1px 0 rgba(10,37,64,.03);
}
.site-nav-inner { padding: 12px 20px; gap: 22px; }
.site-menu { gap: 2px; }
.site-menu a {
  border-radius: 10px; font-size: 14.5px; font-weight: 600;
  padding: 9px 13px; color: var(--c-ink-700);
}
.site-menu a:hover { background: var(--c-green-50); color: var(--c-green-600); }
.site-search { background: var(--c-paper-50); border-radius: 10px; width: 220px; }
.site-search:focus-within { width: 280px; }
.nav-cta:hover { background: var(--c-green-600); transform: translateY(-1px); }
.nav-cta svg { width: 14px; height: 14px; }
.site-menu-toggle {
  border-radius: 10px; width: 44px; height: 44px;
  border: 1px solid var(--surface-border); background: #fff;
}

/* ---------- Mobile menu panel ---------- */
.site-menu-mobile {
  padding: 6px 16px 18px; gap: 0;
  max-height: calc(100vh - 120px); overflow-y: auto;
  background: #fff; border-top: 1px solid var(--surface-border);
}
.site-menu-mobile a {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 52px; padding: 12px 4px; font-size: 16px; font-weight: 600;
  border-bottom: 1px solid var(--c-paper-100);
}
.site-menu-mobile a::after { content: '›'; color: var(--c-ink-300); font-size: 22px; line-height: 1; }
.site-menu-mobile a.nav-cta-mobile {
  margin-top: 14px; justify-content: center; border: 0;
  background: var(--c-green-500); color: #fff; border-radius: 12px;
}
.site-menu-mobile a.nav-cta-mobile::after { content: none; }

/* ---------- Buttons ---------- */
.h-btn-primary, .h-btn-ghost, .h-bestseller-cta, .h-bestseller-offer,
.h-bestseller-label, .h-cat-count, .np-btn-buy, .np-btn-detail,
.pg-cta-btn, .sp-filter-btn { border-radius: var(--radius-pill); }
.h-hero-badge { border-radius: 10px; }
.h-btn-primary { color: var(--c-green-700); }
.np-btn-buy, .sp-filter-btn { background: var(--c-green-500); }
.np-btn-buy:hover, .sp-filter-btn:hover { background: var(--c-green-600); }
.np-btn-detail { border-color: var(--c-green-200); color: var(--c-green-600); }

/* ---------- Section chrome ---------- */
.h-section-label, .pg-section-label {
  display: inline-block;
  background: var(--c-green-50); color: var(--c-green-600);
  padding: 5px 12px; border-radius: 8px;
  letter-spacing: .08em; font-weight: 700;
}
.h-section-dark .h-section-label { background: rgba(255,255,255,.1); color: #bfe3fb; }
.h-view-all, .pg-view-all { color: var(--c-green-500); }
.h-view-all:hover, .pg-view-all:hover { color: var(--c-green-700); }

/* ---------- Hero ---------- */
.h-hero { min-height: auto; padding: 88px 0 76px; }
.h-hero-tagline { letter-spacing: -.025em; }
.h-hero-tagline em { background: linear-gradient(90deg, #7dd3fc, #5eead4); -webkit-background-clip: text; background-clip: text; }

/* ---------- Cards: one consistent, clean style ---------- */
.np-card, .sp-card, .ha-product-card, .h-cat-card, .cat-card,
.h-finder-card, .np-widget, .pg-widget, .np-latest-banner {
  background: #fff;
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}
.np-card:hover, .sp-card:hover, .h-cat-card:hover, .cat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--c-green-200);
}
.h-cat-card:hover { transform: translateY(-3px); }
.h-cat-card:hover .h-cat-img, .h-cat-card:hover .h-cat-icon-wrap { transform: none; }
.np-card-img, .sp-card-img { background: var(--c-paper-50); border-bottom: 1px solid var(--c-paper-100); }
.np-card-body h3, .sp-card-body h3 { font-family: var(--font-display); font-weight: 700; color: var(--c-ink-900); }
.np-price { color: var(--c-ink-900); font-weight: 800; }
.np-tag-pill, .pg-tag, .np-cloud a {
  background: var(--c-green-50); color: var(--c-green-600);
  border-radius: 8px; border: 1px solid var(--c-green-100);
}
.pg-tag:hover, .np-cloud a:hover { background: var(--c-green-500); color: #fff; border-color: var(--c-green-500); }

/* Score badge: dark navy chip, readable on any product photo */
.np-score-badge, .sp-score-badge {
  background: var(--c-green-900); color: #fff;
  border-radius: 8px; font-weight: 800;
}
.np-score-badge svg, .sp-score-badge svg { fill: var(--c-gold-400); }

/* ---------- Sidebar CTA widget ---------- */
.np-widget.np-cta-widget, .pg-widget.pg-widget-cta { background: var(--grad-hero); border: 0; }

/* ---------- Page heroes (inner pages) ---------- */
.pg-hero, .np-hero { color: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--c-green-900); border-top: 3px solid var(--c-clay-400); margin-top: 64px; }
.footer-col a { display: inline-block; padding: 4px 0; }
.footer-socials a { width: 40px; height: 40px; border-radius: 10px; }
.footer-socials a:hover { background: var(--c-green-500); }
.footer-trustline svg { color: #5eead4; }
.footer-col h5 { font-family: var(--font-body); font-size: 12.5px; letter-spacing: .1em; color: #cfe6f7; }

/* ---------- Tablet ---------- */
@media (max-width: 900px) {
  .nav-cta { display: none; }               /* CTA lives in the mobile panel */
  .site-nav-inner { padding: 10px 16px; }
  /* 16px inputs stop iOS Safari zooming the page on focus */
  input, select, textarea { font-size: 16px !important; }
}

/* ---------- Phones (most of your traffic) ---------- */
@media (max-width: 640px) {
  .trust-bar-inner { padding: 7px 14px; font-size: 12px; gap: 4px 14px; }
  .trust-bar .hide-sm { display: none; }

  .h-container, .np-container, .pg-container { padding-left: 16px; padding-right: 16px; }

  .h-section { padding: 52px 0; }
  .h-section-title { font-size: 1.65rem; }
  .h-section-sub { font-size: 1rem; margin-bottom: 32px; }

  .h-hero { padding: 48px 0 44px; }
  .h-hero-tagline { font-size: clamp(2rem, 9vw, 2.6rem); }
  .h-hero-text { font-size: 1rem; margin-bottom: 26px; }
  .h-hero-actions { flex-direction: column; }
  .h-hero-actions a { width: 100%; justify-content: center; min-height: 48px; }
  .h-hero-trust { gap: 10px 16px; margin-top: 26px; }

  .np-hero { padding: 40px 0 56px; }
  .pg-hero { padding: 40px 0 34px; }

  /* Two product cards per row = half the scrolling */
  .np-grid, .sp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .np-card-body, .sp-card-body { padding: 12px; }
  .np-card-body h3, .sp-card-body h3 { font-size: 14px; line-height: 1.3; }
  .np-card-tagline {
    font-size: 12px; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .np-card-tags { display: none; }
  .np-card-footer { flex-wrap: wrap; gap: 6px; }
  .np-cta { font-size: 12px; }
  .np-card-btns { flex-direction: column; }
  .np-btn-buy, .np-btn-detail { min-height: 44px; }
  .np-score-badge, .sp-score-badge { top: 8px; right: 8px; font-size: 12px; padding: 4px 8px; }
  .np-offer-ribbon, .sp-offer-ribbon {
    top: 8px; left: 8px; font-size: 10px; padding: 4px 8px;
    max-width: 62%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }

  .h-categories-grid, .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .h-cat-card { padding: 18px 10px 16px; }

  .footer-bottom-inner { padding: 20px 16px; }
  .footer-disclaimer { text-align: left; }
}

/* ---------- Respect reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .h-reveal, .pg-reveal, .np-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}
