/*
Theme Name: NoCreditBed
Theme URI: https://www.nocreditbed.com
Author: NoCreditBed
Description: Custom affiliate theme for NoCreditBed.com — mattress reviews, comparisons, and brand-direct financing guides.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: nocreditbed
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;900&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #0d1b2a;
  --accent: #f4a61f;
  --accent2: #e8520a;
  --light: #f8f9fa;
  --muted: #6b7a8d;
  --white: #ffffff;
  --radius: 14px;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--light);
  color: var(--navy);
  line-height: 1.6;
}

img { max-width: 100%; height: auto; }
a { color: inherit; }

/* =====================
   NAV
   ===================== */
.site-header {
  background: var(--navy);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.site-logo {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--white);
  text-decoration: none;
  letter-spacing: -0.5px;
}
.site-logo span { color: var(--accent); }
.main-nav ul { display: flex; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.main-nav a {
  color: #aab4be;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.2s;
}
.main-nav a:hover,
.main-nav .current-menu-item a,
.main-nav .current_page_item a { color: var(--accent); }

/* =====================
   HERO (front page)
   ===================== */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #1e3a5f 60%, #2a5298 100%);
  color: var(--white);
  text-align: center;
  padding: 80px 2rem 90px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(244,166,31,0.18) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -80px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(232,82,10,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero-badge {
  display: inline-block;
  background: var(--accent);
  color: var(--navy);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 900;
  line-height: 1.1;
  max-width: 760px;
  margin: 0 auto 20px;
}
.hero h1 span { color: var(--accent); }
.hero p {
  font-size: 1.15rem;
  color: #aab4be;
  max-width: 560px;
  margin: 0 auto 36px;
}
.hero-cta {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: var(--white);
  font-weight: 700;
  font-size: 1rem;
  padding: 16px 36px;
  border-radius: 50px;
  text-decoration: none;
  box-shadow: 0 4px 24px rgba(244,166,31,0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}
.hero-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(244,166,31,0.5); }

/* =====================
   TRUST BAR
   ===================== */
.trust-bar {
  background: var(--white);
  border-bottom: 1px solid #e8ecf0;
  padding: 16px 2rem;
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

/* =====================
   SECTION / LAYOUT
   ===================== */
.section-wrap { padding: 64px 2rem; max-width: 1100px; margin: 0 auto; }
.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent2);
  margin-bottom: 10px;
}
.section-wrap h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 12px;
}
.subhead { color: var(--muted); font-size: 1rem; max-width: 540px; margin-bottom: 40px; }

/* =====================
   PRODUCT CARDS
   ===================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid #e8ecf0;
  display: flex;
  flex-direction: column;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 8px 32px rgba(0,0,0,0.13); }
.card-img {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}
.card-img.blue { background: linear-gradient(135deg, #e8f0fe, #c5d8ff); }
.card-img.orange { background: linear-gradient(135deg, #fff3e0, #ffd8a8); }
.card-img.green { background: linear-gradient(135deg, #e8f5e9, #b2dfdb); }
.card-img.purple { background: linear-gradient(135deg, #f3e5f5, #d1b3f5); }
.card-body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.card-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 50px;
  margin-bottom: 12px;
}
.tag-best { background: #fef9c3; color: #92400e; }
.tag-value { background: #dcfce7; color: #166534; }
.tag-luxury { background: #f3e8ff; color: #7e22ce; }
.tag-new { background: #fee2e2; color: #991b1b; }
.card-body h3 { font-size: 1.2rem; font-weight: 800; margin-bottom: 6px; }
.stars { color: var(--accent); font-size: 0.9rem; margin-bottom: 8px; }
.card-body p { font-size: 0.88rem; color: var(--muted); flex: 1; margin-bottom: 16px; }
.card-price { font-size: 1.3rem; font-weight: 900; color: var(--navy); margin-bottom: 14px; }
.card-price del { font-size: 0.85rem; font-weight: 400; color: var(--muted); margin-left: 6px; }
.btn {
  display: block;
  text-align: center;
  padding: 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
}
.btn:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: var(--white); }

/* =====================
   FINANCING SECTION
   ===================== */
.financing-section {
  background: linear-gradient(135deg, var(--navy), #1e3a5f);
  color: var(--white);
  border-radius: 20px;
  padding: 56px 48px;
  display: flex;
  gap: 48px;
  align-items: center;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: 0 auto 64px;
}
.financing-text { flex: 1; min-width: 260px; }
.financing-text .section-label { color: var(--accent); }
.financing-text h2 { color: var(--white); margin-bottom: 16px; font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 900; }
.financing-text p { color: #aab4be; margin-bottom: 28px; }
.financing-features { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 16px; }
.feat-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.08);
}
.feat-icon { font-size: 1.4rem; flex-shrink: 0; }
.feat-item strong { display: block; font-size: 0.95rem; margin-bottom: 2px; }
.feat-item span { font-size: 0.82rem; color: #8a9bb0; }

/* =====================
   CATEGORIES
   ===================== */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}
.cat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  text-decoration: none;
  color: var(--navy);
  border: 2px solid transparent;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: all 0.2s;
}
.cat-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.cat-icon { font-size: 2rem; margin-bottom: 8px; }
.cat-card strong { display: block; font-size: 0.9rem; font-weight: 700; }

/* =====================
   REVIEWS
   ===================== */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.review-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid #e8ecf0;
}
.review-stars { color: var(--accent); font-size: 1rem; margin-bottom: 10px; }
.review-text { font-size: 0.9rem; color: #444; margin-bottom: 16px; font-style: italic; }
.reviewer { display: flex; align-items: center; gap: 10px; }
.reviewer-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem; color: var(--white);
}
.avatar-blue { background: #3b82f6; }
.avatar-green { background: #10b981; }
.avatar-purple { background: #8b5cf6; }
.reviewer-name { font-weight: 700; font-size: 0.88rem; }
.reviewer-sub { font-size: 0.78rem; color: var(--muted); }

/* =====================
   BLOG INDEX
   ===================== */
.blog-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #1e3a5f 100%);
  color: var(--white);
  text-align: center;
  padding: 60px 2rem;
}
.blog-hero h1 { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 900; margin-bottom: 12px; }
.blog-hero p { color: #aab4be; font-size: 1.05rem; max-width: 500px; margin: 0 auto; }

.blog-container { max-width: 1100px; margin: 0 auto; padding: 48px 2rem; }

.featured-post {
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--white); border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 2px 20px rgba(0,0,0,0.08);
  margin-bottom: 48px; border: 1px solid #e8ecf0;
  text-decoration: none; color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
}
.featured-post:hover { transform: translateY(-3px); box-shadow: 0 8px 32px rgba(0,0,0,0.13); }
.featured-img {
  background: linear-gradient(135deg, #0d1b2a, #2a5298);
  display: flex; align-items: center; justify-content: center;
  font-size: 5rem; min-height: 280px;
}
.featured-body { padding: 36px; display: flex; flex-direction: column; justify-content: center; }
.post-category { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--accent2); margin-bottom: 10px; }
.featured-body h2 { font-size: 1.5rem; font-weight: 900; line-height: 1.25; margin-bottom: 12px; }
.featured-body p { font-size: 0.9rem; color: var(--muted); margin-bottom: 20px; }
.post-meta { font-size: 0.78rem; color: var(--muted); }
.read-more { display: inline-block; margin-top: 16px; font-weight: 700; font-size: 0.88rem; color: var(--accent2); }

.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.post-card {
  background: var(--white); border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid #e8ecf0; text-decoration: none; color: inherit;
  display: flex; flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}
.post-card:hover { transform: translateY(-4px); box-shadow: 0 8px 28px rgba(0,0,0,0.12); }
.post-card-img { height: 160px; display: flex; align-items: center; justify-content: center; font-size: 3rem; background: linear-gradient(135deg, #e8f0fe, #c5d8ff); }
.post-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.post-card-body h3 { font-size: 1rem; font-weight: 800; line-height: 1.3; margin-bottom: 8px; }
.post-card-body p { font-size: 0.83rem; color: var(--muted); flex: 1; margin-bottom: 14px; }
.post-card-footer { display: flex; justify-content: space-between; align-items: center; font-size: 0.75rem; color: var(--muted); border-top: 1px solid #f0f2f5; padding-top: 12px; }
.cat-pill { background: #fff3e0; color: #92400e; padding: 3px 10px; border-radius: 50px; font-weight: 700; font-size: 0.7rem; }

.section-divider { margin: 48px 0 28px; }
.section-divider h2 { font-size: 1.3rem; font-weight: 900; border-left: 4px solid var(--accent); padding-left: 14px; }

/* =====================
   SINGLE POST (ARTICLE)
   ===================== */
.breadcrumb {
  background: var(--white); border-bottom: 1px solid #e8ecf0;
  padding: 12px 2rem; font-size: 0.8rem; color: var(--muted);
  max-width: 1100px; margin: 0 auto;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent2); }
.breadcrumb span { margin: 0 6px; }

.article-wrap { max-width: 1100px; margin: 0 auto; padding: 40px 2rem; display: grid; grid-template-columns: 1fr 320px; gap: 40px; }

article.post {
  background: var(--white); border-radius: var(--radius);
  padding: 40px; box-shadow: 0 2px 16px rgba(0,0,0,0.07);
  border: 1px solid #e8ecf0;
}
.article-category { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--accent2); margin-bottom: 10px; }
article.post h1 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 900; line-height: 1.2; margin-bottom: 14px; }
.article-meta { font-size: 0.8rem; color: var(--muted); margin-bottom: 24px; display: flex; gap: 16px; flex-wrap: wrap; }

.verdict-box {
  background: linear-gradient(135deg, #fff8ec, #fff3d6);
  border: 2px solid var(--accent); border-radius: 12px; padding: 24px; margin: 28px 0;
}
.verdict-box h3 { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--accent2); margin-bottom: 12px; }
.verdict-score { font-size: 2.5rem; font-weight: 900; color: var(--navy); line-height: 1; margin-bottom: 4px; }
.verdict-stars { color: var(--accent); font-size: 1.1rem; margin-bottom: 10px; }
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.pros h4 { color: #166534; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; margin-bottom: 8px; }
.cons h4 { color: #991b1b; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; margin-bottom: 8px; }
.pros li, .cons li { font-size: 0.85rem; margin-left: 16px; margin-bottom: 4px; }

.entry-content h2 { font-size: 1.3rem; font-weight: 900; margin: 32px 0 12px; padding-top: 8px; border-top: 2px solid #f0f2f5; }
.entry-content h3 { font-size: 1.05rem; font-weight: 700; margin: 20px 0 8px; }
.entry-content p { font-size: 0.95rem; color: #333; margin-bottom: 16px; }
.entry-content ul, .entry-content ol { margin: 0 0 16px 20px; }
.entry-content li { font-size: 0.92rem; color: #333; margin-bottom: 6px; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 16px 0 24px; font-size: 0.88rem; }
.entry-content th { background: var(--navy); color: var(--white); padding: 10px 14px; text-align: left; }
.entry-content td { padding: 10px 14px; border-bottom: 1px solid #f0f2f5; }
.entry-content tr:nth-child(even) td { background: #f9fafb; }

.cta-block {
  background: linear-gradient(135deg, var(--navy), #1e3a5f);
  border-radius: 12px; padding: 28px; margin: 32px 0; text-align: center; color: var(--white);
}
.cta-block h3 { font-size: 1.1rem; font-weight: 900; margin-bottom: 8px; }
.cta-block p { font-size: 0.85rem; color: #aab4be; margin-bottom: 18px; }
.cta-btn {
  display: inline-block; background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: var(--white); font-weight: 700; font-size: 0.9rem;
  padding: 13px 28px; border-radius: 50px; text-decoration: none;
}

/* =====================
   SIDEBAR
   ===================== */
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.sidebar-card {
  background: var(--white); border-radius: var(--radius);
  padding: 24px; box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid #e8ecf0;
}
.sidebar-card h3 { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin-bottom: 14px; }
.toc-list { list-style: none; padding: 0; }
.toc-list li { margin-bottom: 8px; }
.toc-list a { font-size: 0.85rem; color: var(--navy); text-decoration: none; font-weight: 600; display: flex; gap: 8px; }
.toc-list a:hover { color: var(--accent2); }
.toc-list a::before { content: "→"; color: var(--accent); flex-shrink: 0; }
.disclosure { font-size: 0.78rem; color: var(--muted); line-height: 1.5; background: #f9fafb; border-radius: 8px; padding: 14px; border: 1px solid #e8ecf0; }

/* =====================
   FOOTER
   ===================== */
.site-footer {
  background: var(--navy);
  color: #8a9bb0;
  text-align: center;
  padding: 40px 2rem;
  margin-top: 40px;
  font-size: 0.82rem;
  line-height: 1.8;
}
.site-footer a { color: var(--accent); text-decoration: none; }
.footer-logo { font-size: 1.2rem; font-weight: 900; color: var(--white); margin-bottom: 10px; }
.footer-logo span { color: var(--accent); }
.footer-nav { margin: 10px 0; }
.footer-nav a { margin: 0 8px; }
.footer-disc { max-width: 640px; margin: 16px auto 0; opacity: 0.7; }

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 768px) {
  .article-wrap { grid-template-columns: 1fr; }
  .pros-cons { grid-template-columns: 1fr; }
  .featured-post { grid-template-columns: 1fr; }
  .featured-img { min-height: 180px; }
  article.post { padding: 24px; }
  .financing-section { padding: 36px 24px; }
  .main-nav { display: none; }
}
