/* CuidaHome v23 — sistema visual editorial basado en escenas reales de uso. */
.ch-ed-figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 20px;
  background: #dfe7e4;
  box-shadow: 0 22px 55px rgba(8, 25, 43, .24);
  isolation: isolate;
}

.ch-ed-figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.ch-ed-figure:hover img { transform: scale(1.018); }

.ch-ed-figure figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 34px 20px 17px;
  color: rgba(255, 255, 255, .88);
  font-size: 12.5px;
  line-height: 1.4;
  background: linear-gradient(180deg, transparent 0%, rgba(7, 22, 37, .82) 100%);
}

.ch-ed-figure figcaption strong {
  display: block;
  color: #fff;
  font-size: 14px;
  line-height: 1.3;
}

/* Portada: una escena principal y dos puertas de entrada visuales. */
.hero-visual.ch-home-visuals {
  display: grid;
  gap: 13px;
  min-width: 0;
}

.ch-home-visual-main { aspect-ratio: 1.9 / 1; }
.ch-home-visual-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.ch-home-visual-small { aspect-ratio: 2.18 / 1; border-radius: 15px; }
.ch-home-visual-small figcaption { padding: 28px 14px 12px; font-size: 11px; }
.ch-home-visual-small figcaption strong { font-size: 12.5px; }

/* Cabeceras de categoría: foto contextual, no foto de producto. */
.ch-category-visual {
  aspect-ratio: 5 / 3;
  min-width: 0;
  border-color: rgba(255, 255, 255, .22);
}

.ch-category-visual figcaption {
  padding: 44px 22px 18px;
  font-size: 12px;
}

/* Las tarjetas de categoría de portada reutilizan las mismas escenas. */
.ccard .cmedia img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}

.ccard:hover .cmedia img { transform: scale(1.035); }

/* Apertura editorial de las guías prioritarias. */
.ch-ed-guide-wrap {
  position: relative;
  z-index: 4;
  width: min(1060px, calc(100% - 40px));
  margin: -30px auto 44px;
}

.ch-ed-guide {
  aspect-ratio: 16 / 9;
  border: 5px solid #fff;
  border-radius: 22px;
  box-shadow: 0 22px 58px rgba(17, 39, 61, .2);
}

.ch-ed-guide figcaption {
  padding: 58px 24px 20px;
  font-size: 12px;
}

.ch-ed-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, .72);
  white-space: nowrap;
}

.ch-ed-note::before { content: "●"; color: #2ecc71; font-size: 8px; }

@media (max-width: 900px) {
  .hero-visual.ch-home-visuals {
    display: block;
    width: 100%;
  }

  .ch-home-visual-grid { display: none; }
  .ch-home-visual-main { aspect-ratio: 16 / 10; }
  .ch-category-visual { width: 100%; aspect-ratio: 16 / 9; }
  .ch-ed-guide-wrap { width: min(100% - 28px, 760px); margin-top: -20px; margin-bottom: 32px; }
}

@media (max-width: 620px) {
  .ch-ed-figure { border-radius: 15px; }
  .ch-ed-figure figcaption { padding: 42px 15px 13px; }
  .ch-ed-figure figcaption > span:not(.ch-ed-note) { display: none; }
  .ch-ed-guide { aspect-ratio: 4 / 3; border-width: 3px; border-radius: 16px; }
  .ch-ed-guide figcaption { padding: 52px 15px 13px; }
  .ch-ed-note { font-size: 10.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .ch-ed-figure img { transition: none; }
  .ch-ed-figure:hover img { transform: none; }
}
