/* =====================================================================
   MOON'S DEALS — STYLESHEET
   =====================================================================
   Plain CSS, no preprocessor, no build step. Colors and fonts are set
   once as variables at the top — change a value there and it updates
   everywhere on the site. This same file can be reused, as-is, for
   every niche page (electronics, pet-supplies, etc.) — just link to
   it the same way index.html does.
   ===================================================================== */

:root {
  /* ---- Color palette: "deals under moonlight" ---- */
  --moon-navy:      #1B2740;  /* deep night sky — header, footer */
  --moon-navy-dark: #121A2C;  /* darker navy for contrast/hover */
  --parchment:      #F6F2E7;  /* warm background for page body */
  --amber-glow:     #D89B3C;  /* deal / sale accent color */
  --amber-bright:   #F0B74D;  /* hover state for amber elements */
  --ink:            #23262F;  /* main text color */
  --slate-soft:     #5B6472;  /* secondary / muted text */
  --moonlight-blue: #AEC3DA;  /* soft dividers, subtle accents */
  --white:          #FFFFFF;

  /* ---- Type ---- */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, Segoe UI, Arial, sans-serif;

  /* ---- Layout ---- */
  --max-width: 1100px;
}

/* ---- Reset basics ---- */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--parchment);
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); margin: 0 0 0.5em; }
img { max-width: 100%; display: block; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================ HEADER ============================ */
.site-header {
  background: var(--moon-navy);
  color: var(--white);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-moon { width: 32px; height: 32px; }
.logo-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--white);
}
.main-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin: 0;
  padding: 0;
}
.main-nav a {
  color: var(--moonlight-blue);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.15s ease;
}
.main-nav a:hover { color: var(--amber-bright); }

/* ============================ HERO ============================ */
.hero {
  background: var(--moon-navy);
  color: var(--white);
  padding: 22px 0;
  text-align: center;
}
.eyebrow {
  color: var(--amber-glow);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.hero h1 {
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  font-weight: 600;
  color: var(--white);
  max-width: 40ch;
  margin-left: auto;
  margin-right: auto;
}
.hero-sub {
  max-width: 60ch;
  margin: 6px auto 0;
  color: var(--moonlight-blue);
  font-size: 0.92rem;
}

/* ======================= DEALS SECTIONS ======================= */
.deals-section {
  padding: 56px 24px;
}
.deals-section h2 {
  font-size: 1.7rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.moon-bullet {
  color: var(--amber-glow);
  font-size: 1.3rem;
}
.section-note {
  color: var(--slate-soft);
  margin-top: -6px;
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.deal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.deal-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--white);
  border: 1px solid #E7E1D2;
  border-radius: 10px;
  padding: 22px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.deal-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(27, 39, 64, 0.1);
  border-color: var(--amber-glow);
}
.deal-card-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  color: var(--slate-soft);
  font-weight: 600;
}
.deal-card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
}
.deal-card-cta {
  margin-top: 8px;
  color: var(--amber-glow);
  font-weight: 600;
  font-size: 0.9rem;
}

/* ===================== MERCHANT DEAL ROWS ===================== */
.merchant-rows {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.merchant-row {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--white);
  border: 1px solid #E7E1D2;
  border-radius: 10px;
  padding: 18px 22px;
  flex-wrap: wrap;
}
.merchant-badge {
  flex: 0 0 180px;
  display: flex;
  align-items: center;
  height: 52px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--moon-navy);
}
/* Logo sizing — every logo is boxed to the same footprint no matter
   its native dimensions, so no single merchant's logo can hog space.
   object-fit: contain keeps each logo's own proportions intact
   (won't stretch or squash it) while never exceeding this box. */
.merchant-badge img {
  max-height: 52px;
  max-width: 170px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: 1 1 auto;
}
.pill {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--parchment);
  border: 1px solid #E7E1D2;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.pill:hover {
  background: var(--amber-glow);
  border-color: var(--amber-glow);
  color: var(--white);
}
/* Pills whose PillURL is still blank in the sheet — dashed border so
   you can spot at a glance which ones still need a real link. Text
   stays fully legible; only the border signals "pending." */
.pill-pending {
  border-style: dashed;
  border-color: #C9BFA0;
  cursor: default;
}
.pill-pending:hover {
  background: var(--parchment);
  border-color: #C9BFA0;
  color: var(--ink);
}
.loading-msg {
  color: var(--slate-soft);
  font-style: italic;
  padding: 20px 0;
}

/* ===================== UTILITY LINKS BAR ===================== */
.utility-links {
  padding: 22px 24px;
  font-size: 0.85rem;
  text-align: center;
  color: var(--slate-soft);
  border-bottom: 1px solid #E7E1D2;
  background: var(--parchment);
}
.utility-links a {
  color: var(--moon-navy);
  font-weight: 600;
}
.utility-links a:hover {
  color: var(--amber-glow);
  text-decoration: underline;
}
.utility-links .sep {
  color: #C9BFA0;
  margin: 0 16px;
}

/* ===================== LEGAL / TEXT PAGES ===================== */
.legal-content {
  max-width: 68ch;
  padding-top: 40px;
  padding-bottom: 60px;
}
.legal-content h2 {
  font-size: 1.3rem;
  margin-top: 34px;
  margin-bottom: 10px;
}
.legal-content p {
  margin-bottom: 16px;
  color: var(--ink);
}
.legal-content a {
  color: var(--amber-glow);
  text-decoration: underline;
}

@media (max-width: 560px) {
  .merchant-row { flex-direction: column; align-items: flex-start; }
  .merchant-badge { flex-basis: auto; }
}

/* ============================ FOOTER ============================ */
.site-footer {
  background: var(--moon-navy-dark);
  color: var(--moonlight-blue);
  padding: 48px 0 28px;
  margin-top: 40px;
}
.footer-network h3 {
  font-family: var(--font-body);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amber-glow);
  font-weight: 600;
  margin-bottom: 16px;
}
.network-list {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px 24px;
  font-size: 0.92rem;
}
.network-list a {
  color: var(--white);
  font-weight: 600;
}
.network-list a:hover { color: var(--amber-bright); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 22px;
}
.disclosure {
  font-size: 0.8rem;
  color: #9FB0C4;
  max-width: 70ch;
  margin: 0 0 10px;
}
.legal-links {
  font-size: 0.8rem;
  margin: 0 0 14px;
}
.legal-links a {
  color: #C7D4E2;
  text-decoration: underline;
}
.legal-links a:hover {
  color: var(--amber-bright);
}

/* ===================== TIMELY IDEAS ===================== */
.timely-ideas-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 72ch;
  margin: 0 auto;
  padding: 20px 0 60px;
}
.timely-idea-card {
  background: var(--white);
  border: 1px solid #E7E1D2;
  border-radius: 10px;
  padding: 28px 30px;
}
.timely-idea-period {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--amber-glow);
}
.timely-idea-sep {
  color: #C9BFA0;
  font-weight: 400;
}
.timely-idea-heading {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.35;
  margin: 0 0 14px;
}
.timely-idea-body p {
  margin: 0 0 14px;
  line-height: 1.65;
}
.timely-idea-body a {
  color: var(--amber-glow);
  font-weight: 600;
  text-decoration: underline;
}
.timely-idea-body a:hover {
  color: var(--moon-navy);
}

/* Decorative divider between Timely Ideas posts */
.timely-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--amber-glow);
  font-size: 1.2rem;
  margin: 4px 0;
}
.timely-divider::before,
.timely-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #E7E1D2;
}
.timely-divider::before { margin-right: 16px; }
.timely-divider::after { margin-left: 16px; }
.copyright {
  font-size: 0.8rem;
  color: #9FB0C4;
  margin: 0;
}

/* ============================ MOBILE ============================ */
@media (max-width: 640px) {
  .header-inner { flex-direction: column; align-items: flex-start; }
  .hero { padding: 18px 0; }
  .deals-section { padding: 40px 20px; }
}
