/* ============================================
   CompraDeTemporada.com — Global Styles
   Light Editorial Theme · Mobile-First · Conversion
   ============================================ */

/* --- Google Fonts --- */

/* --- CSS Variables --- */
:root {
  /* Palette — Light Editorial */
  --bg-primary: #ffffff;
  --bg-secondary: #f5f3ef;
  --bg-card: #ffffff;
  --bg-card-hover: #faf9f6;
  --bg-highlight: #f5f3ef;

  --text-primary: #2b2b28;
  --text-secondary: #6b6b66;
  --text-muted: #9a9a94;

  --accent: #d95d39;
  --accent-hover: #c24a28;
  --accent-glow: rgba(217, 93, 57, 0.12);
  --accent-secondary: #4a5343;

  --badge-best: #d95d39;
  --badge-popular: #d95d39;
  --badge-value: #4a5343;

  --border: #e5e2db;
  --border-light: #eeece6;

  --star: #e0a020;
  --pro: #4a5343;
  --con: #c0442e;

  /* Typography */
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'Outfit', system-ui, sans-serif;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  /* Shadows */
  --shadow-card: 0 2px 12px rgba(43,43,40,0.06);
  --shadow-hover: 0 8px 32px rgba(43,43,40,0.10);
  --shadow-glow: 0 4px 20px rgba(217, 93, 57, 0.15);

  /* Widths */
  --max-width: 1140px;
  --max-width-narrow: 800px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container--narrow {
  max-width: var(--max-width-narrow);
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-primary);
  line-height: 1.25;
}

h1 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  margin-bottom: var(--space-lg);
}

h2 {
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  margin-bottom: var(--space-md);
}

h3 {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  margin-bottom: var(--space-sm);
}

p {
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

/* --- Header / Nav --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: var(--space-md) 0;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.site-logo span {
  color: var(--accent);
}

.site-nav {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
}

.site-nav a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: color 0.2s ease;
}

.site-nav a:hover {
  color: var(--accent);
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  transition: 0.3s;
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: var(--space-lg);
    gap: var(--space-md);
  }
  .site-nav.active { display: flex; }
}

/* --- Hero Section --- */
.hero {
  padding: var(--space-3xl) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero__subtitle {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: var(--space-sm);
  font-weight: 600;
}

.hero__title {
  font-size: clamp(2rem, 6vw, 3.2rem);
  max-width: 700px;
  margin: 0 auto var(--space-lg);
}

.hero__desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto var(--space-xl);
}

/* --- Breadcrumbs --- */
.breadcrumbs {
  padding: var(--space-md) 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.breadcrumbs a {
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: var(--accent);
}

.breadcrumbs span {
  margin: 0 var(--space-xs);
}

/* --- Category Cards (Homepage) --- */
.categories-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  padding: var(--space-2xl) 0;
}

@media (min-width: 600px) {
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
}

.cat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.cat-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
  transform: translateY(-4px);
}

/* Imagen de categoría (banner superior de la card) */
.cat-card__img {
  width: 100%;
  height: 160px;
  background: var(--bg-secondary);
  overflow: hidden;
  position: relative;
}

.cat-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.cat-card:hover .cat-card__img img {
  transform: scale(1.05);
}

/* Todo el contenido de texto va con padding */
.cat-card__title {
  padding: var(--space-lg) var(--space-lg) 0;
}

.cat-card__desc {
  padding: 0 var(--space-lg);
}

.cat-card__link {
  margin: 0 var(--space-lg) var(--space-lg);
}

.cat-card__icon {
  font-size: 2rem;
  margin-bottom: var(--space-md);
  padding: var(--space-lg) var(--space-lg) 0;
}

.cat-card__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: var(--space-sm);
}

.cat-card__desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.cat-card__link {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.cat-card__link::after {
  content: '→';
  transition: transform 0.2s;
}

.cat-card:hover .cat-card__link::after {
  transform: translateX(4px);
}

/* --- Section Dividers --- */
.section {
  padding: var(--space-3xl) 0;
}

.section__label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: var(--space-sm);
  font-weight: 600;
}

.section__title {
  margin-bottom: var(--space-lg);
}

/* ============================================
   COMPARISON TABLE — High Conversion
   ============================================ */
.comp-table-wrap {
  margin: var(--space-xl) 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
  overflow: hidden;
}

.comp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  table-layout: fixed;
}

.comp-table thead {
  background: var(--bg-highlight);
}

.comp-table th {
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

/* Column widths so everything fits without scroll */
.comp-table th:nth-child(1), .comp-table td:nth-child(1) { width: 20%; }
.comp-table th:nth-child(2), .comp-table td:nth-child(2) { width: 22%; }
.comp-table th:nth-child(3), .comp-table td:nth-child(3) { width: 22%; }
.comp-table th:nth-child(4), .comp-table td:nth-child(4) { width: 13%; }
.comp-table th:nth-child(5), .comp-table td:nth-child(5) { width: 11%; }
.comp-table th:nth-child(6), .comp-table td:nth-child(6) { width: 12%; }

.comp-table td {
  padding: var(--space-md) var(--space-md);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.comp-table tbody tr {
  transition: background 0.2s;
}

.comp-table tbody tr:hover {
  background: var(--bg-card-hover);
}

.comp-table tbody tr:last-child td {
  border-bottom: none;
}

/* Product cell */
.comp-product {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.comp-product__img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--bg-highlight);
  object-fit: contain;
  flex-shrink: 0;
}

.comp-product__name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.25;
  word-wrap: break-word;
}

/* Badges */
.badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 4px;
  margin-top: 4px;
}

.badge--best {
  background: rgba(212, 168, 83, 0.15);
  color: var(--badge-best);
  border: 1px solid rgba(212, 168, 83, 0.3);
}

.badge--popular {
  background: rgba(224, 122, 95, 0.15);
  color: var(--badge-popular);
  border: 1px solid rgba(224, 122, 95, 0.3);
}

.badge--value {
  background: rgba(91, 138, 114, 0.15);
  color: var(--badge-value);
  border: 1px solid rgba(91, 138, 114, 0.3);
}

/* Stars */
.stars {
  color: var(--star);
  font-size: 0.9rem;
  letter-spacing: 1px;
}

.stars__score {
  color: var(--text-secondary);
  font-size: 0.82rem;
  margin-left: 4px;
}

/* Features list inside table */
.feat-list {
  list-style: none;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.feat-list li {
  padding: 2px 0;
}

.feat-list li::before {
  content: '✓ ';
  color: var(--accent-secondary);
  font-weight: 700;
}

/* CTA Button */
.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  background: var(--accent);
  color: #ffffff;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
  text-align: center;
  line-height: 1.2;
}

.cta-btn:hover {
  background: var(--accent-hover);
  color: #ffffff;
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

/* In comparison table, CTA fills the cell */
.comp-table .cta-btn {
  width: 100%;
  font-size: 0.72rem;
  padding: 8px 6px;
}

.cta-btn--outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.cta-btn--outline:hover {
  background: var(--accent);
  color: #ffffff;
}

/* ============================================
   MOBILE COMPARISON CARDS (< 900px)
   ============================================ */
.comp-cards {
  display: none;
}

@media (max-width: 900px) {
  .comp-table-wrap { display: none !important; }
  .comp-cards { display: flex; flex-direction: column; gap: var(--space-lg); }
}

@media (min-width: 901px) {
  .comp-cards { display: none !important; }
}

.comp-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  position: relative;
}

.comp-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  position: relative;
}

/* Badge sits at top as a block, not absolute (avoids overlapping title) */
.comp-card .badge {
  position: static;
  display: inline-block;
  margin-bottom: var(--space-md);
}

.comp-card__header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.comp-card__img {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  background: var(--bg-highlight);
  object-fit: contain;
  flex-shrink: 0;
}

.comp-card__name {
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.3;
}

.comp-card__specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  font-size: 0.85rem;
}

.comp-card__spec-label {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.comp-card__spec-value {
  color: var(--text-primary);
  font-weight: 500;
}

.comp-card .cta-btn {
  width: 100%;
  justify-content: center;
  padding: 15px;
  font-size: 0.85rem;
}

/* "Ver ficha" secondary button in cards */
.comp-card__ficha-btn {
  display: block;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px;
  margin-top: var(--space-sm);
  text-decoration: none;
  transition: all 0.2s;
}

.comp-card__ficha-btn:hover {
  background: var(--bg-secondary);
  border-color: var(--accent);
  color: var(--accent);
}

/* ============================================
   PRODUCT REVIEW / FICHA — E-E-A-T
   ============================================ */
.ficha {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg);
}

.ficha__header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.ficha__category {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 600;
}

.ficha__title {
  margin-top: var(--space-sm);
}

.ficha__meta {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  margin-top: var(--space-md);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.ficha__hero-img {
  width: 100%;
  max-width: 480px;
  margin: var(--space-xl) auto;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}

/* Quick Verdict Box */
.verdict-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  margin: var(--space-xl) 0;
}

.verdict-box__score {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--accent);
  line-height: 1;
}

.verdict-box__label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-top: 4px;
}

.verdict-box__text {
  margin-top: var(--space-md);
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.verdict-box .cta-btn {
  margin-top: var(--space-lg);
}

/* Pros / Cons */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  margin: var(--space-xl) 0;
}

@media (min-width: 600px) {
  .pros-cons { grid-template-columns: 1fr 1fr; }
}

.pros-cons__col {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
}

.pros-cons__heading {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.pros-cons__heading--pro { color: var(--pro); }
.pros-cons__heading--con { color: var(--con); }

.pros-cons__list {
  list-style: none;
}

.pros-cons__list li {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.pros-cons__list li:last-child {
  border-bottom: none;
}

/* Specs Table */
.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-xl) 0;
  font-size: 0.88rem;
}

.specs-table caption {
  text-align: left;
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.specs-table tr {
  border-bottom: 1px solid var(--border);
}

.specs-table th {
  text-align: left;
  padding: var(--space-sm) var(--space-md);
  color: var(--text-muted);
  font-weight: 500;
  width: 40%;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.specs-table td {
  padding: var(--space-sm) var(--space-md);
  color: var(--text-primary);
}

/* User Segments */
.segments {
  margin: var(--space-xl) 0;
}

.segment {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
}

.segment--yes {
  border-left: 3px solid var(--pro);
}

.segment--no {
  border-left: 3px solid var(--con);
}

.segment__title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: var(--space-xs);
}

.segment__text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin: 0;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-2xl) 0;
  margin-top: var(--space-3xl);
  text-align: center;
}

.site-footer p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.site-footer .affiliate-disclosure {
  font-size: 0.72rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: var(--space-md) auto 0;
  line-height: 1.5;
}

/* ============================================
   COMPRA TRANSPARENTE — Trust Components
   ============================================ */

/* Trust Header */
.trust-header {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-xl);
  margin-bottom: var(--space-xl);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md) var(--space-xl);
  align-items: center;
}

.trust-header__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(212, 168, 83, 0.25);
  padding: 6px 14px;
  border-radius: 20px;
}

.trust-header__stat {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.trust-header__stat strong {
  color: var(--text-primary);
}

@media (max-width: 600px) {
  .trust-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Virtue / Defect cells */
.cell-virtue {
  color: var(--pro);
  font-weight: 500;
  font-size: 0.76rem;
  line-height: 1.35;
  padding-left: 8px;
  border-left: 2px solid var(--pro);
}

.cell-defect {
  color: var(--con);
  font-weight: 500;
  font-size: 0.76rem;
  line-height: 1.35;
  padding-left: 8px;
  border-left: 2px solid var(--con);
}

/* Trust Index */
.trust-index {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
}

.trust-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.trust-dot--alta { background: var(--pro); box-shadow: 0 0 6px rgba(91,138,114,0.5); }
.trust-dot--media { background: var(--star); box-shadow: 0 0 6px rgba(240,192,64,0.4); }
.trust-dot--baja { background: var(--con); box-shadow: 0 0 6px rgba(196,92,92,0.5); }

.trust-index--alta { color: var(--pro); }
.trust-index--media { color: var(--star); }
.trust-index--baja { color: var(--con); }

/* Score Bar */
.score-bar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.score-bar__track {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  min-width: 60px;
}

.score-bar__fill {
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
  transition: width 0.6s ease;
}

.score-bar__value {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--accent);
  min-width: 36px;
}

/* Review Alert Box */
.review-alert {
  background: rgba(196, 92, 92, 0.08);
  border: 1px solid rgba(196, 92, 92, 0.25);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  margin-top: var(--space-sm);
  font-size: 0.78rem;
  color: var(--con);
  line-height: 1.5;
}

.review-alert--ok {
  background: rgba(91, 138, 114, 0.08);
  border-color: rgba(91, 138, 114, 0.25);
  color: var(--pro);
}

/* Detector Section */
.detector-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin: var(--space-2xl) 0;
}

.detector-section__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.detector-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 600px) {
  .detector-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .detector-grid { grid-template-columns: repeat(3, 1fr); }
}

.detector-card {
  background: var(--bg-highlight);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
}

.detector-card__name {
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: var(--space-sm);
}

.detector-card__row {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.detector-card__row:last-child {
  border-bottom: none;
}

/* Mobile comp-card virtue/defect */
.comp-card__virtue {
  background: rgba(91, 138, 114, 0.1);
  border-left: 3px solid var(--pro);
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-sm);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.85rem;
  color: var(--pro);
  font-weight: 500;
}

.comp-card__defect {
  background: rgba(196, 92, 92, 0.1);
  border-left: 3px solid var(--con);
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-md);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.85rem;
  color: var(--con);
  font-weight: 500;
}

.comp-card__virtue-label,
.comp-card__defect-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.7;
  display: block;
  margin-bottom: 2px;
}

/* ============================================
   UTILITY
   ============================================ */
.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.mt-xl { margin-top: var(--space-xl); }
.mb-xl { margin-bottom: var(--space-xl); }

/* Smooth fade-in for dynamic content */
.fade-in {
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   Sin imagen: alinear contenido sin hueco
   (cuando el producto usa placeholder, no se
    renderiza <img>, así que el flex no deja gap)
   ============================================ */
.comp-product:not(:has(.comp-product__img)) {
  padding-left: 0;
}
.comp-card__header:not(:has(.comp-card__img)) {
  min-height: auto;
}

/* ============================================
   MÓVIL: cards compactas — producto + botón
   visibles de un vistazo, sin scroll infinito
   ============================================ */
@media (max-width: 900px) {
  .comp-card {
    padding: var(--space-md);
  }
  .comp-card__name {
    font-size: 0.98rem;
    line-height: 1.25;
  }
  /* Virtud y defecto más compactos en móvil */
  .comp-card__virtue,
  .comp-card__defect {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.82rem;
    line-height: 1.35;
    margin-bottom: var(--space-sm);
  }
  .comp-card__virtue-label,
  .comp-card__defect-label {
    font-size: 0.64rem;
    margin-bottom: 1px;
  }
  .comp-card__specs {
    margin-bottom: var(--space-sm);
  }
  .comp-card .cta-btn {
    padding: 13px;
    font-size: 0.82rem;
  }
  .comp-card__ficha-btn {
    padding: 9px;
    font-size: 0.78rem;
  }
  /* Detector: al final, en una columna, más discreto */
  .detector-section {
    padding: var(--space-lg) var(--space-md);
    margin-top: var(--space-2xl);
  }
  .detector-section__title {
    font-size: 1.05rem;
  }
}

/* ============================================
   SELLO CDT — Medidor de puntuación honesta
   El activo diferencial de la web, muy visible
   ============================================ */
.sello-cdt {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  margin: var(--space-md) 0;
}

.sello-cdt__gauge {
  position: relative;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
}

.sello-cdt__gauge svg {
  transform: rotate(-90deg);
  width: 72px;
  height: 72px;
}

.sello-cdt__track {
  fill: none;
  stroke: var(--border);
  stroke-width: 7;
}

.sello-cdt__fill {
  fill: none;
  stroke-width: 7;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s ease;
}

/* Colores del medidor según nota */
.sello-cdt__fill--alta { stroke: var(--pro); }
.sello-cdt__fill--media { stroke: var(--star); }
.sello-cdt__fill--baja { stroke: var(--con); }

.sello-cdt__number {
  position: absolute;
  top: 0; left: 0;
  width: 72px; height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.sello-cdt__number span {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: 1px;
}

.sello-cdt__label {
  flex: 1;
}

.sello-cdt__brand {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 3px 9px;
  border-radius: 20px;
  margin-bottom: 5px;
}

.sello-cdt__verdict {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--text-primary);
  line-height: 1.2;
}

.sello-cdt__sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 3px;
}

/* Versión grande para la ficha de producto */
.sello-cdt--grande {
  flex-direction: column;
  text-align: center;
  padding: var(--space-xl);
  gap: var(--space-md);
}

.sello-cdt--grande .sello-cdt__gauge,
.sello-cdt--grande .sello-cdt__gauge svg {
  width: 120px;
  height: 120px;
}

.sello-cdt--grande .sello-cdt__number {
  width: 120px; height: 120px;
  font-size: 2.4rem;
}

.sello-cdt--grande .sello-cdt__number span {
  font-size: 1rem;
}

.sello-cdt--grande .sello-cdt__verdict {
  font-size: 1.3rem;
}

@media (max-width: 900px) {
  .sello-cdt {
    padding: var(--space-md);
    gap: var(--space-sm);
  }
  .sello-cdt__gauge, .sello-cdt__gauge svg {
    width: 64px; height: 64px;
  }
  .sello-cdt__number {
    width: 64px; height: 64px;
    font-size: 1.35rem;
  }
}

/* Sello CDT MINI — solo medidor + etiqueta, para celda de tabla */
.sello-cdt-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.sello-cdt-mini .sello-cdt__gauge,
.sello-cdt-mini .sello-cdt__gauge svg {
  width: 58px;
  height: 58px;
}

.sello-cdt-mini .sello-cdt__number {
  width: 58px;
  height: 58px;
  font-size: 1.2rem;
}

.sello-cdt-mini .sello-cdt__number span {
  font-size: 0.6rem;
}

.sello-cdt-mini__brand {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.sello-cdt-mini__verdict {
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
}

/* Colores del texto veredicto según nivel */
.sello-cdt__fill--alta-text { color: var(--pro); }
.sello-cdt__fill--media-text { color: var(--star); }
.sello-cdt__fill--baja-text { color: var(--con); }

/* ============================================
   TARJETA DESTACADA — Producto recomendado
   Claramente diferenciada del resto
   ============================================ */
.comp-card--destacada {
  border: 2px solid var(--accent);
  background: linear-gradient(to bottom, var(--accent-glow) 0%, var(--bg-card) 120px);
  box-shadow: 0 8px 32px rgba(217, 93, 57, 0.15);
  padding-top: calc(var(--space-lg) + 14px);
  position: relative;
  overflow: hidden;
}

/* Cinta superior de "Nuestra recomendación" */
.comp-card__ribbon {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
  padding: 7px var(--space-md);
}

/* El nombre del producto destacado, un poco más grande */
.comp-card--destacada .comp-card__name {
  font-size: 1.15rem;
  color: var(--text-primary);
}

/* El Sello CDT dentro de la destacada resalta más */
.comp-card--destacada .sello-cdt {
  border-color: var(--accent);
  background: var(--bg-card);
}

/* El botón de la destacada, más llamativo */
.comp-card--destacada .cta-btn {
  padding: 16px;
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .comp-card--destacada {
    padding-top: calc(var(--space-md) + 14px);
  }
  .comp-card--destacada .comp-card__name {
    font-size: 1.05rem;
  }
}
