/* Stock (D-241): buscador grande, tres tarjetas de acción, avisos con número y hojas a pantalla completa
   (para reponer, problemas de stock y la ficha del producto). Se apoya en .hoja-perfil, .hp-* y .eq-accion de
   estilos.css, como Equipo. Cinco tamaños de letra: .82rem, .94rem, 1.05rem, título y cifra. */

/* ---------- Entrada: la pregunta y el buscador ---------- */
.st-heroe { display: grid; justify-items: center; gap: .7rem; max-width: 760px; margin: .4rem auto 1.6rem; text-align: center; }
.st-pregunta { font-family: var(--fuente-display); font-size: clamp(1.6rem, 3.6vw, 2.3rem); font-weight: 750; letter-spacing: -.02em; line-height: 1.15; }
.st-buscador { position: relative; width: 100%; }
.st-buscador > .con-camara { display: block; width: 100% !important; max-width: none !important; }
.st-lupa { position: absolute; left: 1.1rem; top: 50%; transform: translateY(-50%); color: var(--texto-3); pointer-events: none; z-index: 1; display: grid; }
input.st-q {
  width: 100%; min-height: 62px; padding: 0 1.2rem 0 3.3rem; border-radius: var(--r-l);
  border: 1.5px solid var(--linea-fuerte); background: var(--superficie); color: var(--texto);
  font: inherit; font-size: 1.05rem; box-shadow: var(--sombra-1);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
input.st-q::placeholder { color: var(--texto-3); }
input.st-q:focus { outline: none; border-color: var(--marca); box-shadow: 0 0 0 4px rgb(var(--marca-rgb) / .16), var(--sombra-2); }
.st-buscador > .con-camara > input.st-q { padding-right: 3.4rem; }
.st-ayuda { font-size: .94rem; }
.st-ayuda-fila { display: flex; align-items: center; justify-content: center; gap: .6rem; flex-wrap: wrap; }
.st-ayuda-fila .btn-ayuda { margin: 0; min-height: 40px; padding: 0 .9rem 0 .7rem; }

/* ---------- Las tres acciones ---------- */
.st-acciones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; max-width: 1040px; margin: 0 auto 1.2rem; }
.st-accion {
  display: grid; justify-items: start; align-content: start; gap: .35rem; min-height: 132px; padding: 1.1rem 1.2rem; text-align: left;
  border: 1.5px solid var(--linea); border-radius: var(--r-l); background: var(--superficie); color: var(--texto); font: inherit; cursor: pointer;
  box-shadow: var(--sombra-1); transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.st-accion:hover { transform: translateY(-2px); box-shadow: var(--sombra-2); border-color: var(--linea-fuerte); }
.st-accion:active { transform: translateY(0) scale(.99); }
.st-accion strong { font-size: 1.05rem; margin-top: .35rem; }
.st-accion > span:last-child { color: var(--texto-2); font-size: .94rem; line-height: 1.35; }
.st-accion-ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; background: var(--relleno); color: var(--texto-2); }
.st-accion.marca .st-accion-ic { background: var(--marca-suave); color: var(--marca-tinta); }
.st-accion.ok .st-accion-ic { background: var(--ok-suave); color: var(--ok); }
.st-accion.aviso .st-accion-ic { background: var(--aviso-suave); color: var(--aviso-tinta); }

/* ---------- Avisos con número ---------- */
.st-resumen { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: .8rem; max-width: 1040px; margin: 0 auto 1.6rem; }
.st-numero {
  display: flex; align-items: center; gap: 1rem; min-height: 72px; padding: .9rem 1.1rem; text-align: left;
  border: 1.5px solid var(--linea); border-radius: var(--r-l); background: var(--superficie); color: var(--texto); font: inherit; cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.st-numero:hover { transform: translateY(-2px); box-shadow: var(--sombra-2); }
.st-numero > .icono:last-child { flex: none; color: var(--texto-3); }
.st-numero-n { flex: none; display: grid; place-items: center; min-width: 52px; height: 52px; padding: 0 .5rem; border-radius: 15px; font-family: var(--fuente-display); font-size: 1.6rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.st-numero-txt { flex: 1; display: grid; gap: .1rem; min-width: 0; }
.st-numero-txt strong { font-size: 1.05rem; }
.st-numero-txt span { color: var(--texto-2); font-size: .94rem; }
.st-numero.aviso { background: var(--aviso-suave); border-color: var(--aviso-linea); }
.st-numero.aviso .st-numero-n { background: var(--superficie); color: var(--aviso-tinta); }
.st-numero.ok .st-numero-n { background: var(--ok-suave); color: var(--ok); }
.st-numero.peligro { background: var(--peligro-suave); border-color: var(--peligro-linea); }
.st-numero.peligro .st-numero-n { background: var(--superficie); color: var(--peligro-tinta); }

/* ---------- Lista de productos ---------- */
.st-productos { max-width: 1040px; margin: 0 auto 1.2rem; padding: .9rem; border-radius: var(--r-l); background: var(--superficie); box-shadow: var(--sombra-1); }
.st-productos-cab { display: flex; align-items: baseline; justify-content: space-between; gap: .8rem; padding: .3rem .5rem .7rem; }
.st-productos-cab h2 { font-size: 1.05rem; font-weight: 700; }
.st-total { font-size: .94rem; }
.st-letras:not(:empty) { padding: 0 .3rem .6rem; }
.st-filas { display: grid; }
.st-fila {
  display: grid; grid-template-columns: minmax(0, 1fr) auto 16px; align-items: center; gap: .9rem; min-height: 60px; padding: .65rem .7rem;
  border: 0; border-radius: var(--r-m); background: none; color: var(--texto); font: inherit; text-align: left; cursor: pointer;
  transition: background-color .15s var(--ease);
}
.st-fila + .st-fila { box-shadow: 0 -1px 0 var(--linea); }
.st-fila:hover { background: var(--fila-hover); }
.st-fila:hover + .st-fila, .st-fila:hover { box-shadow: none; }
.st-fila-nombre { display: grid; gap: .1rem; min-width: 0; }
.st-fila-nombre strong { font-size: 1.05rem; font-weight: 600; overflow-wrap: anywhere; }
.st-fila-nombre small { color: var(--marca-tinta); font-size: .82rem; font-weight: 600; }
.st-fila-locales { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; }
.st-cant { display: grid; justify-items: center; min-width: 3.6rem; padding: .3rem .55rem; border-radius: 11px; background: var(--relleno); font-variant-numeric: tabular-nums; }
.st-cant small { color: var(--texto-3); font-size: .82rem; font-weight: 600; white-space: nowrap; }
.st-cant b { font-size: 1.05rem; font-weight: 700; white-space: nowrap; }
.st-cant.mia { box-shadow: inset 0 0 0 1.5px rgb(var(--marca-rgb) / .35); }
.st-cant.aviso { background: var(--aviso-suave); }
.st-cant.aviso b { color: var(--aviso-tinta); }
.st-cant.peligro { background: var(--peligro-suave); }
.st-cant.peligro b { color: var(--peligro-tinta); }
.st-fila-ir { color: var(--texto-3); display: grid; }
.st-productos .paginador { margin-top: .6rem; }
.st-pie { max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 520px); }

/* ---------- Hojas ---------- */
.st-heroe-ic { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 22px; background: var(--relleno); color: var(--texto-2); box-shadow: var(--sombra-1); }
.st-heroe-ic.aviso { background: var(--aviso-suave); color: var(--aviso-tinta); }
.st-heroe-ic.peligro { background: var(--peligro-suave); color: var(--peligro); }
.st-heroe-ic.marca { background: var(--marca-suave); color: var(--marca-tinta); }
.st-heroe-hoja h1 { overflow-wrap: anywhere; }
.st-heroe-hoja .hp-sub { max-width: 56ch; }
.st-centro { display: flex; justify-content: center; }
.st-centro-txt { text-align: center; }
.st-selector { width: auto; }
.st-tarjetas { display: grid; gap: .8rem; }
.st-tarjeta { display: grid; gap: .5rem; padding: 1rem 1.15rem; border: 1.5px solid var(--linea); border-radius: var(--r-l); background: var(--superficie); box-shadow: var(--sombra-1); text-align: left; }
.st-tarjeta.revisada { opacity: .72; }
.st-tarjeta > p { font-size: .94rem; line-height: 1.4; }
.st-tarjeta-cab { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.st-tarjeta-titulo, .st-tarjeta-nombre { font-size: 1.05rem; font-weight: 700; color: var(--texto); }
.st-tarjeta-nombre { min-height: 40px; padding: 0; border: 0; background: none; font: inherit; font-weight: 700; text-align: left; cursor: pointer; text-decoration: underline; text-decoration-color: var(--linea-fuerte); text-underline-offset: 4px; }
.st-tarjeta-nombre:hover { text-decoration-color: currentColor; }
.st-tarjeta-datos { display: flex; gap: .4rem; flex-wrap: wrap; }
.st-tarjeta-datos > span { padding: .3rem .7rem; border-radius: 999px; background: var(--relleno); font-size: .94rem; }
.st-tarjeta-revision { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: .94rem; }
.st-tarjeta-acciones { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .2rem; }
.st-tarjeta-acciones .btn { min-height: 46px; padding: 0 1.2rem; font-size: .94rem; }
.st-tarjeta .inc-grupo summary { cursor: pointer; font-size: .94rem; min-height: 32px; }
.st-tarjeta .inc-grupo ul { margin: .4rem 0 0 1.1rem; font-size: .94rem; display: grid; gap: .25rem; }

/* Ficha del producto */
.st-locales { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .7rem; }
.st-local { display: grid; gap: .2rem; padding: 1rem 1.15rem; border: 1.5px solid var(--linea); border-radius: var(--r-l); background: var(--superficie); box-shadow: var(--sombra-1); text-align: left; }
.st-local-nombre { font-weight: 650; font-size: .94rem; color: var(--texto-2); }
.st-local-nombre small { font-size: .82rem; font-weight: 600; color: var(--marca-tinta); }
.st-local-n { font-family: var(--fuente-display); font-size: 2.2rem; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.st-local > small { color: var(--texto-3); font-size: .82rem; }
.st-local.aviso { background: var(--aviso-suave); border-color: var(--aviso-linea); }
.st-local.aviso .st-local-n { color: var(--aviso-tinta); }
.st-local.peligro { background: var(--peligro-suave); border-color: var(--peligro-linea); }
.st-local.peligro .st-local-n { color: var(--peligro-tinta); }
.st-movs { list-style: none; margin: 0; padding: 0 1rem; border-radius: var(--r-l); background: var(--superficie); box-shadow: var(--sombra-1); }
.st-movs li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 0; }
.st-movs li + li { border-top: 1px solid var(--linea); }
.st-mov-txt { display: grid; gap: .1rem; min-width: 0; }
.st-mov-txt strong { font-size: .94rem; }
.st-mov-txt small { color: var(--texto-3); font-size: .82rem; overflow-wrap: anywhere; }
.st-mov-n { flex: none; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.st-mov-n.mas { color: var(--ok); }
.st-mov-n.menos { color: var(--texto-2); }
.st-hoja-ficha .hp-seccion > .btn { justify-self: center; }

/* ---------- Celular ---------- */
@media (max-width: 760px) {
  .st-heroe { margin-top: 0; margin-bottom: 1.1rem; }
  .st-acciones { grid-template-columns: minmax(0, 1fr); gap: .6rem; }
  .st-accion { grid-template-columns: 48px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: .9rem; row-gap: .1rem; align-items: center; min-height: 0; padding: .85rem 1rem; }
  .st-accion-ic { grid-row: 1 / span 2; }
  .st-accion strong { margin-top: 0; align-self: end; }
  .st-accion > span:last-child { align-self: start; }
  .st-resumen { grid-template-columns: minmax(0, 1fr); gap: .6rem; margin-bottom: 1.1rem; }
  .st-productos { padding: .6rem; }
  .st-fila { grid-template-columns: minmax(0, 1fr) 16px; row-gap: .45rem; }
  .st-fila-locales { grid-column: 1; grid-row: 2; justify-content: flex-start; }
  .st-fila-ir { grid-column: 2; grid-row: 1 / span 2; }
  .st-locales { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-local-n { font-size: 1.8rem; }
}
.st-buscador .camara-en-campo { width: 44px; height: 44px; right: .5rem; }
/* La flecha de las acciones apunta hacia adelante (en estilos.css queda invertida). */
.st-hoja .eq-accion > .icono:last-child, .st-pie .eq-accion > .icono:last-child { transform: none; }
