/* ============================================
   CleanHomeTech - Modern Affiliate Site
   Design: Clean, Authoritative, Trust-building
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #ffffff;
  --bg-alt: #f8f9fa;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: #eff6ff;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --star: #f59e0b;
  --success: #10b981;
  --danger: #ef4444;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --radius: 8px;
  --radius-lg: 12px;
  --max-width: 1100px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html { font-size: 17px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* --- Typography --- */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; color: var(--text); }
h1 { font-size: 2.2rem; letter-spacing: -0.02em; margin-bottom: 0.5rem; }
h2 { font-size: 1.6rem; margin: 2.5rem 0 1rem; }
h3 { font-size: 1.25rem; margin: 1.5rem 0 0.75rem; }
p { margin-bottom: 1.2rem; color: #374151; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

/* --- Layout --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }

/* --- Header --- */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  z-index: 100;
}
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.35rem; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 1.5rem; list-style: none; }
.nav-links a { color: var(--text-muted); font-size: 0.9rem; font-weight: 500; }
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* --- Hero --- */
.hero {
  padding: 3.5rem 0 2.5rem;
  text-align: center;
}
.hero h1 { font-size: 2.6rem; margin-bottom: 0.75rem; }
.hero p { font-size: 1.15rem; color: var(--text-muted); max-width: 600px; margin: 0 auto 1.5rem; }
.hero .badge {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  padding: 0.3rem 0.9rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 1rem;
}

/* --- Featured Grid --- */
.section-title {
  font-size: 1.3rem;
  margin: 2rem 0 1.2rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
  background: var(--bg);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card-img {
  height: 200px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border-light);
  overflow: hidden;
  position: relative;
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.card:hover .card-img img { transform: scale(1.04); }

/* Product showcase card (CSS-only, no external images) */
.product-showcase {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}
.product-showcase::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(255,255,255,0.7) 0%, transparent 60%);
  z-index: 0;
}
.product-showcase .ps-icon {
  font-size: 2.5rem;
  margin-bottom: 0.6rem;
  position: relative;
  z-index: 1;
  filter: grayscale(0.3);
}
.product-showcase .ps-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #475569;
  text-align: center;
  position: relative;
  z-index: 1;
  line-height: 1.3;
}
.product-showcase .ps-tag {
  font-size: 0.65rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.3rem;
  position: relative;
  z-index: 1;
}
.product-showcase.blue   { background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 60%, #bfdbfe 100%); }
.product-showcase.amber  { background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 60%, #fde68a 100%); }
.product-showcase.green  { background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 60%, #bbf7d0 100%); }
.product-showcase.pink   { background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 60%, #fbcfe8 100%); }
.product-showcase.slate  { background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 60%, #e2e8f0 100%); }
.product-showcase.purple { background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 60%, #e9d5ff 100%); }
.card-body { padding: 1.25rem; }
.card-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 0.3rem;
}
.card-title {
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
  line-height: 1.3;
}
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--accent); text-decoration: none; }
.card-meta { font-size: 0.8rem; color: var(--text-muted); }
.card-excerpt { font-size: 0.9rem; color: var(--text-muted); margin-top: 0.5rem; }

/* --- Product Table (used in reviews) --- */
.product-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}
.product-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  background: var(--bg-alt);
  font-weight: 600;
  border-bottom: 2px solid var(--border);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}
.product-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-light);
}
.product-table tr:hover td { background: var(--accent-light); }
.stars { color: var(--star); font-size: 1.1rem; letter-spacing: 2px; }
.stars .empty { color: #d1d5db; }

/* --- CTA Button --- */
.btn {
  display: inline-block;
  padding: 0.7rem 1.8rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.15s;
  cursor: pointer;
  border: none;
  text-align: center;
}
.btn-primary {
  background: var(--accent);
  color: #fff !important;
  text-decoration: none !important;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-secondary {
  background: var(--bg);
  color: var(--accent) !important;
  border: 1.5px solid var(--accent);
  text-decoration: none !important;
}
.btn-secondary:hover { background: var(--accent-light); }
.btn-lg { padding: 0.9rem 2.2rem; font-size: 1rem; }

/* --- Placeholder Images (swap with real product photos in production) --- */
.placeholder-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  text-align: center;
  padding: 1rem;
  position: relative;
}
.placeholder-img::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 40%, rgba(255,255,255,0.6) 0%, transparent 60%);
}
.placeholder-img span {
  position: relative;
  z-index: 1;
}

/* --- Article Hero Image --- */
.article-hero-img {
  width: 100%;
  max-width: 900px;
  margin: 0 auto 1.5rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.article-hero-img img {
  width: 100%;
  height: auto;
  display: block;
}

/* --- Image with Caption --- */
.figure {
  margin: 2rem 0;
}
.figure img {
  width: 100%;
  border-radius: var(--radius);
  display: block;
}
.figure figcaption {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.5rem;
  font-style: italic;
}

/* --- Side-by-side comparison images --- */
.compare-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}
.compare-row .compare-item {
  text-align: center;
}
.compare-row .compare-item img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
}
.compare-row .compare-item span {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

/* --- Product Card (in review) --- */
.product-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 1.5rem 0;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}
.product-card .product-img {
  width: 220px;
  flex-shrink: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-light);
  background: #fff;
}
.product-card .product-img img {
  width: 100%;
  height: auto;
  display: block;
}
.product-card.best { border-color: var(--accent); border-width: 2px; background: var(--accent-light); }
.product-card .rank {
  width: 40px; height: 40px;
  background: var(--text);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}
.product-card.best .rank { background: var(--accent); }
.product-card .product-info { flex: 1; }
.product-card .product-name { font-size: 1.2rem; margin: 0 0 0.3rem; }
.product-card .product-price { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 0.5rem; }
.product-card .product-pros { list-style: none; margin: 0.5rem 0; }
.product-card .product-pros li { padding: 0.2rem 0; font-size: 0.85rem; color: var(--text-muted); }
.product-card .product-pros li::before { content: "+ "; color: var(--success); font-weight: 700; }

/* --- Article Content --- */
.article-header {
  padding: 2.5rem 0 1.5rem;
  text-align: center;
}
.article-header h1 { font-size: 2.4rem; }
.article-header .byline { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.5rem; }
.article-header .disclosure {
  font-size: 0.75rem;
  color: var(--text-light);
  background: var(--bg-alt);
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  margin-top: 1rem;
  display: inline-block;
}
.article-body { max-width: 750px; margin: 0 auto; padding: 1rem 0 3rem; }
.article-body h2 { border-bottom: 1px solid var(--border-light); padding-bottom: 0.5rem; }
.article-body ul, .article-body ol { margin: 0 0 1.2rem 1.5rem; }
.article-body li { margin-bottom: 0.4rem; color: #374151; }

/* --- Verdict Box --- */
.verdict {
  background: linear-gradient(135deg, #eff6ff, #f0fdf4);
  border: 2px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  margin: 2.5rem 0;
}
.verdict h3 { margin-top: 0; }
.verdict .btn { margin-top: 0.75rem; }

/* --- FAQ --- */
.faq-item {
  border-bottom: 1px solid var(--border-light);
  padding: 1rem 0;
}
.faq-item summary {
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
}
.faq-item p { margin-top: 0.5rem; font-size: 0.9rem; }

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  margin-top: 4rem;
  background: var(--bg-alt);
  font-size: 0.85rem;
  color: var(--text-muted);
}
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1.5rem; }
.footer-col h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.75rem; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.4rem; }
.footer-col ul li a { color: var(--text-muted); }
.footer-bottom { text-align: center; padding-top: 1.5rem; margin-top: 1.5rem; border-top: 1px solid var(--border); }

/* --- Breadcrumb --- */
.breadcrumb { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 1rem; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb span { margin: 0 0.4rem; }

/* --- Responsive --- */
@media (max-width: 768px) {
  html { font-size: 16px; }
  h1 { font-size: 1.8rem; }
  .hero h1 { font-size: 1.9rem; }
  .featured-grid { grid-template-columns: 1fr; }
  .product-card { flex-direction: column; }
  .product-card .product-img { width: 100%; max-width: 300px; }
  .nav-links { gap: 0.8rem; }
  .article-body { padding: 1rem 0 2rem; }
  .compare-row { grid-template-columns: 1fr; }
}
