/* ==========================================================================
   Editorial Custom Styles - Hermoseamiento Profesional Premium
   ========================================================================== */

/* Contenedor Principal de la Página Editorial */
.editorial-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1e293b;
}

/* Header Editorial */
.editorial-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.editorial-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #4338ca;
  background-color: #eef2ff;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

.editorial-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin-bottom: 1.25rem;
}

.editorial-header p {
  font-size: 1.15rem;
  color: #64748b;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
  font-weight: 400;
}

.editorial-meta {
  font-size: 0.9rem !important;
  color: #94a3b8 !important;
  margin-top: 1rem !important;
  font-weight: 500 !important;
}

/* Bloques Editoriales */
.pdp-editorial-blocks,
.editorial-content {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 1.75rem;
}

/* Por defecto cada bloque ocupa el ancho completo de la fila */
.editorial-content > .editorial-block {
  flex: 1 1 100%;
}

/* Lo destacado y A considerar van lado a lado en pantallas anchas */
.editorial-content > .block-pros,
.editorial-content > .block-cons {
  flex: 1 1 calc(50% - 0.875rem);
}

/* Base de Bloques con Tarjetas Premium */
.editorial-block {
  border-radius: 1.25rem;
  padding: 1.75rem 2rem;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.03), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.editorial-block:hover {
  box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.06), 0 4px 10px -2px rgba(0, 0, 0, 0.03);
}

/* Header de Bloques (Títulos + Iconos) */
.editorial-block__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.editorial-block__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  flex-shrink: 0;
}

.editorial-block__icon svg {
  width: 1.25rem;
  height: 1.25rem;
  stroke-width: 2.5px;
}

.editorial-block__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}

/* --------------------------------------------------------------------------
   BLOQUE: PROS (Lo Destacado)
   -------------------------------------------------------------------------- */
.editorial-block.block-pros {
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
  border: 1px solid #dcfce7;
}

.editorial-block.block-pros .editorial-block__icon {
  background-color: #dcfce7;
  color: #166534;
}

.editorial-block.block-pros .editorial-block__title {
  color: #14532d;
}

.editorial-block.block-pros ul,
.editorial-block.block-cons ul,
.editorial-block.block-tips ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.editorial-block.block-pros ul li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: #166534;
  font-size: 1rem;
  line-height: 1.5;
}

.editorial-block.block-pros ul li svg {
  width: 1.25rem;
  height: 1.25rem;
  min-width: 1.25rem;
  color: #22c55e;
  margin-top: 0.125rem;
  stroke-width: 2.5px;
}

/* --------------------------------------------------------------------------
   BLOQUE: CONS (A Considerar)
   -------------------------------------------------------------------------- */
.editorial-block.block-cons {
  background: linear-gradient(180deg, #fff1f2 0%, #ffffff 100%);
  border: 1px solid #ffe4e6;
}

.editorial-block.block-cons .editorial-block__icon {
  background-color: #ffe4e6;
  color: #9f1239;
}

.editorial-block.block-cons .editorial-block__title {
  color: #881337;
}

.editorial-block.block-cons ul li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: #9f1239;
  font-size: 1rem;
  line-height: 1.5;
}

.editorial-block.block-cons ul li svg {
  width: 1.25rem;
  height: 1.25rem;
  min-width: 1.25rem;
  color: #f43f5e;
  margin-top: 0.125rem;
  stroke-width: 2.5px;
}

/* --------------------------------------------------------------------------
   BLOQUE: HERO
   -------------------------------------------------------------------------- */
.editorial-block.block-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  border: none;
  padding: 2.5rem;
}

.editorial-block.block-hero h2 {
  font-size: 1.875rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.75rem;
}

.editorial-block.block-hero p {
  color: #94a3b8;
  font-size: 1.1rem;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   BLOQUE: TIPS (Recomendaciones)
   -------------------------------------------------------------------------- */
.editorial-block.block-tips {
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 100%);
  border: 1px solid #fef3c7;
}

.editorial-block.block-tips .editorial-block__icon {
  background-color: #fef3c7;
  color: #b45309;
}

.editorial-block.block-tips .editorial-block__title {
  color: #78350f;
}

.editorial-block.block-tips ul li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: #92400e;
}

/* --------------------------------------------------------------------------
   BLOQUE: FAQ (Acordeón de Preguntas Frecuentes)
   -------------------------------------------------------------------------- */
.editorial-block.block-faq {
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.editorial-block.block-faq details {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.editorial-block.block-faq details[open] {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.editorial-block.block-faq summary {
  font-weight: 700;
  font-size: 1.05rem;
  color: #1e293b;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.editorial-block.block-faq details p {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
  color: #475569;
  line-height: 1.6;
}

.editorial-block.block-faq .faq-caret {
  color: #94a3b8;
  font-size: 0.8rem;
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: 1rem;
}

.editorial-block.block-faq details[open] .faq-caret {
  transform: rotate(180deg);
}

/* --------------------------------------------------------------------------
   BLOQUE: FEATURES (Especificaciones Destacadas)
   -------------------------------------------------------------------------- */
.editorial-block.block-features .editorial-block__icon {
  background-color: #e0e7ff;
  color: #4338ca;
}

.editorial-block.block-features .editorial-block__title {
  color: #312e81;
}

.editorial-block.block-features .features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0 2.5rem;
}

.editorial-block.block-features .feature-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.editorial-block.block-features .feature-label {
  color: #64748b;
  font-weight: 500;
  font-size: 0.95rem;
}

.editorial-block.block-features .feature-value {
  color: #0f172a;
  font-weight: 700;
  font-size: 0.95rem;
  text-align: right;
}

/* --------------------------------------------------------------------------
   BLOQUE: COMPARISON (Tabla Comparativa)
   -------------------------------------------------------------------------- */
.editorial-block.block-comparison {
  padding: 0;
  overflow: hidden;
}

.editorial-block.block-comparison table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.editorial-block.block-comparison thead th {
  background-color: #0f172a;
  color: #ffffff;
  font-weight: 700;
  text-align: left;
  padding: 1rem 1.5rem;
  letter-spacing: -0.01em;
}

.editorial-block.block-comparison thead th.text-center,
.editorial-block.block-comparison tbody td.text-center {
  text-align: center;
}

.editorial-block.block-comparison tbody tr:nth-child(even) {
  background-color: #f8fafc;
}

.editorial-block.block-comparison tbody td {
  padding: 0.9rem 1.5rem;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
}

.editorial-block.block-comparison tbody td.font-medium {
  font-weight: 600;
  color: #0f172a;
  background-color: transparent;
}

.editorial-block.block-comparison tbody tr:last-child td {
  border-bottom: none;
}

/* --------------------------------------------------------------------------
   BLOQUE: TEXT (Opinión / Historia)
   -------------------------------------------------------------------------- */
.editorial-block.block-text h4 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.editorial-block.block-text .block-text__body {
  color: #334155;
  font-size: 1.02rem;
  line-height: 1.75;
}

.editorial-block.block-text .block-text__body p {
  margin-bottom: 1rem;
}

.editorial-block.block-text .block-text__body p:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   BLOQUE: VIDEO
   -------------------------------------------------------------------------- */
.editorial-block.block-video {
  padding: 0;
  overflow: hidden;
}

.editorial-block.block-video .video-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  background-color: #0f172a;
}

.editorial-block.block-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* --------------------------------------------------------------------------
   BLOQUE: GALERÍA
   -------------------------------------------------------------------------- */
.editorial-block.block-gallery .gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}

.editorial-block.block-gallery img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 0.875rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

/* --------------------------------------------------------------------------
   PRODUCTOS MENCIONADOS / TARJETAS
   -------------------------------------------------------------------------- */
.editorial-products {
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 2px solid #f1f5f9;
}

.product-card-wrapper {
  position: relative;
}

/* --------------------------------------------------------------------------
   MINI-GALERÍA EDITORIAL (hasta 4 imágenes junto al producto destacado)
   -------------------------------------------------------------------------- */
.editorial-mini-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.editorial-mini-thumb {
  display: block;
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background-color: #f8fafc;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.editorial-mini-thumb:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

.editorial-mini-gallery .editorial-mini-thumb img {
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  max-width: none !important;
  object-fit: cover !important;
  margin: 0 !important;
  display: block;
}

/* Si sólo hay 1 o 3 imágenes, evita que la última quede huérfana ocupando
   media fila; se ve mejor si se estira a lo ancho del grid */
.editorial-mini-gallery:has(.editorial-mini-thumb:only-child) .editorial-mini-thumb,
.editorial-mini-gallery:has(.editorial-mini-thumb:nth-child(3):last-child) .editorial-mini-thumb:nth-child(3) {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 9;
}

@media (max-width: 640px) {
  .editorial-mini-gallery {
    gap: 0.5rem;
  }
}
.badge-relation-type {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 2;
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background-color: #4338ca;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(67, 56, 202, 0.25);
}

.editorial-products h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  text-align: center;
  margin-bottom: 1.5rem;
}

.editorial-products .product-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.75rem;
}

.editorial-products .product-card-wrapper {
  flex: 0 1 280px;
  max-width: 280px;
}

/* Control estricto de las imágenes en las tarjetas: evita que el
   wrapper de imagen del componente (pensado para una card angosta de
   catálogo) se estire y deje espacio en blanco alrededor de la imagen
   cuando la card queda más ancha, como pasa con 1-2 productos aquí. */
.editorial-products .product-card__image-wrapper {
  display: none;
}

.editorial-products .product-card img,
.editorial-products img {
  max-height: 200px;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   CONCLUSIÓN EDITORIAL
   -------------------------------------------------------------------------- */
.editorial-conclusion,
.pdp-editorial-conclusion {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  padding: 2.5rem 2rem;
  border-radius: 1.25rem;
  text-align: center;
  margin: 3rem 0;
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.15);
}

.editorial-conclusion h3,
.pdp-editorial-conclusion h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: #38bdf8;
  letter-spacing: -0.01em;
}

.editorial-conclusion p,
.pdp-editorial-conclusion p {
  color: #cbd5e1;
  font-size: 1.1rem;
  line-height: 1.7;
  max-width: 720px;
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   RESPONSIVE (Mobile)
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .editorial-page {
    padding: 2rem 1.25rem;
  }

  .editorial-content > .block-pros,
  .editorial-content > .block-cons {
    flex: 1 1 100%;
  }

  .editorial-header {
    margin-bottom: 2.5rem;
  }

  .editorial-header h1 {
    font-size: 1.65rem;
  }

  .editorial-header p {
    font-size: 1rem;
  }

  .editorial-block {
    padding: 1.25rem 1.25rem;
  }

  .editorial-block.block-hero {
    padding: 1.75rem;
  }

  .editorial-block.block-comparison table {
    font-size: 0.85rem;
  }

  .editorial-block.block-comparison thead th,
  .editorial-block.block-comparison tbody td {
    padding: 0.7rem 0.9rem;
  }

  .editorial-conclusion,
  .pdp-editorial-conclusion {
    padding: 1.75rem 1.25rem;
  }
}
