/* ════════════════════════════════════════════════════════════════════════
   GH · Bloques catálogo
   Grid responsive de tarjetas (imagen / vídeo / texto) encima del listado
   de productos de categoría. Gemelo de ghhomeblocks con prefijo .gh-cb.
   ════════════════════════════════════════════════════════════════════════ */

.gh-cb,
.gh-cb * {
  box-sizing: border-box;
}

.gh-cb {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 24px;
}

/* ── Tarjeta base ───────────────────────────────────────────────────── */
.gh-cb__card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 2px rgba(10, 10, 10, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  min-height: 220px;
}

a.gh-cb__card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(10, 10, 10, 0.10);
  border-color: #d6e9dd;
}

/* ── Anchos ─────────────────────────────────────────────────────────── */
.gh-cb__card--full  { flex: 1 1 100%; }
.gh-cb__card--half  { flex: 1 1 calc(50% - 9px); }
.gh-cb__card--third { flex: 1 1 calc(33.333% - 12px); }

/* ── Media (imagen / vídeo) ─────────────────────────────────────────── */
.gh-cb__media {
  position: relative;
  width: 100%;
  background: #f4f4f4;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.gh-cb__card--full .gh-cb__media { aspect-ratio: 21 / 9; }

.gh-cb__media img,
.gh-cb__media iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  display: block;
  transition: transform 0.4s ease;
}

a.gh-cb__card:hover .gh-cb__media img {
  transform: scale(1.04);
}

/* ── Cuerpo ─────────────────────────────────────────────────────────── */
.gh-cb__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px 20px;
  flex: 1;
}

.gh-cb__title {
  font-family: var(--gh-font-display, inherit);
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.25;
}

.gh-cb__subtitle {
  font-size: 0.92rem;
  color: #525252;
  margin: 0;
  line-height: 1.45;
}

.gh-cb__text {
  font-size: 0.95rem;
  color: #2a2a2a;
  margin: 6px 0 0;
  line-height: 1.55;
  white-space: pre-line;
}

/* ── CTA ────────────────────────────────────────────────────────────── */
.gh-cb__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #1f6f4a;
  transition: gap 0.2s ease;
}

a.gh-cb__card:hover .gh-cb__cta {
  gap: 10px;
}

.gh-cb__cta svg {
  flex: 0 0 14px;
}

/* ── Variantes por tipo ─────────────────────────────────────────────── */
.gh-cb__card--text {
  background: linear-gradient(135deg, #f4faf7 0%, #fff 70%);
}

.gh-cb__card--text .gh-cb__title {
  font-size: 1.6rem;
}

/* ── Vídeo: recortar la UI de YouTube (título y "Ver más") ───────────
   El iframe se escala desde el centro para que los bordes (donde sale
   el título y el botón "Watch on YouTube") queden fuera del área
   visible. Solo se ve el centro del vídeo.                            */
.gh-cb__media--video {
  overflow: hidden;
  pointer-events: none;          /* click pasa al <a> padre si lo hay */
}
.gh-cb__media--video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: scale(1.45);
  transform-origin: center;
  pointer-events: none;
  border: 0;
}

/* ── Slide (hueco tipo «slider») ──────────────────────────────────────
   Tira de diapositivas 21:9 que se desplaza entera (translateX); el JS
   (ghcatalogblocks-slider.js) mueve la tira y marca el punto activo. */
.gh-cb__card--slider {
  position: relative;
  padding: 0;
  min-height: 0;
}
.gh-cb__slides {
  display: flex;
  transition: transform 0.6s ease;
  will-change: transform;
}
.gh-cb__slide {
  position: relative;
  flex: 0 0 100%;
  aspect-ratio: 21 / 9;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
}
.gh-cb__slide-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gh-cb__slide-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 80px 40px 44px;
  background: linear-gradient(0deg, rgba(10, 20, 15, 0.72) 0%, rgba(10, 20, 15, 0) 100%);
}
.gh-cb__slide-title {
  font-family: var(--gh-font-display, inherit);
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.2;
}
.gh-cb__slide-sub {
  max-width: 60ch;
  font-size: 1rem;
  opacity: 0.92;
}
.gh-cb__cta--light { color: #fff; }
.gh-cb__arrow {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  color: #1a1a1a;
  font-size: 28px;
  line-height: 40px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  transition: background 0.2s ease;
}
.gh-cb__arrow:hover { background: #fff; }
.gh-cb__arrow--prev { left: 16px; }
.gh-cb__arrow--next { right: 16px; }
.gh-cb__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.gh-cb__dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
}
.gh-cb__dot.is-active { background: #fff; transform: scale(1.25); }
