/*
 * iLore — componentes editoriales de las fichas de producto.
 * Carga: templates/_partials/head.tpl, bloque stylesheets, solo product.
 * Las reglas solo actúan cuando la descripción incorpora el componente.
 * La Guía de uso conserva su CSS y su estructura existentes.
 */

/* Se conserva el ancho de lectura definido por el tema (70ch). */
body#product #main #description .ilore-product-editorial {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr);
  align-items: stretch;
  gap: clamp(24px, 2.5vw, 32px);
  margin: 0 0 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-body, #5A4E50);
  font-family: var(--font-body, sans-serif);
}

body#product #main #description .ilore-product-editorial__copy {
  min-width: 0;
}

body#product #main #description .ilore-product-editorial__eyebrow {
  display: block;
  margin: 0 0 16px;
  color: #806028;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: .16em;
  text-transform: uppercase;
}

/* La especificidad y estos márgenes prevalecen sobre custom.css (tema). */
body#product #main #description .product-description .ilore-product-editorial .ilore-product-editorial__title {
  margin: 0 0 24px !important;
  font-family: var(--font-title, Georgia, serif);
  font-size: clamp(28px, 2.2vw, 34px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -.025em;
  text-transform: none;
  text-wrap: balance;
  overflow-wrap: break-word;
}

body#product #main #description .product-description .ilore-product-editorial .ilore-product-editorial__copy p {
  margin: 0 0 1em !important;
  font-size: inherit;
  line-height: inherit !important;
  text-align: left;
}

body#product #main #description .product-description .ilore-product-editorial .ilore-product-editorial__copy p:last-child {
  margin-bottom: 0 !important;
}

body#product #main #description .ilore-product-editorial__figure {
  position: relative;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
}

body#product #main #description .ilore-product-editorial__image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  margin: 0;
  border: 0;
  border-radius: 12px;
  object-fit: cover;
  object-position: 50% 65%;
  box-shadow: none;
}

body#product #main #description .ilore-product-editorial__caption {
  display: block;
  margin-top: 10px;
  color: var(--text-body, #5A4E50);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

/* Continuidad por espaciado, sin línea divisoria antes de la Guía de uso. */
body#product #main #description .ilore-product-editorial::before,
body#product #main #description .ilore-product-editorial::after {
  content: none;
}

/* La guía y los textos posteriores comparten los márgenes del contenedor. */
body#product #main #description .ilore-product-reading {
  max-width: none;
  margin: 0;
}

@media (min-width: 992px) {
  /* La foto sale del cálculo intrínseco de la fila: manda la altura del texto.
     Se reservan 30px para el pie. No hay una altura fija para cada producto. */
  body#product #main #description .ilore-product-editorial__image {
    position: absolute;
    top: 0;
    left: 0;
    height: calc(100% - 30px);
    aspect-ratio: auto;
  }

  body#product #main #description .ilore-product-editorial__caption {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    margin-top: 0;
  }
}

@media (max-width: 991px) {
  body#product #main #description .ilore-product-editorial {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  body#product #main #description .ilore-product-editorial__figure {
    width: 100%;
    max-width: 440px;
    margin-inline: auto;
  }

  body#product #main #description .product-description .ilore-product-editorial .ilore-product-editorial__title {
    font-size: clamp(28px, 4.5vw, 38px);
  }
}

@media (max-width: 600px) {
  body#product #main #description .ilore-product-editorial__eyebrow {
    margin-bottom: 14px;
    font-size: 10px;
  }

  body#product #main #description .product-description .ilore-product-editorial .ilore-product-editorial__title {
    margin-bottom: 22px !important;
    font-size: 28px;
    line-height: 1.25;
  }
}
