/* Estilos Base y Premium (App.css) */
body {
  background-color: #f4f6f9;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #333;
  padding-bottom: 55px; /* Espacio para el menú inferior */
}

/* Tipografía moderna y sombras suaves */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  color: #2c3e50;
}

/* Tarjetas Premium */
.card-premium {
  background: #ffffff;
  border-radius: 12px;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  margin-bottom: 1rem;
  overflow: hidden;
}

/* ---- Tamaño personalizado para los badges de inventario ---- */
.badge-stock {
  font-size: 14px; /* Tamaño de fuente más grande */
  padding: 8px 12px; /* Más espacio interno (arriba/abajo, izquierda/derecha) */
  font-weight: 500; /* Letra un poco menos gruesa que el bold por defecto */
  border-radius: 8px; /* Bordes un poco más suaves */
}

/* Espaciado para que los badges de ubicación no se peguen si hay varios */
.badge-stock-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap; /* Agregamos esto para que si no caben en pantallas muy pequeñas, bajen suavemente */
  justify-content: flex-end; /* Mantiene los badges pegados hacia la derecha */
}

/* Inputs y Botones con efecto Focus elegante */
.form-control {
  border-radius: 8px;
  border: 1px solid #ced4da;
  padding: 0.75rem 1rem;
  height: auto;
  font-size: 1rem;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
  transition:
    border-color 0.2s ease-in-out,
    box-shadow 0.2s ease-in-out;
}

.form-control:focus {
  border-color: #3498db;
  box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.btn-premium {
  border-radius: 8px;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-premium:active {
  transform: translateY(1px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-primary-premium {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  border: none;
  color: #fff;
}

.btn-primary-premium:hover,
.btn-primary-premium:focus {
  background: linear-gradient(135deg, #2980b9 0%, #2471a3 100%);
  color: #fff;
}

.btn-success-premium {
  background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
  border: none;
  color: #fff;
}

.btn-danger-premium {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  border: none;
  color: #fff;
}

/* Lista de Productos */
#listaProductos {
  list-style: none;
  padding: 0;
  margin: 0;
}

#listaProductos li {
  background: #fff;
  margin-bottom: 8px;
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  border-left: 4px solid #3498db;
}

#listaProductos li:active {
  background: #f8f9fa;
}

#listaProductos li span:last-child {
  font-weight: 600;
  color: #27ae60;
}

/* Elementos del Carrito */
.item-carrito {
  background: #fff;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}

.item-carrito-nombre {
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
}

.item-carrito-precio {
  color: #7f8c8d;
  font-size: 0.9em;
}

.item-carrito-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #eee;
  padding-top: 8px;
}

.item-carrito-controles {
  display: flex;
  align-items: center;
}

.btn-qty {
  background: #f1f2f6;
  border: 1px solid #dfe4ea;
  border-radius: 4px;
  width: 30px;
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  color: #2f3640;
  cursor: pointer;
}

.item-carrito-unidades {
  margin: 0 10px;
  font-weight: bold;
}

.item-carrito-subtotal {
  font-weight: 600;
  color: #27ae60;
}

.item-carrito-quitar {
  background: #e74c3c;
  color: #fff;
  border: none;
  border-radius: 4px;
  width: 32px;
  height: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Pantalla de Carga */
#loading {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.spinner-border-premium {
  width: 3rem;
  height: 3rem;
  color: #3498db;
}

/* Menú Inferior (Navegación Fija) */
.menu-inferior {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: space-around;
  padding: 6px 0;
  z-index: 1000;
  border-top: 1px solid #e9ecef;
}

.menu-inferior button {
  background: transparent;
  border: none;
  color: #7f8c8d;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.7rem;
  width: 25%;
  outline: none;
}

.menu-inferior button i {
  font-size: 1.3rem;
  margin-bottom: 0px;
  transition: color 0.2s;
}

.menu-inferior button:active i,
.menu-inferior button.active i {
  color: #3498db;
}
.menu-inferior button:active,
.menu-inferior button.active {
  color: #3498db;
}

/* Utilidades varias */
.badge-cart {
  position: absolute;
  top: 0px;
  right: 25%;
  transform: translateX(50%);
  background: #e74c3c;
  color: white;
  border-radius: 50%;
  padding: 0.2em 0.5em;
  font-size: 0.7em;
  font-weight: bold;
}

#product-image-container img {
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: 8px;
}

#product-image-container i {
  font-size: 6rem;
  color: #bdc3c7;
}

/* Dashboard options */
.dashboard-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  text-decoration: none;
  color: #2c3e50;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  height: 100%;
  border: 1px solid #f1f2f6;
}
.dashboard-btn:active {
  transform: scale(0.98);
}
.dashboard-btn i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #3498db;
}
.dashboard-btn.transfer i {
  color: #9b59b6;
}

/* Custom Modal */
.custom-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  backdrop-filter: blur(2px);
}

.custom-modal-content {
  width: 100%;
  max-width: 320px;
  transform: translateY(0);
  animation: modalIn 0.3s ease-out;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
