/*
Theme Name: AutoRelab
Theme URI: https://autorelab.example/
Author: AutoRelab
Author URI: https://autorelab.example/
Description: A clean, card-based WordPress theme for the AutoRelab smart home gadget affiliate review site. VoltPulse-inspired editorial layout with research-based review post type, star ratings, pros/cons, specs tables, and clearly marked Amazon affiliate links. No hands-on testing claims.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: autorelab
Tags: affiliate, reviews, smart-home, editorial, two-columns, custom-colors, custom-menu, featured-images, threaded-comments, translation-ready
*/

:root {
  --bg: #ffffff;
  --fg: #1c1917;
  --muted: #78716c;
  --muted-2: #a8a29e;
  --line: #e7e5e4;
  --line-soft: #f5f5f4;
  --amber: #fbbf24;
  --amber-soft: #fef3c7;
  --amber-deep: #78350f;
  --stone-50: #fafaf9;
  --radius: 1rem;
  --maxw: 80rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4 { letter-spacing: -0.025em; line-height: 1.15; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }
@media (min-width: 1024px) { .container { padding: 0 2rem; } }
.narrow { max-width: 48rem; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.site-header .inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem;
  height: 4rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
@media (min-width: 1024px) { .site-header .inner { padding: 0 2rem; } }
.brand { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.brand .badge {
  flex: 0 0 auto; width: 2.25rem; height: 2.25rem; border-radius: 0.375rem;
  background: var(--fg); color: #fff; font-size: 10px; font-weight: 700;
  letter-spacing: 0.05em; display: flex; align-items: center; justify-content: center;
}
.brand .name { font-size: 15px; font-weight: 600; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand .name span { font-weight: 400; color: var(--muted); }
@media (max-width: 640px) { .brand .name span { display: none; } }
.main-nav { display: flex; align-items: center; gap: 0.25rem; }
@media (min-width: 640px) { .main-nav { gap: 1rem; } }
.main-nav a {
  padding: 0.25rem 0.5rem; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent;
  transition: color .2s;
}
.main-nav a:hover, .main-nav a.active { color: var(--fg); font-weight: 500; border-bottom-color: var(--fg); }

/* ---------- Layout ---------- */
.site-main { padding-top: 4rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #fafaf9, rgba(254,243,199,0.3), #fafaf9);
}
.hero .top-line {
  position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(251,191,36,0.6), transparent);
}
.hero .inner { position: relative; max-width: var(--maxw); margin: 0 auto; padding: 5rem 1.5rem 4rem; }
@media (min-width: 1024px) { .hero .inner { padding: 7rem 2rem 6rem; } }
.hero .rule { width: 4rem; height: 1px; background: var(--muted-2); margin-bottom: 2rem; }
.hero h1 { font-size: clamp(3rem, 8vw, 6rem); font-weight: 700; }
.hero .lede { margin-top: 1.5rem; max-width: 42rem; font-size: 1.25rem; color: var(--muted); line-height: 1.7; }
.hero .stats { margin-top: 2rem; font-size: 14px; letter-spacing: 0.02em; color: var(--muted-2); display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.hero .stats b { color: #44403c; font-weight: 600; }
.hero .stats .star { color: var(--amber); }

/* ---------- Section heading ---------- */
.section { padding: 3.5rem 1.5rem; }
@media (min-width: 1024px) { .section { padding: 5rem 2rem; } }
.section.alt { background: var(--stone-50); }
.section-head { border-top: 1px solid var(--line); padding-top: 3rem; display: flex; flex-direction: column; gap: 1rem; }
@media (min-width: 640px) { .section-head { flex-direction: row; align-items: flex-end; justify-content: space-between; } }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 1.875rem); font-weight: 700; }
.section-head .accent { width: 3rem; height: 1px; background: var(--amber); margin-top: 0.75rem; }
.section-head .meta { font-size: 14px; color: var(--muted-2); }
.eyebrow { font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-2); }

/* ---------- Product grid / cards ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid.cols-2 { grid-template-columns: 1fr; }
.grid.cols-3 { grid-template-columns: 1fr; }
.grid.cols-4 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid.cols-3 { grid-template-columns: repeat(3, 1fr); } .grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  display: block; overflow: hidden; border-radius: var(--radius);
  border: 1px solid rgba(229,229,229,0.8); background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  transition: transform .5s ease, box-shadow .5s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(229,229,229,0.5); }
.card .media { position: relative; aspect-ratio: 16/10; overflow: hidden; background: #f3f4f6; }
.card .media .blur { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(16px); transform: scale(1.1); }
.card .media .shot { position: relative; width: 100%; height: 100%; object-fit: contain; transition: transform .7s ease; }
.card:hover .media .shot { transform: scale(1.05); }
.card .cat-tag {
  position: absolute; left: 0.75rem; top: 0.75rem; max-width: calc(100% - 4.5rem);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: rgba(0,0,0,0.8); color: #fff; font-size: 11px; font-weight: 600;
  padding: 0.25rem 0.6rem; border-radius: 999px; backdrop-filter: blur(4px);
}
.card .body { padding: 1.25rem; }
.card .rating { display: flex; align-items: center; gap: 0.25rem; margin-bottom: 0.375rem; }
.card .rating .star { color: var(--amber); width: 14px; height: 14px; }
.card .rating b { font-size: 12px; color: #1f2937; }
.card .title { font-size: 15px; font-weight: 700; line-height: 1.35; color: #111827; }
.card .excerpt { margin-top: 0.5rem; font-size: 13px; line-height: 1.6; color: #6b7280; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .price { margin-top: 0.75rem; font-size: 16px; font-weight: 700; color: #111827; }

/* ---------- Journal tiles ---------- */
.journal-tile { overflow: hidden; border-radius: var(--radius); border: 1px solid rgba(229,229,229,0.8); background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.journal-tile .swatch { min-height: 140px; display: flex; align-items: center; justify-content: center; padding: 2rem 1.5rem; text-align: center; }
.journal-tile .swatch h3 { font-size: 1.125rem; font-weight: 700; line-height: 1.3; }
.journal-tile .meta { padding: 1.25rem; }
.journal-tile .meta .t { font-size: 14px; font-weight: 600; color: var(--fg); }
.journal-tile .meta .e { margin-top: 0.5rem; font-size: 14px; line-height: 1.6; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.journal-tile .meta .d { margin-top: 1rem; font-size: 12px; color: var(--muted-2); }

/* ---------- Filter chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2.5rem; }
.chip { border: 1px solid var(--line); background: #fff; color: var(--muted); padding: 0.375rem 0.875rem; border-radius: 999px; font-size: 14px; transition: border-color .2s, color .2s; cursor: pointer; }
.chip:hover { border-color: var(--muted-2); color: var(--fg); }
.chip.active { background: var(--fg); border-color: var(--fg); color: #fff; }

/* ---------- Single review ---------- */
.review-hero { border-bottom: 1px solid var(--line-soft); background: linear-gradient(135deg, #fafaf9, rgba(254,243,199,0.2), #fafaf9); padding: 3rem 1.5rem; }
@media (min-width: 1024px) { .review-hero { padding: 4rem 2rem; } }
.review-hero .grid2 { max-width: var(--maxw); margin: 0 auto; display: grid; gap: 2.5rem; }
@media (min-width: 1024px) { .review-hero .grid2 { grid-template-columns: 1fr 1fr; align-items: center; } }
.review-hero .cat { font-size: 14px; color: var(--muted-2); }
.review-hero h1 { margin-top: 0.5rem; font-size: clamp(1.875rem, 4vw, 3rem); font-weight: 700; }
.review-hero .sub { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: 0.75rem; font-size: 14px; color: var(--muted); align-items: center; }
.review-hero .sub .stars b { color: #292524; font-weight: 600; }
.review-hero .sub .star { color: var(--amber); }
.review-hero .excerpt { margin-top: 1.5rem; font-size: 1.125rem; line-height: 1.7; color: #44403c; }
.review-hero .buy { margin-top: 2rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.review-hero .price { font-size: 1.5rem; font-weight: 700; }
.btn-amazon {
  display: inline-flex; align-items: center; gap: 0.5rem; border-radius: 999px;
  background: var(--fg); color: #fff; padding: 0.625rem 1.25rem; font-size: 14px; font-weight: 600;
  transition: background .2s;
}
.btn-amazon:hover { background: #292524; }
.review-hero .shotbox { position: relative; aspect-ratio: 4/3; overflow: hidden; border-radius: var(--radius); border: 1px solid rgba(229,229,229,0.8); background: #f3f4f6; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.review-hero .shotbox .blur { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(16px); transform: scale(1.1); }
.review-hero .shotbox .shot { position: relative; width: 100%; height: 100%; object-fit: contain; }
.badge-pill { display: inline-block; margin-top: 1rem; background: var(--amber-soft); color: var(--amber-deep); font-size: 12px; font-weight: 600; padding: 0.25rem 0.75rem; border-radius: 999px; }

.article-body { max-width: 48rem; margin: 0 auto; padding: 3.5rem 1.5rem; }
@media (min-width: 1024px) { .article-body { padding: 3.5rem 2rem; } }
.research-note { font-size: 12px; line-height: 1.6; color: var(--muted-2); }
.proscons { margin-top: 2.5rem; display: grid; gap: 2rem; }
@media (min-width: 640px) { .proscons { grid-template-columns: 1fr 1fr; } }
.proscons h2 { font-size: 1.125rem; font-weight: 700; }
.proscons .accent { width: 2.5rem; height: 1px; background: var(--amber); margin-top: 0.5rem; }
.proscons ul { margin-top: 1rem; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0.5rem; font-size: 14px; line-height: 1.6; color: #44403c; }
.proscons li { display: flex; gap: 0.5rem; }
.proscons .plus { color: #059669; }
.proscons .minus { color: #f43f5e; }

.specs { margin-top: 3rem; }
.specs h2 { font-size: 1.125rem; font-weight: 700; }
.specs .accent { width: 2.5rem; height: 1px; background: var(--amber); margin-top: 0.5rem; }
.specs dl { margin-top: 1rem; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.specs dl > div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.75rem 1rem; font-size: 14px; border-bottom: 1px solid var(--line-soft); }
.specs dl > div:last-child { border-bottom: 0; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; text-align: right; font-weight: 500; color: var(--fg); }

.notes { margin-top: 3rem; }
.notes h2 { font-size: 1.125rem; font-weight: 700; }
.notes .accent { width: 2.5rem; height: 1px; background: var(--amber); margin-top: 0.5rem; }
.notes .text { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 1rem; font-size: 15px; line-height: 1.7; color: #44403c; }

.verdict { margin-top: 3rem; border: 1px solid var(--line); background: var(--stone-50); border-radius: var(--radius); padding: 1.5rem; }
.verdict h2 { font-size: 1.125rem; font-weight: 700; }
.verdict p { margin-top: 0.75rem; font-size: 15px; line-height: 1.7; color: #44403c; }
.verdict .by { margin-top: 1rem; font-size: 12px; color: var(--muted-2); }

.buybox { margin-top: 2.5rem; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.buybox .label { font-size: 14px; color: var(--muted); }
.buybox .price { font-size: 1.25rem; font-weight: 700; }
.aff-note { margin-top: 0.75rem; font-size: 12px; color: var(--muted-2); }
.aff-note a { text-decoration: underline; }

.related { border-top: 1px solid var(--line-soft); background: var(--stone-50); padding: 3.5rem 1.5rem; }
@media (min-width: 1024px) { .related { padding: 3.5rem 2rem; } }
.related .inner { max-width: var(--maxw); margin: 0 auto; }
.related h2 { font-size: 1.5rem; font-weight: 700; }
.related .accent { width: 3rem; height: 1px; background: var(--amber); margin-top: 0.75rem; }

/* ---------- Page (disclosure) ---------- */
.page-hero { background: linear-gradient(135deg, #fafaf9, rgba(254,243,199,0.2), #fafaf9); padding: 4rem 1.5rem 2.5rem; }
@media (min-width: 1024px) { .page-hero { padding: 5rem 2rem 2.5rem; } }
.page-hero .inner { max-width: 48rem; margin: 0 auto; }
.page-hero .rule { width: 4rem; height: 1px; background: var(--muted-2); margin-bottom: 1.5rem; }
.page-hero h1 { font-size: clamp(2.25rem, 5vw, 3rem); font-weight: 700; }
.page-hero .lede { margin-top: 1rem; font-size: 1.125rem; line-height: 1.7; color: var(--muted); }

.page-body { padding: 3.5rem 1.5rem; }
@media (min-width: 1024px) { .page-body { padding: 3.5rem 2rem; } }
.page-body .inner { max-width: 48rem; margin: 0 auto; }
.steps { display: flex; flex-direction: column; gap: 2.2rem; }
.step { display: flex; gap: 1.25rem; }
.step .num { flex: 0 0 auto; width: 2rem; height: 2rem; border-radius: 999px; background: var(--fg); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.step h2 { font-size: 1.125rem; font-weight: 700; }
.step .accent { width: 2.5rem; height: 1px; background: var(--amber); margin-top: 0.5rem; }
.step p { margin-top: 0.75rem; font-size: 15px; line-height: 1.7; color: #44403c; }
.callout { margin-top: 2.5rem; border: 1px solid var(--line); background: var(--stone-50); border-radius: var(--radius); padding: 1.5rem; }
.callout h2 { font-size: 1.125rem; font-weight: 700; }
.callout p { margin-top: 0.75rem; font-size: 15px; line-height: 1.7; color: #44403c; }
.callout a, .page-body a.inline { font-weight: 500; text-decoration: underline; }

.disclosure-block { margin-bottom: 2rem; }
.disclosure-block h2 { font-size: 1.125rem; font-weight: 700; }
.disclosure-block .accent { width: 2.5rem; height: 1px; background: var(--amber); margin-top: 0.5rem; }
.disclosure-block p { margin-top: 0.75rem; font-size: 15px; line-height: 1.7; color: #44403c; }

/* ---------- 404 ---------- */
.notfound { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 8rem 1.5rem; }
.notfound .code { font-size: 14px; font-weight: 600; color: var(--muted-2); }
.notfound h1 { margin-top: 0.5rem; font-size: 1.875rem; font-weight: 700; }
.notfound p { margin-top: 0.75rem; color: var(--muted); }
.notfound .btn { margin-top: 2rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: #fff; }
.site-footer .top { max-width: var(--maxw); margin: 0 auto; padding: 3.5rem 1.5rem; display: grid; gap: 2.5rem; }
@media (min-width: 640px) { .site-footer .top { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .site-footer .top { grid-template-columns: 1fr 1fr 1fr; padding: 3.5rem 2rem; } }
.site-footer .brand-name { font-size: 1.125rem; font-weight: 700; }
.site-footer .desc { margin-top: 0.75rem; max-width: 20rem; font-size: 14px; line-height: 1.6; color: var(--muted); }
.site-footer .col-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }
.site-footer ul { margin-top: 1rem; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0.5rem; font-size: 14px; color: var(--muted); }
.site-footer ul a:hover { color: var(--fg); }
.site-footer .bottom { max-width: var(--maxw); margin: 0 auto; border-top: 1px solid var(--line-soft); padding: 2rem 1.5rem; }
@media (min-width: 1024px) { .site-footer .bottom { padding: 2rem 2rem; } }
.site-footer .disc { font-size: 12px; line-height: 1.6; color: var(--muted-2); }
.site-footer .copy { margin-top: 1rem; text-align: center; font-size: 12px; color: var(--muted-2); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 0.5rem; border-radius: 999px; background: var(--fg); color: #fff; padding: 0.625rem 1.25rem; font-size: 14px; font-weight: 600; transition: background .2s; }
.btn:hover { background: #292524; }
.show-more { margin-top: 3rem; display: flex; justify-content: center; }
.show-more button { display: inline-flex; align-items: center; gap: 0.5rem; border: 0; background: transparent; border-bottom: 1px solid var(--line); padding-bottom: 0.25rem; font-size: 14px; font-weight: 500; color: #44403c; cursor: pointer; transition: border-color .2s, color .2s; }
.show-more button:hover { border-color: var(--fg); color: var(--fg); }

/* ---------- Disclosure band ---------- */
.disc-band { background: var(--stone-50); border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); text-align: center; padding: 0.5rem 1rem; }
.disc-band a { text-decoration: underline; }
