/* Shared reset + type scale for all catalog-hub templates */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

button,
.btn {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.wrap {
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.wrap-narrow {
  width: min(720px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.disclosure {
  font-size: 0.875rem;
  color: var(--ink-muted);
  max-width: 42rem;
}

.disclosure strong {
  color: var(--ink);
  font-weight: 600;
}

/* On-page affiliate note — near shortlist CTAs (not a click interstitial) */
.affiliate-note {
  font-size: 0.875rem;
  color: var(--ink-muted);
  max-width: 40rem;
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--accent, #3f5c45);
  background: color-mix(in srgb, var(--paper-2, #eee) 70%, transparent);
}

.affiliate-note strong {
  color: var(--ink);
  font-weight: 600;
}

.affiliate-note a {
  color: var(--ink);
}

/*
  AdSense slots — reserved in every template; rendered only when
  verticals/*.yaml → adsense.enabled: true (site-by-site).
  Keep visually separate from Catalog product cards. Never in hero.
*/
.ad-slot {
  margin: 2.5rem 0;
}

.ad-slot__inner {
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.ad-slot__frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 90px;
  padding: 1rem;
  border: 1px dashed color-mix(in srgb, var(--ink-muted, #666) 45%, transparent);
  background: color-mix(in srgb, var(--paper-2, #eee) 55%, transparent);
  color: var(--ink-muted, #666);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
}

.ad-slot__label {
  font-weight: 600;
  color: var(--ink);
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.8125rem;
}

.ad-slot__state {
  opacity: 0.85;
}

/* Production: hide when site has adsense.enabled: false */
.ad-slot[data-adsense-enabled="false"]:not(.ad-slot--mock-preview) {
  display: none;
}

/* Mocks always show reserved space even when off */
.ad-slot--mock-preview .ad-slot__frame {
  min-height: 100px;
}

.ad-slot--before-footer {
  margin-bottom: 0;
}

.brand-strip {
  border-block: 1px solid var(--line);
  background: var(--brand-strip-bg);
  padding: 1.75rem 0;
}

.brand-strip__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
}

.brand-strip p {
  max-width: 36rem;
  color: var(--ink-muted);
  font-size: 0.98rem;
}

.footer {
  padding: 3rem 0 2.5rem;
  border-top: 1px solid var(--line);
  margin-top: 4rem;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.footer__grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1.4fr 1fr 1fr;
}

@media (max-width: 720px) {
  .footer__grid {
    grid-template-columns: 1fr;
  }
}

.footer a {
  color: var(--ink);
}

.badge-mock {
  position: fixed;
  z-index: 50;
  right: 0.75rem;
  bottom: 0.75rem;
  padding: 0.4rem 0.65rem;
  border-radius: 4px;
  background: #111;
  color: #f5f5f5;
  font: 600 0.7rem/1.2 var(--font-mono, ui-monospace, monospace);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.85;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .motion-fade,
  .motion-rise {
    animation: none !important;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.motion-fade {
  animation: fade-in 0.7s ease both;
}

.motion-rise {
  animation: rise-in 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.motion-rise-delay {
  animation-delay: 0.12s;
}

.motion-rise-delay-2 {
  animation-delay: 0.24s;
}
