/**
 * bakery.css — Estilos de la sección Bakery "Antojos sin pecado"
 * (replica de bakery-section.component.tsx).
 *
 * Depende de: tokens.css. Sección estática, sin animaciones.
 */

/* ==========================================================================
   Sección y contenedor
   ========================================================================== */
.lm-bakery {
  position: relative;
  overflow: hidden;
  max-width: 100svw;
  padding: 5rem 0; /* py-20 */
}
.lm-bakery__container {
  max-width: 96rem; /* ≈ max-w-9xl (no estándar en Tailwind) */
  margin: 0 auto;
  padding: 0 2rem; /* adaptación: el container del TSX no traía gutter */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 2rem; /* gap-8 */
}

.lm-bakery__title {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--tertiary);
  font-size: 8vw; /* base mobile; valor del TSX en md+ */
  line-height: 1;
}

/* ==========================================================================
   Grid de tarjetas
   (grid-cols-2 fijo en el TSX; en mobile se apila — adaptación propia.)
   ========================================================================== */
.lm-bakery__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem; /* gap-4 */
  width: 100%;
  height: 100%;
}

.lm-bakery__card {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius); /* rounded-lg */
  background: var(--surface-container-high);
  min-height: 20rem; /* min-h-80 */
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: center;
  gap: 3.5rem; /* gap-2 */
}

/* --- Copy (título + texto + enlace) --- */
.lm-bakery__copy {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem; /* gap-6 */
  align-items: center;
  padding: 3rem 2rem 0; /* pt-12 px-8 */
  max-width: 100%;
}
.lm-bakery__card--tortas .lm-bakery__copy {
  width: 24rem; /* w-96 */
}
.lm-bakery__card--galletas .lm-bakery__copy {
  width: 26.5rem; /* w-106 */
}

.lm-bakery__copy h3 {
  margin: 0 auto;
  font-family: var(--font-text);
  font-weight: 700;
  font-size: 3rem; /* text-5xl */
  color: var(--on-background);
}
.lm-bakery__copy p {
  margin: 0;
  font-family: var(--font-text);
  font-size: 1.125rem; /* text-lg */
  text-align: center;
  color: var(--on-background);
}
.lm-bakery__copy a {
  font-family: var(--font-text);
  color: #60a5fa; /* text-blue-400 del TSX (fuera de la paleta de tokens) */
  text-decoration: none;
}

/* --- Imagen: cubre el resto de la tarjeta --- */
.lm-bakery__picture {
  position: relative;
  display: block;
  margin: 0;
  padding: 0;
  height: 100%;
  max-width: 100%;
}
.lm-bakery__card--tortas .lm-bakery__picture {
  width: 40rem; /* w-160 */
}
.lm-bakery__card--galletas .lm-bakery__picture {
  width: 100%;
}
.lm-bakery__picture img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ==========================================================================
   Breakpoint md: valores exactos del TSX
   ========================================================================== */
@media (min-width: 768px) {
  .lm-bakery__title {
    font-size: 4.2vw; /* text-[4.2cqw] */
  }
  .lm-bakery__grid {
    grid-template-columns: repeat(2, 1fr); /* grid-cols-2 original */
  }
  /* Márgenes negativos del TSX: suben la imagen bajo el copy.
     Solo en md+ (en mobile apilado provocarían solapamientos). */
  .lm-bakery__card--tortas .lm-bakery__copy {
    margin-bottom: calc(640px - 48em); /* -128px */
  }
  .lm-bakery__card--galletas .lm-bakery__copy {
    margin-bottom: calc(640px - 44em); /* -64px */
  }
}
