/* Bodega · Mi equipo (APP móvil, tema oscuro) */

.bodega-wrap {
  padding-bottom: 80px; /* espacio para el botón flotante */
}

.bodega-fab {
  position: fixed;
  right: 16px;
  bottom: 104px; /* sobre la barra inferior */
  z-index: 1010;
  border-radius: 28px;
  padding: 12px 22px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* Lista compacta agrupada por categoría */
.bodega-grupo-titulo {
  display: flex;
  justify-content: space-between;
  margin: 16px 0 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid #444;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffc107;
}

.bodega-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  margin-bottom: 6px;
  padding: 8px 12px;
  text-align: left;
  color: #fff;
  background: #2b2f33;
  border: 1px solid #3d4247;
  border-radius: 8px;
}

.bodega-item:active {
  background: #373b40;
}

.bodega-item-desc {
  font-weight: 600;
  line-height: 1.25;
}

.bodega-item-meta {
  font-size: 0.8rem;
  color: #adb5bd;
}

.bodega-item-obs {
  font-size: 0.78rem;
  font-style: italic;
  color: #8d949b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 62vw;
}

.bodega-propio {
  color: #75b798;
}

.bodega-item-cant {
  flex-shrink: 0;
  min-width: 52px;
  padding: 4px 10px;
  text-align: center;
  font-weight: 700;
  color: #000;
  background: #ffc107;
  border-radius: 14px;
}

/* Cuadrícula de categorías */
.bodega-cats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.bodega-cat-btn {
  min-height: 56px;
  padding: 8px;
  font-weight: 600;
  color: #fff;
  background: #2b2f33;
  border: 1px solid #4a5056;
  border-radius: 8px;
}

.bodega-cat-btn:active {
  background: #ffc107;
  color: #000;
}

/* Opciones en botones (chips) con objetivos táctiles amplios */
.bodega-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bodega-chips .btn {
  min-height: 44px;
  padding: 8px 14px;
}

.bodega-chips .btn-check:checked + .btn {
  color: #000;
  background-color: #ffc107;
  border-color: #ffc107;
}

/* Cantidad con − / + */
.bodega-cantidad {
  max-width: 220px;
}

.bodega-cantidad .btn {
  min-width: 52px;
  font-size: 1.3rem;
  line-height: 1;
}

.bodega-cantidad input {
  text-align: center;
  font-weight: 700;
}

.bodega-mas-datos {
  width: 100%;
  text-align: left;
}

/* Opción desactivada que el material todavía usa */
.bodega-chips .btn.bodega-inactiva {
  color: #adb5bd;
  border-color: #6c757d;
  border-style: dashed;
}

.bodega-chips .btn-check:checked + .btn.bodega-inactiva {
  color: #fff;
  background-color: #6c757d;
  border-color: #adb5bd;
}

/* ============================================================
   Equipo en operación
   ============================================================ */

#bodega_tabs .nav-link {
  min-height: 44px;
  font-weight: 600;
}

.bodega-wrap {
  padding-bottom: 150px; /* deja ver el final de la lista sobre la barra de guardado */
}

.op-banner {
  margin-bottom: 14px;
  padding: 10px 12px;
  background: #2b2f33;
  border: 1px solid #3d4247;
  border-left: 4px solid #ffc107;
  border-radius: 8px;
}

.op-foto-img {
  display: block;
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 8px;
  cursor: zoom-in;
}

.op-foto-vacia {
  padding: 28px 0;
  text-align: center;
  color: #8d949b;
  border: 1px dashed #5a6269;
  border-radius: 8px;
}

.op-fila {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  padding: 8px 10px;
  background: #2b2f33;
  border: 1px solid #3d4247;
  border-radius: 8px;
}

.op-fila.op-sel {
  border-color: #ffc107;
  background: #34312a;
}

.op-fila.op-excede {
  border-color: #dc3545;
}

.op-fila-info {
  min-width: 0;
}

.op-aviso {
  margin-top: 2px;
  font-size: 0.78rem;
  color: #ea868f;
}

.op-stepper {
  flex-shrink: 0;
  width: 140px;
}

.op-stepper .btn {
  min-width: 42px;
  font-size: 1.2rem;
  line-height: 1;
}

.op-stepper input {
  min-width: 0;
  padding-left: 2px;
  padding-right: 2px;
  text-align: center;
  font-weight: 700;
}

/* Barra fija de guardado, encima del menú inferior */
.bodega-barra {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 78px;
  z-index: 1005;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px;
  background: #1f2327;
  border-top: 1px solid #ffc107;
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.5);
}

.bodega-barra .btn {
  min-height: 44px;
  font-weight: 700;
}

.bodega-barra-texto {
  line-height: 1.2;
}

/* Tu lista / Agregar desde Mi equipo */
.op-quitar {
  display: inline-block;
  margin-top: 4px;
  padding: 6px 0 !important;
  text-decoration: none;
}

.op-agregar {
  flex-shrink: 0;
  min-width: 96px;
  min-height: 44px;
  font-weight: 600;
}

/* Vista de consulta de «Equipo colectivo» */
.op-total {
  margin-bottom: 8px;
  color: #ced4da;
}

/* Materiales nuevos en borrador */
.op-etiqueta {
  margin-top: 2px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #ffc107;
}

.op-quitado {
  opacity: 0.75;
}

.op-quitado .bodega-item-desc {
  text-decoration: line-through;
}

/* Visor de fotografía (lightbox) */
.bodega-visor .modal-content {
  position: relative;
  height: 100%;
  background: #000;
  border: 0;
  border-radius: 0;
}

.bodega-visor-escenario {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;            /* los gestos son del visor: la página no hace zoom ni se desplaza */
  overscroll-behavior: contain;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.bodega-visor-escenario img {
  max-width: 100%;               /* se ajusta a la pantalla respetando proporciones */
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transform-origin: center center;
  will-change: transform;
  -webkit-user-drag: none;
}

.bodega-visor-x {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0 0 4px;
  font-size: 2rem;
  line-height: 1;
  color: #fff;
  background: rgba(0, 0, 0, 0.65);
  border: 2px solid #fff;
  border-radius: 50%;
}

.bodega-visor-pista {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  pointer-events: none;
}
