/* ================================================
   blog.css — Estilos para artículos y blog
   alfombrasdebano.es
   ================================================ */

/* ---- Hereda variables de style.css ---- */
:root {
  --primary: #0084D6;
  --primary-dark: #005fa0;
  --accent: #ff9900;
  --dark: #002b5c;
  --text: #1a2535;
  --text-light: #5a6e80;
  --bg: #f4f8fc;
  --white: #ffffff;
  --border: #d5e5f5;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0,132,214,0.10);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 1rem;
}

/* ---- HEADER ---- */
header {
  background: linear-gradient(180deg, #0084D6 -50%, #002b5c 100%);
  color: #fff;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 20px;
}
.logo { text-decoration: none; display: flex; align-items: center; gap: 10px; }
nav { display: flex; gap: 6px; flex-wrap: wrap; }
nav a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background 0.2s;
}
nav a:hover { background: rgba(255,255,255,0.15); }
nav a.active { background: rgba(255,255,255,0.2); }

/* ---- BREADCRUMB ---- */
.breadcrumb {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 10px 24px;
  font-size: 0.82rem;
  color: var(--text-light);
}
.breadcrumb-inner { max-width: 1200px; margin: 0 auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.breadcrumb a { color: var(--primary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { opacity: 0.5; }

/* ---- ARTICLE LAYOUT ---- */
.article-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

/* ---- ARTICLE HERO ---- */
.article-hero {
  background: linear-gradient(180deg, #0084D6 -50%, #002b5c 100%);
  color: #fff;
  padding: 60px 24px;
  text-align: center;
}
.article-hero .category-tag {
  display: inline-block;
  background: var(--accent);
  color: #000;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}
.article-hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.25;
  max-width: 700px;
  margin: 0 auto 16px;
}
.article-hero .hero-meta {
  font-size: 0.85rem;
  opacity: 0.8;
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- ARTICLE CONTENT ---- */
.article-content { padding: 40px 0; }

.article-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark);
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--primary);
}
.article-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 28px 0 10px;
}
.article-content h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 20px 0 8px;
}
.article-content p { margin-bottom: 16px; color: var(--text); }
.article-content ul, .article-content ol {
  margin: 12px 0 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.article-content li { color: var(--text); }
.article-content strong { color: var(--dark); }
.article-content a { color: var(--primary); text-decoration: underline; }

/* ---- INTRO BOX ---- */
.intro-box {
  background: linear-gradient(135deg, #e6f4ff, #f0f8ff);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
  margin-bottom: 32px;
  font-size: 1rem;
}

/* ---- TABLE OF CONTENTS ---- */
.toc {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 36px;
}
.toc h4 { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--primary); margin-bottom: 12px; }
.toc ol { margin: 0 0 0 20px; }
.toc li { font-size: 0.9rem; margin-bottom: 4px; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--primary); text-decoration: underline; }

/* ---- PRODUCT REVIEW CARD ---- */
.review-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin: 24px 0;
  overflow: hidden;
}
.review-card-header {
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  flex-wrap: wrap;
}
.review-card-header .rank {
  font-size: 2rem;
  font-weight: 900;
  opacity: 0.3;
  line-height: 1;
}
.review-card-header .product-title {
  flex: 1;
  font-size: 1.05rem;
  font-weight: 700;
}
.review-card-header .stars-big {
  color: var(--accent);
  font-size: 1.1rem;
  white-space: nowrap;
}
.review-card-body {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0;
}
@media (max-width: 640px) {
  .review-card-body { grid-template-columns: 1fr; }
}
.review-card-img {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border-right: 1px solid var(--border);
}
.review-card-img img { max-width: 140px; max-height: 140px; object-fit: contain; }
.review-card-img .no-img {
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: var(--bg);
  border-radius: var(--radius);
}
.review-card-info { padding: 20px 24px; }
.review-card-info p { font-size: 0.9rem; color: var(--text-light); margin-bottom: 12px; }

/* ---- PROS/CONS ---- */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 12px 0;
}
@media (max-width: 480px) { .pros-cons { grid-template-columns: 1fr; } }
.pros, .cons {
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.85rem;
}
.pros { background: #f0fdf4; border: 1px solid #86efac; }
.cons { background: #fef2f2; border: 1px solid #fca5a5; }
.pros h4 { color: #16a34a; margin-bottom: 8px; font-size: 0.8rem; text-transform: uppercase; }
.cons h4 { color: #dc2626; margin-bottom: 8px; font-size: 0.8rem; text-transform: uppercase; }
.pros ul, .cons ul { margin: 0 0 0 16px; gap: 4px; }
.pros li::marker { color: #16a34a; }
.cons li::marker { color: #dc2626; }

/* ---- VERDICT + CTA ---- */
.review-card-footer {
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: #fafcff;
}
.verdict-score {
  display: flex;
  align-items: center;
  gap: 10px;
}
.score-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
}
.verdict-text { font-size: 0.82rem; color: var(--text-light); }
.verdict-label { font-weight: 700; color: var(--text); font-size: 0.95rem; }
.btn-ver-amazon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #000 !important;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none !important;
  transition: background 0.2s, transform 0.1s;
}
.btn-ver-amazon:hover { background: #e88900; transform: translateY(-1px); }
.btn-ver-amazon::after { content: ' →'; }

/* ---- COMPARISON TABLE ---- */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.88rem;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.compare-table th {
  background: var(--primary);
  color: #fff;
  padding: 12px 16px;
  text-align: left;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.compare-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.compare-table tr:last-child td { border-bottom: none; }
.compare-table tr:nth-child(even) td { background: #f8fbff; }
.compare-table .best { color: #16a34a; font-weight: 700; }
.compare-table .ok { color: var(--text-light); }

/* ---- HIGHLIGHT BOX ---- */
.tip-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 4px solid #f59e0b;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 0.9rem;
}
.tip-box strong { color: #92400e; }

.winner-box {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 2px solid #16a34a;
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 24px 0;
}
.winner-box h3 { color: #15803d; margin-bottom: 8px; }

/* ---- FAQ ---- */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
.faq-item summary {
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--dark);
  list-style: none;
  padding-right: 24px;
  position: relative;
  user-select: none;
}
.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 0;
  font-size: 1.2rem;
  color: var(--primary);
  transition: transform 0.2s;
}
.faq-item[open] summary::after { content: '−'; }
.faq-item p { margin-top: 10px; font-size: 0.9rem; color: var(--text-light); }

/* ---- BLOG CARD (en index) ---- */
.blog-card {
  display: block;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 24px;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow 0.2s, transform 0.2s;
  position: relative;
}
.blog-card:hover { box-shadow: 0 6px 24px rgba(0,132,214,0.18); transform: translateY(-3px); }
.blog-card-badge {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.blog-card h3 { font-size: 1rem; font-weight: 700; color: var(--dark); margin-bottom: 8px; }
.blog-card p { font-size: 0.85rem; color: var(--text-light); margin-bottom: 12px; }
.blog-read { font-size: 0.82rem; color: var(--primary); font-weight: 600; }

/* ---- BLOG LISTING ---- */
.blog-list-card {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 16px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow 0.2s, transform 0.2s;
  align-items: center;
}
.blog-list-card:hover { box-shadow: 0 6px 24px rgba(0,132,214,0.15); transform: translateY(-2px); }
.blog-list-num {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
  flex-shrink: 0;
}

/* ---- FOOTER ---- */
footer {
  background: #002b5c;
  color: rgba(255,255,255,0.85);
  padding: 40px 24px 24px;
  font-size: 0.85rem;
}
footer a { color: rgba(255,255,255,0.7); text-decoration: none; }
footer a:hover { text-decoration: underline; }
.disclaimer { font-size: 0.75rem; opacity: 0.6; margin-top: 8px; line-height: 1.5; }

/* ---- FAQ ITEMS (en home) ---- */
details.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  margin-bottom: 10px;
  background: var(--white);
  overflow: hidden;
}
details.faq-item summary {
  padding: 16px 20px;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
}
details.faq-item[open] summary { border-bottom: 1px solid var(--border); background: #f0f8ff; }
details.faq-item p { padding: 14px 20px; font-size: 0.9rem; color: var(--text-light); }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .article-wrap { padding: 24px 16px 40px; }
  .article-hero { padding: 40px 16px; }
  nav a { font-size: 0.78rem; padding: 5px 8px; }
}

/* ===== PRODUCT REVIEW CARD ===== */
.product-review-card {
  border: 1.5px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  margin: 28px 0;
  background: var(--white);
  box-shadow: 0 4px 18px rgba(0,132,214,0.10);
  transition: box-shadow 0.2s, transform 0.2s;
  position: relative;
}
.product-review-card:hover {
  box-shadow: 0 8px 28px rgba(0,132,214,0.16);
  transform: translateY(-2px);
}
.prc-badge {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 6px 18px;
  border-radius: 0 0 10px 0;
}
.prc-badge-rec { background: linear-gradient(135deg, #f0a500, #e88a00); }
.prc-badge-best { background: linear-gradient(135deg, #e85d00, #c0392b); color: #fff; }
.prc-body {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 0;
}
.prc-img {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: #e8f4fd;
}
.prc-img img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  transition: transform 0.25s;
}
.prc-img img:hover { transform: scale(1.05); }
.prc-info {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.prc-info h2 {
  font-size: 1.15rem;
  line-height: 1.3;
  color: var(--text);
  margin: 0 0 4px;
  border: none;
  padding: 0;
}
.prc-stars {
  font-size: 0.92rem;
  color: #f0a500;
  font-weight: 600;
}
.prc-stars span { color: var(--text-light); font-weight: 400; font-size: 0.82rem; }
.prc-price {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-dark);
}
.prc-price s {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-light);
  margin-left: 6px;
}
.prc-info p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-light);
  margin: 2px 0 6px;
}
.prc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0 8px;
}
.prc-tags span {
  background: #e8f4fd;
  color: var(--primary-dark);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
}
.prc-btn {
  display: inline-block;
  background: #ff9900;
  color: #111 !important;
  padding: 11px 24px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none !important;
  text-align: center;
  transition: background .2s, transform .15s;
  align-self: flex-start;
}
.prc-btn:hover { background: #e88a00; transform: scale(1.03); }

.table-btn {
  display: inline-block;
  background: #ff9900;
  color: #111 !important;
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background .2s;
}
.table-btn:hover { background: #e88a00; }

/* BLOG ARTICLE LAYOUT */
.blog-article {
  max-width: 820px;
  margin: 0 auto 60px;
  padding: 0 24px;
}
.blog-article-header {
  padding: 40px 0 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}
.blog-article-cat {
  display: inline-block;
  background: #e8f4fd;
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 12px;
  margin-bottom: 14px;
}
.blog-article-header h1 {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  line-height: 1.25;
  margin-bottom: 12px;
  color: var(--text);
}
.blog-article-meta { font-size: 0.85rem; color: var(--text-light); }
.blog-article-body h2 {
  font-size: 1.3rem;
  margin: 36px 0 14px;
  color: var(--text);
  border-left: 4px solid var(--primary);
  padding-left: 12px;
}
.blog-article-body p { margin-bottom: 16px; color: var(--text); line-height: 1.7; }

/* COMPARISON TABLE */
.table-responsive { overflow-x: auto; margin: 20px 0; }
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  min-width: 480px;
}
.comparison-table th {
  background: var(--primary);
  color: #fff;
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
}
.comparison-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.comparison-table tr:nth-child(even) td { background: #e8f4fd; }

/* QUICK PICK GRID */
.quick-pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 20px 0 32px;
}
.quick-pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  text-decoration: none !important;
  color: var(--text);
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.quick-pick:hover {
  box-shadow: 0 6px 20px rgba(0,132,214,0.14);
  transform: translateY(-3px);
  border-color: var(--primary);
}
.quick-pick img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 10px;
}
.quick-pick strong { font-size: 0.92rem; margin-bottom: 4px; color: var(--primary-dark); }
.quick-pick span { font-size: 0.82rem; color: var(--text-light); }

/* CATEGORY LINKS GRID */
.category-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 20px 0 32px;
}
.cat-link-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  text-decoration: none !important;
  color: var(--text);
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.cat-link-card:hover {
  box-shadow: 0 6px 20px rgba(0,132,214,0.14);
  transform: translateY(-3px);
  border-color: var(--primary);
}
.cat-link-card img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 10px;
}
.cat-link-card strong { font-size: 0.95rem; color: var(--primary-dark); margin-bottom: 4px; }
.cat-link-card span { font-size: 0.82rem; color: var(--text-light); }

/* CTA BOX */
.blog-cta-box {
  background: linear-gradient(135deg, var(--dark), #004080);
  color: #fff;
  padding: 32px;
  border-radius: 12px;
  text-align: center;
  margin: 36px 0;
}
.blog-cta-box h3 { font-size: 1.3rem; margin-bottom: 10px; }
.blog-cta-box p { color: rgba(255,255,255,0.85); margin-bottom: 18px; font-size: 0.95rem; }
.blog-cta-btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.2s;
}
.blog-cta-btn:hover { background: var(--primary-dark); }

/* FAQ */
.faq-item { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin-bottom: 10px; }
.faq-q { padding: 14px 18px; font-weight: 600; cursor: pointer; font-size: 0.95rem; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-q::after { content: '+'; font-size: 1.2rem; color: var(--primary); font-weight: 300; }
details[open] .faq-q::after { content: '−'; }
.faq-a { padding: 0 18px 14px; color: var(--text-light); font-size: 0.9rem; line-height: 1.65; }

/* MOBILE responsive */
@media (max-width: 640px) {
  .prc-body { grid-template-columns: 1fr; }
  .prc-img { padding: 16px; }
  .prc-img img { max-width: 200px; }
  .prc-info { padding: 18px; }
  .prc-info h2 { font-size: 1.05rem; }
  .quick-pick-grid { grid-template-columns: 1fr 1fr; }
  .category-links-grid { grid-template-columns: 1fr 1fr; }
}
