/**
 * despensa-bento.css — Bento Grid "La Despensa" (DespensaBento.tsx + tarjetas).
 *
 * Depende de: tokens.css. Sección estática (sin animaciones).
 * Los h2 del TSX piden font-black, pero Bubblegum Sans solo tiene peso 400 y
 * el proyecto usa font-synthesis:none — el peso efectivo es 400, como en Astro.
 */

/* ==========================================================================
   Sección y grid
   ========================================================================== */
.lm-bento {
  position: relative;
  overflow: hidden;
  max-width: 100svw;
  background: var(--surface-container);
}
.lm-bento__container {
  max-width: 96rem; /* ≈ max-w-9xl */
  margin: 0 auto;
  padding: 6rem 1rem 3rem; /* pt-24 pb-12 + gutter (adaptación) */
}

/* Mobile: una columna (adaptación; el TSX solo definía el bento 6x6) */
.lm-bento__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem; /* gap-4 */
}

/* ==========================================================================
   Tarjeta base (equivale al Card de shadcn con p-0 border-none shadow-xl)
   ========================================================================== */
.lm-bento__card {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 16rem; /* mobile */
  overflow: hidden;
  border-radius: 0.75rem; /* rounded-xl del Card */
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 8px 10px -6px rgba(0, 0, 0, 0.1); /* shadow-xl */
  background: var(--surface);
}
.lm-bento__card--hero {
  min-height: 24rem; /* mobile: la tarjeta grande respira más */
}
.lm-bento__card--eco {
  background: var(--tertiary);
}

/* Capa de fondo (imagen) y scrims */
.lm-bento__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: left top; /* bg-top-left */
}
.lm-bento__scrim {
  position: absolute;
  inset: 0;
  z-index: 10;
}
.lm-bento__scrim--surface {
  background: color-mix(in srgb, var(--surface) 20%, transparent); /* bg-surface/20 */
}
.lm-bento__scrim--on-surface {
  background: color-mix(in srgb, var(--on-surface) 10%, transparent); /* bg-on-surface/10 */
}

/* Contenido superpuesto */
.lm-bento__content {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 0.5rem; /* gap-2 */
  padding: 2rem 0.75rem; /* py-8 px-3 */
}
.lm-bento__content h2 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 400; /* font-black efectivo = 400 (ver cabecera) */
  line-height: 1.1;
}
.lm-bento__content p {
  margin: 0;
  font-family: var(--font-text);
}

/* --- Hero: Del campo a tu mesa --- */
.lm-bento__content--hero {
  justify-content: flex-end;
  align-items: center;
}
.lm-bento__content--hero h2 {
  font-size: 7vw;
  color: var(--on-secondary);
  text-align: center;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.12)); /* drop-shadow-md */
}
.lm-bento__content--hero p {
  font-weight: 500;
  font-size: 0.75rem; /* text-xs */
  color: var(--on-secondary);
  text-align: center;
}

/* --- Hecho con amor --- */
.lm-bento__content--amor {
  justify-content: center;
  align-items: center;
}
.lm-bento__content--amor h2 {
  font-size: 7vw;
  color: var(--on-secondary);
  text-align: center;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.12));
}

/* --- Talento Local (split imagen + copy) --- */
.lm-bento__split {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}
.lm-bento__split-media {
  width: 100%;
  height: 100%;
  min-height: 10rem; /* mobile */
}
.lm-bento__split-media picture {
  display: block;
  height: 100%;
  width: 100%;
}
.lm-bento__split-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right top; /* object-top-right */
}
.lm-bento__split-copy {
  display: flex;
  flex-direction: column;
  gap: 0.75rem; /* gap-3 */
  justify-content: center;
  align-items: flex-start;
  height: 100%;
  background: var(--secondary);
  padding: 1.5rem; /* px-6 (+ vertical en mobile) */
}
.lm-bento__split-copy h2 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 6vw;
  color: var(--on-secondary);
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.12));
}
.lm-bento__split-copy p {
  margin: 0;
  font-family: var(--font-text);
  font-weight: 500;
  font-size: 0.75rem; /* text-xs */
  color: var(--on-secondary);
}

/* --- Ecosostenible --- */
.lm-bento__content--eco {
  position: static; /* el CardContent del TSX no era absoluto */
  height: 100%;
  justify-content: center;
  align-items: center;
  padding: 2rem 0.75rem 0; /* pt-8 px-3 */
}
.lm-bento__content--eco h2 {
  font-size: 6vw;
  color: var(--on-tertiary);
}
.lm-bento__eco-logo {
  display: block;
  width: 15rem; /* size-60 */
  height: 15rem;
  max-width: 100%;
}
.lm-bento__eco-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* --- Despensa Saludable --- */
.lm-bento__content--despensa {
  justify-content: flex-start;
}
.lm-bento__content--despensa h2 {
  font-size: 7vw;
  color: var(--tertiary);
}
.lm-bento__content--despensa p {
  font-weight: 600; /* font-semibold */
  color: var(--outline);
}

/* ==========================================================================
   Breakpoint md: bento 6x6 exacto del TSX
   ========================================================================== */
@media (min-width: 768px) {
  .lm-bento__grid {
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(6, 1fr);
    min-height: calc(100svh - 8rem);
  }
  .lm-bento__card {
    min-height: 0; /* las filas del grid mandan */
  }
  .lm-bento__card--hero {
    grid-column: span 3;
    grid-row: span 4;
  }
  .lm-bento__card--amor {
    grid-column: span 3;
    grid-row: span 2;
  }
  .lm-bento__card--emprendimientos {
    grid-column: span 3;
    grid-row: span 2;
  }
  .lm-bento__card--eco {
    grid-column: span 2;
    grid-row: span 2;
  }
  .lm-bento__card--despensa {
    grid-column: span 4;
    grid-row: span 2;
  }

  /* Tipografías con los cqw→vw del TSX */
  .lm-bento__content--hero h2,
  .lm-bento__content--amor h2,
  .lm-bento__content--despensa h2 {
    font-size: 3vw; /* text-[3cqw] */
  }
  .lm-bento__content--eco h2,
  .lm-bento__split-copy h2 {
    font-size: 2.4vw; /* text-[2.4cqw] */
  }
  .lm-bento__content--hero p,
  .lm-bento__split-copy p {
    font-size: 0.875rem; /* md:text-sm */
  }

  /* Split de Talento Local pasa a fila (md:flex-row) */
  .lm-bento__split {
    flex-direction: row;
  }
  .lm-bento__split-media {
    min-height: 0;
  }
  .lm-bento__split-copy {
    padding: 0 1.5rem; /* px-6 exacto */
  }
}
