/* ==========================================================================
   Mejores Calefactores — hoja de estilos
   Estilo: blog de nicho limpio (cabecera blanca, hero con foto, tarjetas,
   botones naranja para Amazon). Sin dependencias externas.
   ========================================================================== */

:root {
  --text: #222;
  --muted: #555;
  --light: #777;
  --link: #1e73be;
  --link-hover: #155a94;
  --bg: #fff;
  --bg-alt: #f7f8f9;
  --border: #e5e5e5;
  --amazon: #ff9900;
  --amazon-hover: #e68a00;
  --dark: #1b1f24;
  --max: 1200px;
  --content: 760px;
  --radius: 6px;
  --shadow: 0 2px 10px rgba(0, 0, 0, .06);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg-alt);
}

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

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

h1, h2, h3, h4 {
  font-weight: 400;
  line-height: 1.25;
  margin: 0 0 .6em;
  color: var(--text);
}
h1 { font-size: 2.4rem; }
h2 { font-size: 1.9rem; margin-top: 1.6em; }
h3 { font-size: 1.4rem; margin-top: 1.4em; }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1.2em; }
ul, ol { padding-left: 1.4em; margin: 0 0 1.2em; }
li { margin-bottom: .4em; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* --------------------------------------------------------------------------
   Cabecera
   -------------------------------------------------------------------------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  gap: 24px;
}
.brand {
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.01em;
  white-space: nowrap;
}
.brand:hover { color: var(--text); text-decoration: none; }
.main-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.main-nav a {
  color: var(--text);
  font-size: .93rem;
  padding: 10px 12px;
  border-radius: 4px;
}
.main-nav a:hover, .main-nav a.active { color: var(--link); text-decoration: none; }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 1.4rem;
  padding: 4px 12px;
  cursor: pointer;
  color: var(--text);
}

/* --------------------------------------------------------------------------
   Hero (portada)
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 460px;
  display: flex;
  align-items: flex-end;
  color: #fff;
  background: #333 center/cover no-repeat;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .65) 0%, rgba(0, 0, 0, .25) 55%, rgba(0, 0, 0, .1) 100%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  text-align: center;
  padding: 60px 24px 48px;
}
.hero h1 {
  color: #fff;
  font-size: 2.6rem;
  margin-bottom: .3em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .4);
}
.hero p {
  font-size: 1.15rem;
  margin: 0;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .5);
}

/* --------------------------------------------------------------------------
   Layout de página
   -------------------------------------------------------------------------- */
.page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
  padding: 40px 24px 60px;
}
.page.full { grid-template-columns: minmax(0, 1fr); }
.page > main { min-width: 0; }

.card, .content-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.content-box { padding: 32px; }

/* Sidebar */
.sidebar .widget {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 24px;
}
.sidebar h4 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 600;
  border-bottom: 2px solid var(--amazon);
  padding-bottom: 8px;
  display: inline-block;
}
.sidebar ul { list-style: none; padding: 0; margin: 0; }
.sidebar li { padding: 7px 0; border-bottom: 1px solid #f0f0f0; font-size: .95rem; }
.sidebar li:last-child { border-bottom: 0; }

/* --------------------------------------------------------------------------
   Rejilla de artículos (portada / categorías)
   -------------------------------------------------------------------------- */
.section-title {
  font-size: 1.9rem;
  margin: 0 0 24px;
}
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}
.post-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, transform .2s;
}
.post-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.post-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.post-card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.post-card h3 { font-size: 1.15rem; margin: 0 0 10px; }
.post-card p { color: var(--muted); font-size: .95rem; margin-bottom: 12px; flex: 1; }
.post-card .meta { font-size: .8rem; color: var(--light); }
.post-card .cat {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--amazon);
  font-weight: 600;
  margin-bottom: 8px;
}

/* Tarjetas de categoría */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}
.cat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: center;
  display: flex;
  flex-direction: column;
}
.cat-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.cat-card .body { padding: 22px 22px 26px; display: flex; flex-direction: column; flex: 1; }
.cat-card h3 { font-size: 1.25rem; margin: 0 0 10px; }
.cat-card p { font-size: .95rem; color: var(--muted); flex: 1; }
.btn-round {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--dark);
  color: #fff;
  font-size: .85rem;
  line-height: 1.15;
  text-align: center;
  margin: 0 auto;
  transition: background .2s;
}
.btn-round:hover { background: var(--link); color: #fff; text-decoration: none; }

/* Lista "Encuentra el calefactor..." */
.finder ol { padding-left: 1.3em; }
.finder li { margin-bottom: 12px; }
.finder li strong a { font-size: 1.05rem; }

/* CTA final */
.cta {
  background: var(--dark);
  color: #fff;
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: center;
  margin-bottom: 24px;
}
.cta h2 { color: #fff; margin-top: 0; }
.cta p { color: #ccc; max-width: 560px; margin: 0 auto 20px; }

/* --------------------------------------------------------------------------
   Botones
   -------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 4px;
  background: var(--link);
  color: #fff;
  font-weight: 600;
  border: 0;
  cursor: pointer;
  font-size: 1rem;
}
.btn:hover { background: var(--link-hover); color: #fff; text-decoration: none; }

.btn-amazon {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 4px;
  background: var(--amazon);
  color: #111;
  font-weight: 600;
  font-size: .98rem;
  box-shadow: 0 2px 0 #c77700;
  margin: 8px 0 20px;
}
.btn-amazon:hover { background: var(--amazon-hover); color: #111; text-decoration: none; }
.btn-amazon::after { content: " →"; }

/* --------------------------------------------------------------------------
   Artículo
   -------------------------------------------------------------------------- */
.article {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
}
.article .featured { border-radius: var(--radius); margin-bottom: 28px; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.article header h1 { margin-bottom: .3em; }
.article .meta { color: var(--light); font-size: .85rem; margin-bottom: 24px; }
.article .meta a { color: var(--link); }
.article h2 { border-bottom: 1px solid var(--border); padding-bottom: .3em; }
.article table { width: 100%; border-collapse: collapse; margin: 0 0 1.5em; font-size: .93rem; }
.article th, .article td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; vertical-align: top; }
.article th { background: var(--bg-alt); font-weight: 600; }
.article tbody th { background: #fff; }
.table-wrap { overflow-x: auto; margin-bottom: 1.5em; }
.table-wrap table { margin-bottom: 0; }

.disclosure {
  background: #fff8e6;
  border-left: 4px solid var(--amazon);
  padding: 14px 18px;
  font-size: .92rem;
  margin: 0 0 28px;
  border-radius: 0 4px 4px 0;
}
.disclosure p { margin: 0; }

.product { margin-bottom: 34px; padding-bottom: 8px; border-bottom: 1px dashed var(--border); }
.product:last-of-type { border-bottom: 0; }
.pros-cons { list-style: none; padding: 0; margin: 0 0 1em; }
.pros-cons li { padding-left: 1.6em; position: relative; }
.pros-cons li::before { content: "✔"; position: absolute; left: 0; color: #2e8b57; }
.pros-cons li.con::before { content: "✘"; color: #c0392b; }

.callout {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 0 0 1.5em;
}
.callout p:last-child { margin-bottom: 0; }

.faq h3 { font-size: 1.15rem; font-weight: 600; margin-top: 1.4em; }

.related { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); }
.related h2 { border: 0; font-size: 1.4rem; }
.related ul { list-style: none; padding: 0; }
.related li { padding: 6px 0; }

.category-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 40px 0;
}
.category-header h1 { margin: 0 0 .3em; }
.category-header p { margin: 0; color: var(--muted); max-width: 720px; }

/* Lista de entradas en categoría (formato resumen grande) */
.post-list .post-card { flex-direction: row; }
.post-list .post-card > a { flex: 0 0 38%; display: block; }
.post-list .post-card img { width: 100%; height: 100%; aspect-ratio: auto; min-height: 240px; }
.post-list .post-card .body { padding: 26px 28px; }
.post-list .post-card h3 { font-size: 1.5rem; }
.post-list .post-card p { font-size: 1rem; }

/* Formulario contacto */
.form-row { margin-bottom: 18px; }
.form-row label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .95rem; }
.form-row input, .form-row textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font: inherit;
  background: #fff;
}
.form-row textarea { min-height: 160px; resize: vertical; }
.form-row input[type="checkbox"] { width: auto; margin-right: 6px; vertical-align: middle; }

/* --------------------------------------------------------------------------
   Pie de página
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--dark);
  color: #bbb;
  font-size: .92rem;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding: 48px 24px 32px;
}
.site-footer h4 { color: #fff; font-weight: 600; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #ddd; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid #333;
  padding: 18px 24px;
  text-align: center;
  font-size: .82rem;
  color: #888;
}
.footer-bottom p { margin: 0 0 6px; }

/* Aviso de cookies */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  max-width: 720px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 6px 30px rgba(0, 0, 0, .15);
  padding: 18px 22px;
  font-size: .9rem;
  display: flex;
  gap: 18px;
  align-items: center;
  z-index: 100;
}
.cookie-banner p { margin: 0; flex: 1; }
.cookie-banner .btn { padding: 9px 18px; font-size: .9rem; }
.cookie-banner .btn.secondary { background: #eee; color: var(--text); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1000px) {
  .page { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  h1 { font-size: 1.9rem; }
  h2 { font-size: 1.55rem; }
  .hero { min-height: 380px; }
  .hero h1 { font-size: 1.9rem; }
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: #fff;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 8px 16px 16px;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 8px; border-bottom: 1px solid #f0f0f0; }
  .article, .content-box { padding: 22px; }
  .post-list .post-card { flex-direction: column; }
  .post-list .post-card > a { flex: none; }
  .post-list .post-card img { width: 100%; height: auto; min-height: 0; aspect-ratio: 16 / 10; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .cookie-banner { flex-direction: column; align-items: stretch; text-align: center; }
}
