/*
Theme Name: NeedThisInMyLife
Theme URI: https://needthisinmylife.com
Author: NeedThisInMyLife
Description: Custom affiliate blog theme for NeedThisInMyLife
Version: 2.0
License: GNU General Public License v2 or later
Text Domain: needthisinmylife
*/

/* ===================== VARIABLES & RESET ===================== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=DM+Sans:wght@400;500;600&display=swap');

:root {
  --gold: #9d8046;
  --gold-light: #b8974f;
  --gold-dark: #7a6235;
  --gold-bg: #f9f2e3;
  --cream: #fffaf0;
  --cream-2: #f5ede0;
  --cream-3: #e8d9c4;
  --text: #1e1a14;
  --text-muted: #7a6a50;
  --text-light: #a89070;
  --white: #ffffff;
  --border: #e5d9c4;
  --shadow: 0 2px 16px rgba(157,128,70,.10);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold-dark); }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ===================== HEADER ===================== */
#site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 12px rgba(157,128,70,.08);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.site-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.site-logo img { height: 38px; width: auto; }
.site-logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--gold-dark);
}
#main-nav ul { display: flex; gap: 2rem; list-style: none; }
#main-nav a {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .02em;
}
#main-nav a:hover,
#main-nav .current-menu-item > a { color: var(--gold); }
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 22px;
  color: var(--gold);
}

/* ===================== HERO ===================== */
.hero-section {
  background: linear-gradient(140deg, #1e1508 0%, #3d2e15 60%, #5a4220 100%);
  padding: 5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 60% 40%, rgba(157,128,70,.18) 0%, transparent 70%);
}
.hero-section > * { position: relative; }
.hero-tag {
  display: inline-block;
  background: rgba(157,128,70,.25);
  color: #d4a84b;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 5px 16px;
  border-radius: 20px;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(157,128,70,.3);
}
.hero-section h1 {
  font-family: 'Playfair Display', serif;
  font-size: 42px;
  color: var(--white);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 1rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.hero-section p {
  color: #c9a96e;
  font-size: 16px;
  margin-bottom: 2rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.hero-btn {
  display: inline-block;
  background: var(--gold);
  color: var(--white);
  padding: 14px 40px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .03em;
  transition: background .2s, transform .15s;
}
.hero-btn:hover {
  background: var(--gold-dark);
  color: var(--white);
  transform: translateY(-1px);
}

/* ===================== SECTION HEADER ===================== */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  max-width: 1100px;
  margin: 3rem auto 1.5rem;
  padding: 0 2rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}
.section-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}
.section-header .see-all {
  font-size: 13px;
  color: var(--gold);
  font-weight: 600;
}
.section-header .see-all:hover { color: var(--gold-dark); }

/* ===================== POSTS GRID ===================== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto 4rem;
  padding: 0 2rem;
}
.post-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(157,128,70,.15);
}
.post-card-img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}
.post-card-img-placeholder {
  width: 100%;
  height: 190px;
  background: var(--cream-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
}
.post-card-body {
  padding: 1.1rem 1.25rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.post-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.45;
  margin-bottom: auto;
  padding-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-btn-full {
  display: block;
  text-align: center;
  background: var(--gold);
  color: var(--white);
  padding: 10px 16px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s;
  margin-top: 8px;
}
.post-card-btn-full:hover {
  background: var(--gold-dark);
  color: var(--white);
}

/* ===================== SINGLE ARTICLE ===================== */
.single-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

/* Title block */
.single-title {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 2rem;
}

/* Article body content */
.single-wrap .art-intro,
.single-wrap p {
  font-size: 15px;
  color: #444;
  line-height: 1.8;
  margin-bottom: 1rem;
}

/* Section titles from assembler HTML */
.single-wrap .art-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  border-left: 3px solid var(--gold);
  padding-left: 12px;
  margin: 0 0 1rem 0;
}

/* Why box */
.single-wrap .why-box {
  background: var(--gold-bg);
  border: 1px solid var(--cream-3);
  border-left: 3px solid var(--gold);
  border-radius: 6px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.single-wrap .why-box p {
  color: #4a3c24;
  font-size: 14px;
  line-height: 1.8;
  margin: 0;
}

/* Pros list */
.single-wrap .pros-list {
  list-style: none;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  padding: 0;
}
.single-wrap .pros-list li {
  padding: 12px 16px 12px 44px;
  position: relative;
  font-size: 14px;
  color: #3a3020;
  border-bottom: 1px solid var(--border);
  line-height: 1.6;
}
.single-wrap .pros-list li:last-child { border-bottom: none; }
.single-wrap .pros-list li::before {
  content: '✓';
  position: absolute;
  left: 14px;
  top: 12px;
  color: var(--gold);
  font-weight: 700;
  font-size: 14px;
}

/* Limits box */
.single-wrap .limits-box {
  background: #fdf6ea;
  border: 1px solid #e8d0a0;
  border-left: 3px solid #c4963a;
  border-radius: 6px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.single-wrap .limits-box p {
  color: #5a4010;
  font-size: 14px;
  line-height: 1.8;
  margin: 0;
}

/* For grid */
.single-wrap .for-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 1.5rem;
}
.single-wrap .for-col {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.1rem;
}
.single-wrap .for-col .col-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 8px;
  display: block;
}
.single-wrap .for-col.for-yes .col-title { color: #3d7a18; }
.single-wrap .for-col.for-no .col-title { color: #9d5f00; }
.single-wrap .for-col p,
.single-wrap .for-col ul {
  font-size: 13px;
  color: #5a5040;
  margin: 0;
  line-height: 1.65;
}
.single-wrap .for-col ul {
  list-style: none;
  padding: 0;
}
.single-wrap .for-col ul li {
  padding: 3px 0 3px 14px;
  position: relative;
  font-size: 13px;
  color: #5a5040;
}
.single-wrap .for-col.for-yes ul li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #3d7a18;
  font-weight: 700;
}
.single-wrap .for-col.for-no ul li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #9d5f00;
  font-weight: 700;
}

/* Verdict box */
.single-wrap .verdict-box {
  background: var(--gold-bg);
  border: 1px solid var(--cream-3);
  border-radius: 8px;
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.5rem;
}
.single-wrap .verdict-stars {
  color: var(--gold);
  font-size: 26px;
  letter-spacing: 2px;
  margin-bottom: 10px;
  line-height: 1;
}
.single-wrap .verdict-box p {
  color: #4a3c24;
  font-size: 14px;
  line-height: 1.8;
  margin: 0;
}

/* Amazon CTA */
.single-wrap .amazon-cta-wrap {
  text-align: center;
  margin: 2rem 0 0.5rem;
}
.single-wrap .amazon-cta-btn {
  display: inline-block;
  background: var(--gold);
  color: var(--white);
  font-weight: 700;
  font-size: 15px;
  padding: 15px 44px;
  border-radius: 4px;
  text-decoration: none;
  letter-spacing: .02em;
  transition: background .2s, transform .15s;
}
.single-wrap .amazon-cta-btn:hover {
  background: var(--gold-dark);
  color: var(--white);
  transform: translateY(-1px);
}
.single-wrap .amazon-disclaimer {
  text-align: center;
  font-size: 11px;
  color: var(--text-light);
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
  font-style: italic;
}

/* Section spacing fix — remove top margin from first element in blocks */
.single-wrap .why-box > *:first-child,
.single-wrap .limits-box > *:first-child,
.single-wrap .verdict-box > *:first-child { margin-top: 0; }

/* ===================== TRENDING / PAGE HERO ===================== */
.page-hero {
  background: linear-gradient(140deg, #1e1508 0%, #3d2e15 100%);
  padding: 3rem 2rem;
  text-align: center;
}
.page-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 30px;
  color: var(--white);
  font-weight: 700;
  margin-bottom: 8px;
}
.page-hero p { color: #c9a96e; font-size: 15px; margin: 0; }

/* ===================== PAGINATION ===================== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 1.5rem 2rem 4rem;
}
.pagination a,
.pagination span {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--white);
  text-decoration: none;
  transition: all .2s;
}
.pagination .current,
.pagination a:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--white);
}

/* ===================== FOOTER ===================== */
#site-footer {
  background: #1a1208;
  color: #c9a96e;
  padding: 3.5rem 2rem 0;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 3rem;
  max-width: 1100px;
  margin: 0 auto;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid #2e2010;
}
.footer-col h4 {
  color: var(--white);
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: #8a7a60; font-size: 13px; }
.footer-col ul li a:hover { color: var(--gold-light); }
.footer-col p { color: #8a7a60; font-size: 13px; line-height: 1.7; }
.footer-bottom {
  text-align: center;
  padding: 1.5rem 0;
  font-size: 12px;
  color: #5a4e38;
  max-width: 1100px;
  margin: 0 auto;
}

/* ===================== HIDE WP DEFAULTS ===================== */
.entry-header { display: none !important; }
.page-title-banner { display: none !important; }
.art-meta { display: none !important; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .posts-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero-section h1 { font-size: 28px; }
  .single-title { font-size: 24px; }
  .single-wrap .for-grid { grid-template-columns: 1fr; }
  #main-nav { display: none; }
  #main-nav.open {
    display: block;
    position: absolute;
    top: 68px; left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
  }
  #main-nav.open ul { flex-direction: column; gap: 1rem; }
  .menu-toggle { display: block; }
}
