/* ============================================
   GlycolicAcidCleanser.com - Main Stylesheet
   Design: Editorial Skincare / Natural Refined
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=Nunito+Sans:wght@300;400;600;700&display=swap');

/* --- Variables --- */
:root {
  --bg: #faf8f5;
  --white: #ffffff;
  --text: #252422;
  --text-light: #6b6460;
  --heading: #1a1a1a;
  --accent: #4a7c59;
  --accent-dark: #3a6347;
  --amber: #c17f5b;
  --amber-dark: #a56a47;
  --border: #e2ddd8;
  --light: #f0ece7;
  --star: #e8a020;
  --max-width: 1100px;
  --radius: 8px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 17px;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  color: var(--heading);
  line-height: 1.2;
  font-weight: 600;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 0.5em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: 0.5em; }
h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); margin-bottom: 0.4em; }
h4 { font-size: 1.1rem; margin-bottom: 0.3em; }

p { margin-bottom: 1.2em; }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: 1.5em; margin-bottom: 1.2em; }
li { margin-bottom: 0.4em; }

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

.content-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
}

@media (max-width: 768px) {
  .content-grid { grid-template-columns: 1fr; }
  .sidebar { order: 2; }
}

/* --- Header --- */
.site-header {
  background: var(--heading);
  color: var(--white);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.site-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.01em;
  text-decoration: none;
}

.site-logo span { color: #7ec898; }

.site-nav { display: flex; gap: 24px; list-style: none; padding: 0; margin: 0; }
.site-nav a { color: rgba(255,255,255,0.85); font-size: 0.88rem; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; text-decoration: none; transition: color 0.2s; }
.site-nav a:hover { color: #7ec898; text-decoration: none; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; color: white; font-size: 1.4rem; }

@media (max-width: 700px) {
  .site-nav { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--heading); padding: 16px 20px; gap: 16px; }
  .site-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .header-inner { position: relative; }
}

/* --- Hero Banner --- */
.hero {
  background: linear-gradient(135deg, #2d4a38 0%, #1a2e22 100%);
  color: var(--white);
  padding: 72px 20px;
  text-align: center;
}

.hero h1 { color: var(--white); font-size: clamp(2rem, 6vw, 3.6rem); max-width: 700px; margin: 0 auto 0.4em; }
.hero p { color: rgba(255,255,255,0.8); max-width: 560px; margin: 0 auto 1.6em; font-size: 1.1rem; }
.hero-sub { font-size: 0.85rem !important; color: rgba(255,255,255,0.5) !important; margin-top: 12px !important; }

/* --- Buttons & CTAs --- */
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: var(--radius);
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary { background: var(--amber); color: white; }
.btn-primary:hover { background: var(--amber-dark); color: white; text-decoration: none; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(193,127,91,0.35); }

.btn-green { background: var(--accent); color: white; }
.btn-green:hover { background: var(--accent-dark); color: white; text-decoration: none; transform: translateY(-1px); }

.btn-outline { border: 2px solid var(--border); color: var(--text); background: transparent; }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* Amazon CTA box */
.amazon-cta {
  background: linear-gradient(135deg, #fff8f3, #fef3e8);
  border: 1px solid #f0c896;
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 24px 0;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.amazon-cta-text { flex: 1; min-width: 200px; }
.amazon-cta-text strong { display: block; font-size: 1rem; color: var(--heading); }
.amazon-cta-text span { font-size: 0.85rem; color: var(--text-light); }
.amazon-logo { font-size: 0.8rem; color: var(--text-light); margin-top: 6px; display: block; }

/* --- Product Cards --- */
.product-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  transition: box-shadow 0.2s;
}

.product-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08); }

.product-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }

.product-rank {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--border);
  line-height: 1;
  flex-shrink: 0;
}

.product-meta { flex: 1; }
.product-badge {
  display: inline-block;
  background: var(--accent);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 3px;
  margin-bottom: 6px;
}

.product-badge.budget { background: var(--amber); }
.product-badge.pro { background: #6b4c8e; }

.stars { color: var(--star); font-size: 0.9rem; margin: 4px 0; }
.stars-text { color: var(--text-light); font-size: 0.82rem; }

.product-summary { font-size: 0.95rem; color: var(--text); margin: 12px 0; }

.product-pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 16px 0;
}

@media (max-width: 500px) { .product-pros-cons { grid-template-columns: 1fr; } }

.pros, .cons { font-size: 0.88rem; }
.pros strong { color: var(--accent); }
.cons strong { color: #c05c5c; }
.pros li::marker { color: var(--accent); }
.cons li::marker { color: #c05c5c; }

/* --- Comparison Table --- */
.comparison-table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 0.9rem; }
.comparison-table th { background: var(--heading); color: white; padding: 12px 14px; text-align: left; font-family: 'Nunito Sans', sans-serif; font-weight: 600; }
.comparison-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); }
.comparison-table tr:nth-child(even) td { background: #f7f5f2; }
.comparison-table tr:hover td { background: #f0ece7; }
.check { color: var(--accent); font-weight: bold; }
.cross { color: #c05c5c; }

/* --- Callout Boxes --- */
.callout {
  border-left: 4px solid var(--accent);
  background: #f0f7f3;
  padding: 16px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 24px 0;
}

.callout.warning { border-color: var(--amber); background: #fdf7f1; }
.callout.info { border-color: #5b8ec0; background: #f1f5fa; }

.callout strong { display: block; margin-bottom: 6px; font-size: 0.9rem; letter-spacing: 0.03em; text-transform: uppercase; color: var(--accent); }
.callout.warning strong { color: var(--amber); }
.callout.info strong { color: #3a6ea5; }

/* --- Article Content --- */
.article-header {
  background: var(--light);
  padding: 52px 20px 40px;
  border-bottom: 1px solid var(--border);
}

.article-header .breadcrumb { font-size: 0.8rem; color: var(--text-light); margin-bottom: 12px; }
.article-header .breadcrumb a { color: var(--text-light); }
.article-header .breadcrumb a:hover { color: var(--accent); }

.article-meta { display: flex; align-items: center; gap: 20px; margin-top: 16px; flex-wrap: wrap; }
.article-meta span { font-size: 0.83rem; color: var(--text-light); }
.article-meta .author { font-weight: 600; color: var(--text); }

.article-body { padding: 40px 0; }
.article-body h2 { margin-top: 2em; border-top: 1px solid var(--border); padding-top: 1em; }
.article-body h2:first-child { margin-top: 0; border-top: none; padding-top: 0; }

/* --- Sidebar --- */
.sidebar-widget {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}

.sidebar-widget h4 {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.sidebar-links { list-style: none; padding: 0; }
.sidebar-links li { padding: 6px 0; border-bottom: 1px solid var(--light); font-size: 0.9rem; }
.sidebar-links li:last-child { border-bottom: none; }

.toc { counter-reset: toc; }
.toc li { counter-increment: toc; list-style: none; }
.toc li::before { content: counter(toc) ". "; color: var(--text-light); font-size: 0.85rem; }

/* --- Page Sections --- */
.section { padding: 56px 0; }
.section-alt { background: var(--light); }
.section-title { text-align: center; margin-bottom: 0.3em; }
.section-subtitle { text-align: center; color: var(--text-light); max-width: 580px; margin: 0 auto 2.5em; }

/* --- Feature Grid --- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; margin-top: 32px; }
.feature-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.feature-icon { font-size: 1.8rem; margin-bottom: 12px; }
.feature-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.feature-card p { font-size: 0.9rem; color: var(--text-light); margin: 0; }

/* --- Rating Block --- */
.rating-block {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: center;
  background: var(--light);
  border-radius: var(--radius);
  padding: 24px;
  margin: 24px 0;
}

.rating-score { text-align: center; }
.rating-number { font-family: 'Cormorant Garamond', serif; font-size: 3.5rem; font-weight: 700; color: var(--accent); line-height: 1; }
.rating-out-of { font-size: 0.85rem; color: var(--text-light); }

.rating-bars { font-size: 0.88rem; }
.rating-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.rating-bar-label { width: 110px; color: var(--text-light); }
.rating-bar-track { flex: 1; height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.rating-bar-fill { height: 100%; background: var(--accent); border-radius: 4px; }

/* --- Footer --- */
.site-footer {
  background: var(--heading);
  color: rgba(255,255,255,0.7);
  padding: 48px 20px 24px;
  margin-top: 64px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  max-width: var(--max-width);
  margin: 0 auto 32px;
}

@media (max-width: 600px) { .footer-grid { grid-template-columns: 1fr; gap: 24px; } }

.footer-brand p { font-size: 0.88rem; margin-top: 10px; max-width: 300px; }
.footer-col h5 { color: white; font-family: 'Nunito Sans', sans-serif; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 14px; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: rgba(255,255,255,0.6); font-size: 0.88rem; text-decoration: none; }
.footer-col a:hover { color: white; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-bottom p { font-size: 0.8rem; margin: 0; }
.footer-disclaimer { font-size: 0.78rem; color: rgba(255,255,255,0.45); max-width: var(--max-width); margin: 16px auto 0; text-align: center; }

/* --- Utility --- */
.text-center { text-align: center; }
.text-light { color: var(--text-light); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: 1em; }
.mb-2 { margin-bottom: 2em; }

.tag {
  display: inline-block;
  background: var(--light);
  color: var(--text-light);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 3px;
  margin-right: 6px;
}

.divider { border: none; border-top: 1px solid var(--border); margin: 2em 0; }

/* --- Table of Contents Box --- */
.toc-box {
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 28px 0;
}

.toc-box h4 {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-light);
  margin-bottom: 12px;
}

.toc-box ol { margin: 0; padding-left: 1.2em; }
.toc-box li { margin-bottom: 5px; font-size: 0.92rem; }

/* --- FAQ Section --- */
.faq-item { border-bottom: 1px solid var(--border); padding: 18px 0; }
.faq-item:last-child { border-bottom: none; }
.faq-q { font-family: 'Cormorant Garamond', serif; font-size: 1.15rem; font-weight: 600; margin-bottom: 8px; }
.faq-a { font-size: 0.93rem; color: var(--text); }

/* Print */
@media print { .site-header, .site-footer, .sidebar, .amazon-cta { display: none; } }

/* ─── Image & Figure Styles ─── */
figure { margin: 0; }
figcaption { font-style: italic; }

/* Clearfix for floated figures */
.article-body::after, .main-content::after {
  content: "";
  display: table;
  clear: both;
}

/* Review hero - make article-header text white when it has background-image */
.article-header[style*="url("] h1,
.article-header[style*="url("] .breadcrumb,
.article-header[style*="url("] .article-meta span {
  color: rgba(255,255,255,0.9);
}

/* Product card image strip responsive fix */
@media (max-width: 600px) {
  .product-card > div[style*="height:200px"] { height: 150px !important; }
  figure[style*="float:right"] { float: none !important; width: 100% !important; margin: 0 0 24px 0 !important; }
}

/* Lazy-loaded image fade-in */
img[loading="lazy"] { opacity: 0; transition: opacity 0.4s ease; }
img[loading="lazy"].loaded { opacity: 1; }
