/* === Botón lupa solo móvil (queda donde pongas el shortcode) === */
.lmi-solo-movil { display: none; }

@media (max-width: 768px) {
  .lmi-solo-movil {
    display: inline-flex;
    position: static; /* no flota, respeta el header */
    margin-left: 8px;
  }
  #lmi-lupa-btn {
    all: unset;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    cursor: pointer;
    line-height: 1;
  }
  #lmi-lupa-btn .dashicons { font-size: 22px; color: #000; }
}

/* === Overlay móvil: IDs propios (no colisionan) === */
#lmi-buscador-contenedor {
  position: fixed;
  top: 20px;     /* << más arriba (antes 60px) */
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0 !important;
  padding: 20px;
  box-sizing: border-box;
  background: #fff;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 16px;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease;
  overflow-y: auto;
}

#lmi-buscador-contenedor.lmi-mostrar {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

#lmi-buscador-header {
  position: relative;
  width: 100%;
  text-align: center;
}
#lmi-buscador-header h2 {
  font-size: 20px;
  margin: 0;
  color: #c60045;
  border-bottom: 1px solid #ddd;
  padding-bottom: 8px;
}
.lmi-close {
  font-size: 30px;
  cursor: pointer;
  position: absolute;
  right: 0;
  top: -4px;
}

#lmi-buscador-barra-movil { width: 100%; max-width: 700px; margin: 0 auto; }
#lmi-buscador-input {
  width: 100%;
  height: 44px;
  font-size: 16px;
  padding: 0 14px;
  border: 1px solid #e2e2e2;
  border-radius: 10px;
  outline: none;
}

.lmi-placeholder {
  text-align: center;
  font-size: 14px;
  margin: 10px 0 0;
  width: 100%;
  max-width: 700px;
  align-self: center;
}

/* === Grilla móvil (2 columnas OBLIGATORIO) === */
.lmi-columna {
  display: grid;
  grid-template-columns: repeat(2, 1fr) !important; /* fijo en 2 */
  gap: 10px;
  width: 100%;
  max-width: 100%;
  padding: 12px;
}

/* ❌ eliminamos la regla que lo llevaba a 1 columna en 480px */
/* (nada más que 2 columnas, siempre) */

.lmi-item {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  text-align: center;
  font-size: 14px;
}
.lmi-item img { width: 100%; height: auto; object-fit: contain; transition: transform .3s ease-in-out; }
.lmi-item img:hover { transform: scale(1.08); }

.lmi-item h4 {
  font-size: 15px !important;
  font-weight: 400;
  color: #222;
  margin: 8px 0 4px;
  line-height: 1.35;
  min-height: 3.8em;
}

.lmi-precios {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.lmi-precios del { color: #888; }
.lmi-precios ins { color: #b40f28; text-decoration: none; font-weight: 700; }

.lmi-ver-todos { margin-top: 10px; text-align: center; }
.lmi-ver-todos a {
  background: none; color: #000; padding: 0;
  text-decoration: none; font-weight: 600; font-size: 13px; text-transform: uppercase;
}

/* Bloquea scroll del body cuando overlay está abierto (solo lmi) */
body.lmi-no-scroll { overflow: hidden; }
