/* Módulo Allergens */
/* =========================================================
     7. ALÉRGENOS (TEXTOS + ICONOS)
     ========================================================= */

  /* Contenedor de las etiquetas de alérgenos (píldoras de texto) */
  .menu2-item-allergens {
    margin-top: 3px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }

  /* Píldora de alérgeno (ej: Gluten, Lactosa…) en texto */
  .menu2-allergen-pill {
    border-radius: 999px;
    padding: 2px 6px;
    font-size: 0.7rem;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    color: #374151;
  }

  /* ICONOS de alérgenos (por ejemplo, imágenes pequeñas de gluten, lactosa…) */
  .menu2-allergen-icon {
    width: 40px;         /* Tamaño por defecto en móvil y pantallas pequeñas */
    height: 40px;
    object-fit: contain;
    margin-right: 4px;
    display: inline-block;
  }

  /* Tamaño MÁS PEQUEÑO de iconos SOLO en pantallas grandes (escritorio ancho) */
  @media (min-width: 1200px) {
    .menu2-allergen-icon {
      width: 19px !important;
      height: 19px !important;
      max-width: 19px !important;
      max-height: 19px !important;
    }
  }

/* ============================
   FIX ESCRITORIO: precio a la derecha + alérgenos debajo del texto
   ============================ */
@media (min-width: 769px){

  /* Grid fijo en PC: foto | texto | precio */
  .menu2-item.with-image{
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) auto;
    grid-template-rows: auto auto; /* 1: nombre/desc, 2: alérgenos */
    column-gap: 12px;
    row-gap: 6px;
    align-items: start;
  }

  /* Foto ocupa las 2 filas */
  .menu2-item.with-image .menu2-thumb{
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  /* Texto (nombre + desc) en columna central */
  .menu2-item.with-image .menu2-item-main{
    grid-column: 2;
    grid-row: 1;
  }

  /* Alérgenos SIEMPRE debajo del texto, en la misma columna central */
  .menu2-item.with-image .menu2-item-allergens{
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    align-self: start;
    min-width: 0;
  }

  /* Precio SIEMPRE en la derecha, alineado al final */
  .menu2-item.with-image .menu2-item-price{
    grid-column: 3;
    grid-row: 1 / span 2; /* ocupa ambas filas */
    justify-self: end;
    align-self: start;
    text-align: right;
    white-space: nowrap;
  }
 }

/* ✅ ALÉRGENOS: en línea y con salto (móvil y PC) */
.menu2-item-allergens{
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 6px 8px !important;
  width: 100% !important;
}

/* ✅ Cada pill NO ocupa 100% (evita que bajen 1 por línea) */
.menu2-item-allergens .menu2-allergen-pill{
  display: inline-flex !important;
  width: auto !important;
  flex: 0 0 auto !important;
  white-space: nowrap !important;
}

/* ✅ Ajuste fino en móvil para que entren más por fila */
@media (max-width: 768px){
  .menu2-item-allergens{ gap: 5px 6px !important; }
  .menu2-item-allergens .menu2-allergen-pill{
    font-size: 0.66rem !important;
    padding: 2px 8px !important;
    line-height: 1.1 !important;
    max-width: 100% !important;
  }
}

/* ✅ FIX MÓVIL: alérgenos ocupan toda la fila y hacen wrap real */
@media (max-width: 768px){
  .menu2-item-allergens{
    grid-column: 1 / span 2 !important;  /* ocupa la fila completa */
    width: 100% !important;
  }
}

@media (max-width: 768px){
  .menu2-item-allergens{
    grid-column: 1 / span 2 !important;
    width: 100% !important;
  }
}

