/* ============================================================
   CoolHomeHub — Main Stylesheet
   All site styles live here and are enqueued via functions.php
   ============================================================ */

/* ── Variables & Reset ──────────────────────────────────── */
:root {
  --ice: #E8F4FD;
  --sky: #1A8FD1;
  --deep: #0D3B5E;
  --frost: #F0F9FF;
  --text: #1A1A2E;
  --muted: #5E7A8A;
  --white: #FFFFFF;
  --accent: #FF6B35;
  --green: #1DB954;
  --shadow: 0 2px 20px rgba(13, 59, 94, 0.08);
  --radius: 12px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'DM Sans', sans-serif; color: var(--text); background: var(--white); line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ── Navigation ─────────────────────────────────────────── */
#site-nav {
  background: var(--deep);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 12px rgba(0,0,0,.2);
}
.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.logo {
  font-family: 'DM Serif Display', serif;
  font-size: 1.4rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}
.logo span { color: #64D2FF; }
.logo img { height: 36px; width: auto; }

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  flex: 1;
  justify-content: center;
}
.nav-links a {
  color: rgba(255,255,255,.75);
  font-size: .85rem;
  font-weight: 500;
  transition: color .2s;
}
.nav-links a:hover { color: #64D2FF; }

.nav-cta {
  background: #64D2FF;
  color: var(--deep);
  padding: 8px 18px;
  border-radius: 20px;
  font-size: .82rem;
  font-weight: 700;
  white-space: nowrap;
  transition: opacity .2s;
  flex-shrink: 0;
}
.nav-cta:hover { opacity: .85; }

/* Hamburger (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: .2s;
}

/* ── Utility ─────────────────────────────────────────────── */
.wrap          { max-width: 1100px; margin: 0 auto; padding: 4rem 2rem; }
.wrap.tight    { padding: 3rem 2rem; }
.bg-frost      { background: var(--frost); }
.label         { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--sky); margin-bottom: .4rem; }
.title         { font-family: 'DM Serif Display', serif; font-size: 2.2rem; color: var(--deep); margin-bottom: .4rem; line-height: 1.2; }
.subtitle      { color: var(--muted); font-size: .95rem; margin-bottom: 2.5rem; }
.tag           { font-size: .7rem; font-weight: 700; color: var(--sky); text-transform: uppercase; letter-spacing: .06em; }
.art-meta      { display: flex; gap: 1rem; font-size: .73rem; color: var(--muted); flex-wrap: wrap; }
.art-link      { display: inline-flex; align-items: center; gap: 4px; color: var(--sky); font-weight: 700; font-size: .85rem; margin-top: 1rem; }

/* Buttons */
.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 700;
  font-size: .95rem;
  transition: transform .2s, box-shadow .2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255,107,53,.35); }

.btn-ghost {
  display: inline-block;
  background: rgba(255,255,255,.1);
  color: #fff;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 500;
  font-size: .95rem;
  border: 1px solid rgba(255,255,255,.25);
  transition: background .2s;
}
.btn-ghost:hover { background: rgba(255,255,255,.18); }

.amz-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 9px 14px;
  border-radius: 6px;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .2s;
  text-decoration: none;
}
.amz-btn:hover { opacity: .85; color: #fff; }

.amz-btn-sm {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: .72rem;
  font-weight: 700;
  text-decoration: none;
  margin-top: 4px;
}

/* Badges */
.badge-best { background: #E6F9EE; color: #1DB954; font-size: .68rem; font-weight: 700; padding: 3px 9px; border-radius: 4px; display: inline-block; margin-bottom: 6px; }
.badge-new  { background: #FFF0E8; color: #FF6B35; font-size: .68rem; font-weight: 700; padding: 3px 9px; border-radius: 4px; display: inline-block; margin-bottom: 6px; }

/* Stars */
.stars { color: #FFB800; font-size: .82rem; }
.star-count { color: var(--muted); font-size: .72rem; }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #0D3B5E 0%, #1A5B8A 55%, #1A8FD1 100%);
  padding: 5rem 2rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--white);
  clip-path: ellipse(55% 100% at 50% 100%);
}
.badge {
  display: inline-block;
  background: rgba(100,210,255,.18);
  border: 1px solid rgba(100,210,255,.4);
  color: #64D2FF;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.hero h1 { font-family: 'DM Serif Display', serif; font-size: 3.2rem; color: #fff; max-width: 680px; margin: 0 auto 1rem; line-height: 1.15; }
.hero h1 em { color: #64D2FF; font-style: normal; }
.hero p  { color: rgba(255,255,255,.72); font-size: 1.05rem; max-width: 480px; margin: 0 auto 2rem; }
.cta-row { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2.5rem; }
.trust-row { display: flex; gap: 2rem; justify-content: center; flex-wrap: wrap; }
.trust-item { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,.6); font-size: .8rem; }
.trust-dot { width: 7px; height: 7px; border-radius: 50%; background: #64D2FF; flex-shrink: 0; }

/* ── Category Grid ───────────────────────────────────────── */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; }
.cat-card {
  background: var(--frost);
  border: 1.5px solid #D4E9F5;
  border-radius: var(--radius);
  padding: 1.5rem 1rem 1.2rem;
  text-align: center;
  transition: all .2s;
  display: block;
}
.cat-card:hover { background: var(--sky); border-color: var(--sky); transform: translateY(-3px); }
.cat-card:hover .cat-name, .cat-card:hover .cat-n { color: #fff; }
.cat-emoji { font-size: 2rem; margin-bottom: .6rem; display: block; }
.cat-name  { font-weight: 600; font-size: .88rem; color: var(--deep); display: block; line-height: 1.3; }
.cat-n     { font-size: .72rem; color: var(--muted); display: block; margin-top: 3px; }

/* ── Featured Articles ───────────────────────────────────── */
.art-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; }
.art-main { background: #fff; border: 1px solid #DCF0FA; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.art-main-img {
  height: 200px;
  background: linear-gradient(135deg, #1A8FD1, #0D3B5E);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4.5rem;
  position: relative;
  overflow: hidden;
}
.art-main-img img { width: 100%; height: 100%; object-fit: cover; }
.art-flag { position: absolute; top: 14px; left: 14px; background: var(--accent); color: #fff; padding: 4px 10px; border-radius: 5px; font-size: .68rem; font-weight: 700; }
.art-body { padding: 1.5rem; }
.art-body h3 { font-family: 'DM Serif Display', serif; font-size: 1.45rem; color: var(--deep); margin: .5rem 0; line-height: 1.25; }
.art-body h3 a { color: inherit; }
.art-body p  { color: var(--muted); font-size: .88rem; }

.art-sidebar { display: flex; flex-direction: column; gap: .9rem; }
.art-side {
  background: #fff;
  border: 1px solid #DCF0FA;
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  gap: 12px;
  box-shadow: var(--shadow);
  transition: border-color .2s;
}
.art-side:hover { border-color: var(--sky); }
.art-side-thumb { width: 54px; height: 54px; border-radius: 8px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; overflow: hidden; }
.art-side-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.art-side h4  { font-size: .84rem; font-weight: 600; color: var(--deep); line-height: 1.3; }
.art-side h4 a { color: inherit; }
.art-side span { font-size: .7rem; color: var(--muted); }

/* ── Product Cards ───────────────────────────────────────── */
.prod-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.prod-card { background: #fff; border: 1px solid #DCF0FA; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); transition: transform .2s; }
.prod-card:hover { transform: translateY(-4px); }
.prod-img { height: 155px; background: var(--frost); display: flex; align-items: center; justify-content: center; font-size: 3.5rem; overflow: hidden; }
.prod-img img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.prod-body { padding: 1.2rem; }
.prod-body h4 { font-size: .92rem; font-weight: 600; color: var(--deep); margin-bottom: 4px; line-height: 1.35; }
.prod-body h4 a { color: inherit; }
.prod-body p  { font-size: .78rem; color: var(--muted); line-height: 1.55; margin-bottom: .9rem; }
.prod-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.prod-price { font-size: 1.05rem; font-weight: 700; color: var(--deep); }
.prod-price small { font-size: .68rem; font-weight: 400; color: var(--muted); }

/* ── Latest / Archive Grid ───────────────────────────────── */
.latest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.latest-card { background: #fff; border: 1px solid #DCF0FA; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); transition: transform .2s; }
.latest-card:hover { transform: translateY(-3px); }
.latest-thumb { display: block; height: 160px; background: var(--frost); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.latest-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.latest-thumb:hover img { transform: scale(1.03); }
.thumb-placeholder { font-size: 3rem; }
.latest-body { padding: 1.2rem; }
.latest-body h3 { font-family: 'DM Serif Display', serif; font-size: 1.1rem; color: var(--deep); margin: .4rem 0 .5rem; line-height: 1.3; }
.latest-body h3 a { color: inherit; }
.latest-body p  { font-size: .82rem; color: var(--muted); line-height: 1.55; margin-bottom: .6rem; }
.latest-meta { display: flex; gap: .75rem; font-size: .72rem; color: var(--muted); flex-wrap: wrap; }

/* ── Single Article ──────────────────────────────────────── */
.article-hero { background: var(--frost); border-bottom: 1px solid #DCF0FA; }
.article-hero h1 { font-family: 'DM Serif Display', serif; font-size: 2.2rem; color: var(--deep); margin: .5rem 0; line-height: 1.2; max-width: 760px; }

.article-layout { display: grid; grid-template-columns: 1fr 320px; gap: 3rem; }
.article-feat-img { border-radius: var(--radius); overflow: hidden; margin-bottom: 2rem; }
.article-feat-img img { width: 100%; height: 380px; object-fit: cover; }

/* Product Snapshot */
.product-snapshot {
  display: flex;
  gap: 1.5rem;
  background: var(--frost);
  border: 1.5px solid #D4E9F5;
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}
.snapshot-left { flex-shrink: 0; width: 180px; }
.snapshot-left img { border-radius: 8px; width: 100%; }
.snap-placeholder { font-size: 4rem; display: flex; align-items: center; justify-content: center; height: 140px; }
.snapshot-right { flex: 1; }
.snapshot-title { font-family: 'DM Serif Display', serif; font-size: 1.3rem; color: var(--deep); margin: .4rem 0 .5rem; }
.spec-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; margin: .75rem 0; }
.spec-item { background: #fff; border: 1px solid #DCF0FA; border-radius: 8px; padding: .5rem .75rem; }
.spec-label { font-size: .68rem; font-weight: 700; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; display: block; margin-bottom: 2px; }
.spec-val { font-size: .88rem; font-weight: 600; color: var(--deep); }
.snapshot-cta { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; flex-wrap: wrap; }
.snap-price { font-size: 1.4rem; font-weight: 700; color: var(--deep); }
.snap-disclaimer { font-size: .68rem; color: var(--muted); margin-top: .35rem; }

/* Article body WordPress content */
.article-body { max-width: 760px; }
.article-body h2 { font-family: 'DM Serif Display', serif; font-size: 1.7rem; color: var(--deep); margin: 2rem 0 .75rem; }
.article-body h3 { font-size: 1.2rem; font-weight: 600; color: var(--deep); margin: 1.5rem 0 .5rem; }
.article-body p  { font-size: 1rem; color: var(--text); line-height: 1.8; margin-bottom: 1.25rem; }
.article-body ul, .article-body ol { margin: 0 0 1.25rem 1.5rem; }
.article-body li { font-size: 1rem; line-height: 1.7; color: var(--text); margin-bottom: .3rem; }
.article-body a  { color: var(--sky); text-decoration: underline; }
.article-body blockquote { border-left: 4px solid var(--sky); padding: 1rem 1.5rem; background: var(--frost); border-radius: 0 8px 8px 0; margin: 1.5rem 0; color: var(--muted); font-style: italic; }
.article-body img { border-radius: var(--radius); margin: 1rem 0; }
.article-body table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .9rem; }
.article-body th { background: var(--deep); color: #fff; padding: 10px 14px; text-align: left; font-weight: 600; font-size: .82rem; }
.article-body td { padding: 10px 14px; border-bottom: 1px solid #DCF0FA; }
.article-body tr:nth-child(even) td { background: var(--frost); }

.article-bottom-cta { background: linear-gradient(135deg, #E6F4FB, var(--frost)); border: 1.5px solid #D4E9F5; border-radius: var(--radius); padding: 1.5rem; margin: 2rem 0; display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.article-bottom-cta p { font-weight: 600; color: var(--deep); font-size: .95rem; flex: 1; }
.article-tags { margin: 1.5rem 0; font-size: .82rem; color: var(--muted); }
.article-tags a { color: var(--sky); }

/* Sidebar */
.article-sidebar { position: relative; }
.sidebar-widget { background: #fff; border: 1px solid #DCF0FA; border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.5rem; box-shadow: var(--shadow); }
.sidebar-widget img { border-radius: 8px; width: 100%; margin-bottom: .75rem; }
.widget-title { font-family: 'DM Serif Display', serif; font-size: 1.1rem; color: var(--deep); margin-bottom: 1rem; padding-bottom: .5rem; border-bottom: 1px solid #DCF0FA; }
.sidebar-buy-box { position: sticky; top: 80px; }
.related-item { display: block; padding: .6rem 0; border-bottom: 1px solid #DCF0FA; }
.related-item:last-child { border-bottom: none; }
.related-item h4 { font-size: .84rem; font-weight: 600; color: var(--deep); line-height: 1.3; margin-bottom: 2px; }
.related-item span { font-size: .7rem; color: var(--muted); }
.related-item:hover h4 { color: var(--sky); }

/* Sidebar top products widget */
.sidebar-top-products { display: flex; flex-direction: column; gap: .75rem; }
.sidebar-product { display: flex; gap: 10px; align-items: flex-start; }
.sidebar-product img { width: 52px; height: 52px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.sp-info { flex: 1; }
.sp-title { font-size: .82rem; font-weight: 600; color: var(--deep); line-height: 1.3; display: block; margin-bottom: 2px; }
.sp-title:hover { color: var(--sky); }
.sp-price { font-size: .88rem; font-weight: 700; color: var(--deep); display: block; margin-top: 2px; }

/* ── Archive page ────────────────────────────────────────── */
.archive-hero { background: var(--frost); border-bottom: 1px solid #DCF0FA; }
.archive-hero h1 { font-family: 'DM Serif Display', serif; font-size: 2rem; color: var(--deep); margin-bottom: .5rem; }
.archive-desc { color: var(--muted); font-size: .95rem; }
.archive-layout { display: grid; grid-template-columns: 1fr 280px; gap: 3rem; }
.archive-sidebar { position: relative; }

/* ── Pagination ──────────────────────────────────────────── */
.pagination { margin-top: 3rem; text-align: center; }
.pagination .page-numbers { display: inline-flex; gap: .5rem; flex-wrap: wrap; justify-content: center; }
.pagination a, .pagination span { padding: 8px 14px; border: 1px solid #DCF0FA; border-radius: 6px; font-size: .85rem; color: var(--text); transition: all .2s; }
.pagination a:hover { background: var(--sky); color: #fff; border-color: var(--sky); }
.pagination .current { background: var(--sky); color: #fff; border-color: var(--sky); }

/* ── Footer ──────────────────────────────────────────────── */
#site-footer { background: var(--deep); color: rgba(255,255,255,.58); padding: 3.5rem 2rem 2rem; }
.foot-inner { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
.foot-brand h3 { font-family: 'DM Serif Display', serif; color: #fff; font-size: 1.25rem; margin-bottom: .6rem; }
.foot-brand p  { font-size: .8rem; line-height: 1.65; max-width: 250px; }
.foot-col h4   { color: #fff; font-size: .82rem; font-weight: 700; margin-bottom: .9rem; text-transform: uppercase; letter-spacing: .05em; }
.foot-col ul   { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.foot-col ul li a { color: rgba(255,255,255,.52); font-size: .8rem; transition: color .2s; }
.foot-col ul li a:hover { color: #64D2FF; }
.foot-bar {
  max-width: 1100px;
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex;
  justify-content: space-between;
  font-size: .73rem;
  flex-wrap: wrap;
  gap: .5rem;
}
.disclosure {
  max-width: 1100px;
  margin: 1.5rem auto 0;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: .73rem;
  line-height: 1.65;
}
.disclosure strong { color: rgba(255,255,255,.82); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 960px) {
  .article-layout  { grid-template-columns: 1fr; }
  .archive-layout  { grid-template-columns: 1fr; }
  .archive-sidebar { display: none; }
  .sidebar-buy-box { position: static; }
  .product-snapshot { flex-direction: column; }
  .snapshot-left { width: 100%; max-width: 260px; }
  .foot-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 60px; left: 0; right: 0; background: var(--deep); padding: 1rem 2rem; gap: .75rem; box-shadow: 0 8px 20px rgba(0,0,0,.2); }
  .hero h1 { font-size: 2.1rem; }
  .art-grid { grid-template-columns: 1fr; }
  .title  { font-size: 1.8rem; }
  .latest-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .wrap { padding: 2.5rem 1.25rem; }
  .hero { padding: 3.5rem 1.25rem 3rem; }
  .hero h1 { font-size: 1.75rem; }
  .foot-inner { grid-template-columns: 1fr; }
  .spec-grid { grid-template-columns: 1fr; }
}
