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

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #f0f2f5;
  color: #333;
  font-size: 15px;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

/* ── HEADER ─────────────────────────────────────────── */
header {
  background: #1e2a3a;
  border-bottom: 3px solid #c8a415;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.logo a {
  color: #c8a415;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.logo a:hover { color: #e0bb30; }

.logo span {
  display: block;
  font-size: 0.75rem;
  color: #8a9bb0;
  margin-top: -2px;
}

nav { display: flex; gap: 4px; }

nav a {
  color: #b0c0d0;
  font-size: 0.88rem;
  padding: 6px 12px;
  border-radius: 4px;
  transition: background 0.15s;
}

nav a:hover, nav a.activo {
  background: rgba(200,164,21,0.15);
  color: #c8a415;
}

/* ── LAYOUT ──────────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 22px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 270px;
  gap: 20px;
  align-items: start;
}

main { min-width: 0; }

/* ── CARDS ───────────────────────────────────────────── */
.card {
  background: #fff;
  border-radius: 8px;
  padding: 22px 24px;
  margin-bottom: 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

.card h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e2a3a;
  margin-bottom: 12px;
}

.card h2 a:hover { color: #c8a415; }

/* ── PRECIO PRINCIPAL ────────────────────────────────── */
.precio-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 4px;
}

.precio-numero {
  font-size: 2.8rem;
  font-weight: 800;
  color: #1e2a3a;
  line-height: 1;
}

.precio-moneda {
  font-size: 0.95rem;
  color: #888;
}

.variacion {
  font-size: 1rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 4px;
}

.baja { color: #c0392b; background: #fdf0ef; }
.sube { color: #1e8449; background: #edfaf1; }

.precio-meta {
  font-size: 0.78rem;
  color: #999;
  margin: 6px 0 14px;
}

/* ── STATS GRID ──────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.stat {
  background: #f8f9fa;
  border-radius: 6px;
  padding: 10px 12px;
  text-align: center;
}

.stat-label {
  font-size: 0.72rem;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  display: block;
  margin-bottom: 3px;
}

.stat-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e2a3a;
}

/* ── CHARTS ──────────────────────────────────────────── */
.chart-wrap {
  position: relative;
  height: 190px;
  margin-bottom: 16px;
}

.chart-wrap.grande { height: 260px; }

.chart-label {
  font-size: 0.75rem;
  color: #aaa;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── DESCRIPCIÓN ─────────────────────────────────────── */
.descripcion {
  font-size: 0.88rem;
  color: #555;
  line-height: 1.65;
  margin-bottom: 12px;
}

.descripcion strong { color: #1e2a3a; }

.btn-ver-mas {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #2471a3;
  font-size: 0.84rem;
  font-weight: 600;
  transition: color 0.15s;
}

.btn-ver-mas:hover { color: #1a5276; text-decoration: underline; }

/* ── NOTICIAS ────────────────────────────────────────── */
.noticias-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #c8a415;
  padding-bottom: 8px;
  margin-bottom: 16px;
}

.noticias-header h2 { font-size: 1.05rem; color: #1e2a3a; margin: 0; }

.noticia {
  padding: 14px 0;
  border-bottom: 1px solid #f2f2f2;
}

.noticia:last-child { border-bottom: none; padding-bottom: 0; }

.noticia-meta {
  font-size: 0.75rem;
  color: #bbb;
  display: block;
  margin-bottom: 3px;
}

.noticia-meta strong { color: #999; }

.noticia h3 {
  font-size: 0.92rem;
  font-weight: 600;
  color: #1e2a3a;
  margin-bottom: 4px;
  line-height: 1.4;
}

.noticia h3:hover { color: #c8a415; cursor: pointer; }

.noticia p {
  font-size: 0.82rem;
  color: #777;
  line-height: 1.55;
}

/* ── SIDEBAR ─────────────────────────────────────────── */
.sidebar { position: sticky; top: 70px; }

.sidebar-widget {
  background: #fff;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

.sidebar-widget h3 {
  font-size: 0.72rem;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid #f0f0f0;
}

.btn-precio {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 8px;
  transition: opacity 0.15s;
}

.btn-precio:last-child { margin-bottom: 0; }
.btn-precio:hover { opacity: 0.8; }
.btn-precio.baja { background: #fdf0ef; color: #c0392b; border: 1px solid #f5c6c3; }
.btn-precio.sube { background: #edfaf1; color: #1e8449; border: 1px solid #c3f0d3; }

.sidebar-links { list-style: none; }

.sidebar-links li {
  border-bottom: 1px solid #f5f5f5;
}

.sidebar-links li:last-child { border-bottom: none; }

.sidebar-links a {
  display: block;
  padding: 7px 4px;
  font-size: 0.85rem;
  color: #555;
  transition: color 0.15s;
}

.sidebar-links a:hover { color: #c8a415; padding-left: 8px; }

/* ── PÁGINA DETALLE ──────────────────────────────────── */
.detalle-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.badge {
  background: #1e2a3a;
  color: #c8a415;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 3px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ── PAÍSES PRODUCTORES ──────────────────────────────── */
.paises-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pais-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid #f2f2f2;
}

.pais-item:last-child { border-bottom: none; }

.pais-bandera {
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
  width: 32px;
  text-align: center;
}

.pais-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.pais-nombre {
  font-size: 0.92rem;
  font-weight: 700;
  color: #1e2a3a;
}

.pais-empresa {
  font-size: 0.78rem;
  color: #c8a415;
  font-weight: 600;
}

.pais-nota {
  font-size: 0.72rem;
  color: #bbb;
}

.pais-precio {
  text-align: right;
  flex-shrink: 0;
}

.pais-valor {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e2a3a;
}

.pais-moneda {
  font-size: 0.72rem;
  color: #aaa;
  text-transform: uppercase;
}

/* ── DIFERENCIAL ─────────────────────────────────────── */
.card-diferencial h2 { margin-bottom: 14px; }

.dif-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.dif-item {
  background: #f8f9fa;
  border-radius: 6px;
  padding: 10px 12px;
  text-align: center;
}

.dif-label {
  font-size: 0.72rem;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  display: block;
  margin-bottom: 4px;
}

.dif-valor {
  font-size: 1rem;
  font-weight: 700;
  color: #1e2a3a;
}

.dif-valor small {
  font-size: 0.75rem;
  font-weight: 400;
  color: #888;
}

/* ── BREADCRUMB ──────────────────────────────────────── */
.breadcrumb {
  font-size: 0.8rem;
  color: #999;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.breadcrumb a { color: #c8a415; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: #bbb; }

/* ── LITRO LABEL ─────────────────────────────────────── */
.litro-label { color: #777; }
.litro-label strong { color: #1e2a3a; }

/* ── FAQ ─────────────────────────────────────────────── */
.faq-lista { margin-top: 4px; }

.faq-item {
  border-bottom: 1px solid #f0f0f0;
}

.faq-item:last-child { border-bottom: none; }

.faq-pregunta {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  font-size: 0.93rem;
  font-weight: 600;
  color: #1e2a3a;
  text-align: left;
  font-family: inherit;
}

.faq-pregunta:hover { color: #c8a415; }

.faq-icono {
  font-size: 1rem;
  color: #c8a415;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.faq-pregunta[aria-expanded="true"] .faq-icono {
  transform: rotate(180deg);
}

.faq-respuesta {
  padding-bottom: 14px;
}

.faq-respuesta p {
  font-size: 0.87rem;
  color: #555;
  line-height: 1.7;
  margin: 0;
}

/* ── CONVERTER ───────────────────────────────────────── */
.converter { padding: 4px 0; }

.conv-label {
  font-size: 0.75rem;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 6px;
}

.converter input,
.converter select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  font-size: 0.9rem;
  color: #1e2a3a;
  background: #fafafa;
  margin-bottom: 10px;
  font-family: inherit;
  box-sizing: border-box;
}

.converter input:focus,
.converter select:focus {
  outline: none;
  border-color: #c8a415;
  background: #fff;
}

.conv-select { margin-top: 2px; }

.conv-resultado {
  background: #f8f9fa;
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.conv-fila {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.conv-etiqueta {
  font-size: 0.75rem;
  color: #999;
}

.conv-valor {
  font-size: 0.92rem;
  font-weight: 700;
  color: #1e2a3a;
}

/* ── FOOTER ──────────────────────────────────────────── */
footer {
  background: #1e2a3a;
  color: #6a7f95;
  text-align: center;
  padding: 22px 20px;
  margin-top: 10px;
  font-size: 0.8rem;
  line-height: 1.8;
}

.footer-inner { max-width: 1100px; margin: 0 auto; }
.footer-nav { margin-top: 6px; }
footer a { color: #c8a415; }
footer a:hover { text-decoration: underline; }

/* ── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 800px) {
  .container { grid-template-columns: 1fr; }
  .sidebar { position: static; order: -1; }
  .sidebar-widget { padding: 12px; }
  .precio-numero { font-size: 2.1rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dif-grid { grid-template-columns: repeat(2, 1fr); }
  .header-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
  nav { flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .dif-grid { grid-template-columns: 1fr 1fr; }
  .precio-numero { font-size: 1.9rem; }
}
