/* --- Variables y Reset --- */
:root {
  --blanco: #ffffff;
  --gris-fondo: #f8fafc;
  --gris-borde: #e2e8f0;
  --azul: #0f2b5c;
  --azul-claro: #1d4ed8;
  --rojo: #dc2626;
  --rojo-hover: #b91c1c;
  --verde: #16a34a;
  --texto-oscuro: #1e293b;
  --texto-suave: #64748b;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--gris-fondo);
  color: var(--texto-oscuro);
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.5;
}

/* --- Barra de Navegación Sticky --- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.85rem 5%;
  background: var(--blanco);
  border-bottom: 1px solid var(--gris-borde);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.btn-volver-web {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--azul);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
  background: var(--gris-fondo);
  border: 2px solid var(--gris-borde);
  white-space: nowrap;
  transition: all 0.2s ease;
}

.btn-volver-web:hover {
  background: #eff6ff;
  border-color: var(--azul-claro);
  color: var(--azul-claro);
}

/* --- Cabecera Hero --- */
.tienda-hero {
  background-image: 
    linear-gradient(rgba(15, 43, 92, 0.75), rgba(29, 78, 216, 0.50)), 
    url(../img/ImgTienda.jpg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center 20%;
  color: var(--blanco);
  padding: 3.5rem 5% 3rem;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.tienda-tag {
  display: inline-block;
  background-color: var(--rojo);
  color: var(--blanco);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

.tienda-hero h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 0.5rem;
}

/* --- Contenedor Principal --- */
.tienda-main {
  max-width: 1200px;
  margin: 2.5rem auto 4.5rem;
  padding: 0 5%;
}

/* --- Filtros de Categoría --- */
.filtros-categoria {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
}

.btn-filtro {
  background: var(--blanco);
  border: 1px solid var(--gris-borde);
  color: var(--texto-suave);
  padding: 0.55rem 1.2rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-filtro:hover {
  border-color: var(--azul);
  color: var(--azul);
}

.btn-filtro.activo {
  background-color: var(--azul);
  border-color: var(--azul);
  color: var(--blanco);
}

/* --- Rejilla de Productos --- */
.tienda-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.75rem;
}

.producto-card {
  background: var(--blanco);
  border: 1px solid var(--gris-borde);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 14px rgba(15, 43, 92, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.producto-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(15, 43, 92, 0.08);
  border-color: #cbd5e1;
}

.producto-img-box {
  width: 100%;
  aspect-ratio: 4 / 3;
  background-color: var(--gris-fondo);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.producto-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.producto-card:hover .producto-img-box img {
  transform: scale(1.03);
}

.producto-info {
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
  gap: 1rem;
}

.producto-categoria {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--rojo);
  letter-spacing: 0.5px;
}

.producto-nombre {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--azul);
  line-height: 1.35;
  min-height: 2.7em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.producto-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-top: 1px solid #f1f5f9;
  padding-top: 0.9rem;
  margin-top: auto;
}

.producto-precio {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--texto-oscuro);
  letter-spacing: -0.3px;
  white-space: nowrap;
}

.btn-consultar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: none;
  background: var(--azul);
  color: var(--blanco);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.65rem 1.15rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.btn-consultar:hover {
  background-color: var(--azul-claro);
}

/* --- Estados de Carga y Vacío --- */
.estado-cargando {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--texto-suave);
  padding: 3rem 0;
}

.sin-productos {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  background: var(--blanco);
  border: 1px dashed var(--gris-borde);
  border-radius: 14px;
}

.sin-productos p {
  color: var(--texto-suave);
  font-size: 0.95rem;
}

/* --- Barra de Usuario y Sesión --- */
.nav-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-usuario {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.usuario-sesion {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--azul);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}

.btn-login-nav {
  background: var(--azul);
  color: var(--blanco);
  border: none;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.45rem 0.95rem;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}

.btn-login-nav:hover {
  background: var(--rojo);
}

.btn-logout {
  background: transparent;
  color: var(--texto-suave);
  border: 1px solid var(--gris-borde);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.btn-logout:hover {
  color: var(--rojo);
  border-color: var(--rojo);
}

/* --- Modal Login y Registro --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 43, 92, 0.6);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  z-index: 2000;
  padding: 1rem;
}

.modal-card {
  background: var(--blanco);
  padding: 2rem;
  border-radius: 14px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-card h3 {
  color: var(--azul);
  font-size: 1.25rem;
  margin-bottom: 0.4rem;
  text-align: center;
}

.modal-card p {
  color: var(--texto-suave);
  font-size: 0.85rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.input-grupo {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.input-grupo label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--texto-oscuro);
}

.input-grupo input {
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--gris-borde);
  border-radius: 6px;
  font-size: 0.9rem;
  outline: none;
}

.input-grupo input:focus {
  border-color: var(--azul);
}

.login-msg-error {
  color: var(--rojo);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-align: center;
}

.modal-acciones {
  display: flex;
  gap: 0.8rem;
  margin-top: 1.2rem;
}

.btn-cancelar {
  flex: 1;
  padding: 0.65rem;
  border: 1px solid var(--gris-borde);
  background: #f1f5f9;
  color: var(--texto-oscuro);
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
}

.btn-confirmar {
  flex: 1;
  padding: 0.65rem;
  border: none;
  background: var(--azul);
  color: var(--blanco);
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-confirmar:hover {
  background: var(--rojo);
}

.btn-confirmar:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: var(--texto-suave);
}

/* --- Panel Mis Pedidos --- */
.mis-pedidos-section {
  margin-bottom: 2.5rem;
}

.mis-pedidos-card {
  background: var(--blanco);
  border: 1px solid var(--gris-borde);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(15, 43, 92, 0.04);
}

.mis-pedidos-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gris-borde);
  margin-bottom: 1rem;
}

.mis-pedidos-titulo-grupo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.mis-pedidos-titulo-grupo h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--azul);
}

.mis-pedidos-badge {
  background: var(--azul);
  color: var(--blanco);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.15rem 0.6rem;
  border-radius: 50px;
}

.btn-refrescar-pedidos {
  background: var(--gris-fondo);
  border: 1px solid var(--gris-borde);
  color: var(--texto-oscuro);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-refrescar-pedidos:hover {
  border-color: var(--azul);
  color: var(--azul);
}

.mis-pedidos-lista {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mis-pedidos-vacio {
  text-align: center;
  color: var(--texto-suave);
  font-size: 0.9rem;
  padding: 1.2rem 0.5rem;
}

.pedido-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  background: var(--gris-fondo);
  border: 1px solid var(--gris-borde);
  border-radius: 10px;
  flex-wrap: wrap;
}

.pedido-item-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.pedido-item-titulo {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--azul);
}

.pedido-item-detalles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--texto-suave);
}

.pedido-item-detalles strong {
  color: var(--texto-oscuro);
}

.pedido-item-acciones {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pedido-estado-badge {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 50px;
  letter-spacing: 0.4px;
}

.estado-pendiente {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.estado-entregado {
  background: #dcfce7;
  color: var(--verde);
  border: 1px solid #bbf7d0;
}

.estado-cancelado {
  background: #f1f5f9;
  color: var(--texto-suave);
  border: 1px solid var(--gris-borde);
  text-decoration: line-through;
}

.btn-cancelar-pedido {
  background: transparent;
  color: var(--rojo);
  border: 1px solid #fecaca;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-cancelar-pedido:hover:not(:disabled) {
  background: var(--rojo);
  color: var(--blanco);
  border-color: var(--rojo);
}

.btn-cancelar-pedido:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- Modal Configuración de Encargo --- */
.modal-card.modal-card-encargo {
  max-width: 440px;
}

.encargo-producto-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--gris-fondo);
  border: 1px solid var(--gris-borde);
  border-radius: 10px;
  padding: 0.75rem;
  margin-bottom: 1.2rem;
}

.encargo-producto-preview img {
  width: 68px;
  height: 68px;
  object-fit: cover;
  border-radius: 8px;
  background: #e2e8f0;
  flex-shrink: 0;
}

.encargo-producto-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.encargo-producto-meta h4 {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--azul);
  line-height: 1.25;
}

.encargo-precio-unit {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--texto-oscuro);
}

.selector-tallas-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.2rem;
}

.btn-talla-opcion {
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--gris-borde);
  background: var(--gris-fondo);
  color: var(--texto-oscuro);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-talla-opcion:hover {
  border-color: var(--azul);
}

.btn-talla-opcion.seleccionada {
  background: var(--azul);
  color: var(--blanco);
  border-color: var(--azul);
}

.btn-talla-opcion.ya-encargada {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}

.btn-talla-opcion.ya-encargada.seleccionada {
  background: #d97706;
  color: var(--blanco);
  border-color: #b45309;
}

.encargo-msg-duplicado {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  text-align: left;
  line-height: 1.4;
}

.selector-cantidad-box {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-cantidad-ctrl {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--gris-borde);
  background: var(--gris-fondo);
  color: var(--azul);
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-cantidad-ctrl:hover:not(:disabled) {
  background: var(--azul);
  color: var(--blanco);
  border-color: var(--azul);
}

.btn-cantidad-ctrl:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

#encargo-cantidad {
  width: 60px;
  text-align: center;
  font-weight: 800;
  padding: 0.45rem;
}

.encargo-resumen-box {
  background: var(--gris-fondo);
  border: 1px solid var(--gris-borde);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.encargo-resumen-fila {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--texto-suave);
}

.encargo-resumen-fila strong {
  color: var(--texto-oscuro);
}

.encargo-resumen-total {
  border-top: 1px dashed var(--gris-borde);
  padding-top: 0.45rem;
  margin-top: 0.15rem;
  font-size: 0.92rem;
}

.encargo-resumen-total strong {
  font-size: 1.15rem;
  color: var(--azul);
  font-weight: 800;
}

.encargo-msg-exito {
  color: var(--verde);
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-align: center;
}

/* --- Panel de Gestión de Entrenadores (RBAC) --- */
.admin-pedidos-section {
  margin-bottom: 2.5rem;
}

.admin-pedidos-card {
  background: var(--blanco);
  border: 2px solid var(--azul);
  border-radius: 16px;
  padding: 1.6rem;
  box-shadow: 0 8px 25px rgba(15, 43, 92, 0.08);
}

.admin-pedidos-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gris-borde);
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.admin-titulo-grupo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.admin-badge-rol {
  background: var(--rojo);
  color: var(--blanco);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.admin-titulo-grupo h2 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--azul);
}

.btn-admin-sync {
  background: var(--gris-fondo);
  border: 1px solid var(--gris-borde);
  color: var(--azul);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-admin-sync:hover:not(:disabled) {
  background: #eff6ff;
  border-color: var(--azul-claro);
}

.btn-admin-sync:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Métricas Rápidas */
.admin-metricas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.admin-metrica-box {
  padding: 1rem 1.2rem;
  border-radius: 12px;
  border: 1px solid var(--gris-borde);
  background: var(--gris-fondo);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.admin-metrica-box.metrica-pendientes {
  background: #fffbeb;
  border-color: #fde68a;
}

.admin-metrica-box.metrica-entregados {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.admin-metrica-box.metrica-activos {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.metrica-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--texto-suave);
}

.metrica-valor {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--azul);
}

.metrica-sub {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--texto-oscuro);
}

/* Resumen Proveedor */
.admin-proveedor-box {
  background: var(--gris-fondo);
  border: 1px solid var(--gris-borde);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.4rem;
}

.admin-proveedor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.admin-proveedor-header h3 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--azul);
}

.btn-copiar-proveedor {
  background: var(--azul);
  color: var(--blanco);
  border: none;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-copiar-proveedor:hover:not(:disabled) {
  background: var(--azul-claro);
}

.btn-copiar-proveedor:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.admin-proveedor-lista {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.proveedor-item-fila {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  background: var(--blanco);
  border: 1px solid var(--gris-borde);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  flex-wrap: wrap;
}

.proveedor-prenda-nombre {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--texto-oscuro);
}

.proveedor-tallas-chips {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.proveedor-chip-talla {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: var(--azul);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 6px;
}

.proveedor-chip-total {
  background: var(--azul);
  color: var(--blanco);
  font-size: 0.76rem;
  font-weight: 800;
  padding: 0.15rem 0.6rem;
  border-radius: 6px;
}

/* Controles de Filtro y Búsqueda Admin */
.admin-controles-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.admin-filtros-estado {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.btn-filtro-admin {
  background: var(--gris-fondo);
  border: 1px solid var(--gris-borde);
  color: var(--texto-suave);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.45rem 0.95rem;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-filtro-admin:hover {
  border-color: var(--azul);
  color: var(--azul);
}

.btn-filtro-admin.activo {
  background: var(--azul);
  border-color: var(--azul);
  color: var(--blanco);
}

.admin-buscador-box {
  flex: 1;
  min-width: 240px;
  max-width: 360px;
}

.admin-buscador-box input {
  width: 100%;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--gris-borde);
  border-radius: 8px;
  font-size: 0.85rem;
  outline: none;
  background: var(--gris-fondo);
}

.admin-buscador-box input:focus {
  border-color: var(--azul);
  background: var(--blanco);
}

/* Lista de Pedidos Admin */
.admin-pedidos-lista {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: 560px;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.admin-pedido-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  background: var(--gris-fondo);
  border: 1px solid var(--gris-borde);
  border-radius: 10px;
  flex-wrap: wrap;
}

.admin-pedido-main {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.admin-pedido-atleta-linea {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.admin-atleta-nombre {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--azul);
}

.admin-atleta-codigo {
  background: #e2e8f0;
  color: var(--texto-oscuro);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  font-family: monospace;
}

.admin-pedido-fecha {
  font-size: 0.75rem;
  color: var(--texto-suave);
}

.admin-pedido-prenda-linea {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  font-size: 0.86rem;
  color: var(--texto-oscuro);
}

.admin-prenda-talla-highlight {
  background: var(--azul);
  color: var(--blanco);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.12rem 0.5rem;
  border-radius: 4px;
}

.admin-pedido-acciones {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-accion-admin {
  border: 1px solid var(--gris-borde);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-accion-admin:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-accion-entregar {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.btn-accion-entregar:hover:not(:disabled) {
  background: var(--verde);
  border-color: var(--verde);
  color: var(--blanco);
}

.btn-accion-cancelar {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
}

.btn-accion-cancelar:hover:not(:disabled) {
  background: var(--rojo);
  border-color: var(--rojo);
  color: var(--blanco);
}

.btn-accion-reabrir {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: var(--azul);
}

.btn-accion-reabrir:hover:not(:disabled) {
  background: var(--azul);
  border-color: var(--azul);
  color: var(--blanco);
}

/* --- Footer --- */
.site-footer {
  background-color: #72b3dc;
  color: var(--blanco);
  padding: 3rem 5% 1.5rem;
  width: 100%;
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2.5rem;
}

.footer-col h3 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 1.2rem;
  color: var(--blanco);
}

.footer-col p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.95);
}

.footer-col a {
  color: var(--blanco);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.footer-col a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.footer-socials {
  display: flex;
  gap: 0.75rem;
}

.footer-socials a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--blanco);
  transition: transform 0.2s ease;
}

.footer-socials a:hover {
  transform: translateY(-3px);
}

.footer-socials a img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.50);
}

.footer-bottom {
  max-width: 1100px;
  margin: 2.5rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  text-align: center;
}

.footer-bottom p {
  font-size: 0.78rem;
  letter-spacing: 0.8px;
  color: rgba(255, 255, 255, 0.9);
}

/* --- Media Queries Consolidadas --- */
@media (max-width: 768px) {
  .navbar {
    padding: 0.65rem 4%;
    gap: 0.6rem;
  }

  .btn-volver-web {
    font-size: 0.8rem;
    padding: 0.4rem 0.65rem;
  }

  .nav-usuario {
    gap: 0.65rem;
  }

  .usuario-sesion {
    font-size: 0.82rem;
    max-width: 150px;
  }

  .site-footer {
    padding: 2.5rem 6% 1.5rem;
  }

  .footer-container {
    flex-direction: column;
    gap: 2rem;
  }

  .footer-col h3 {
    margin-bottom: 0.8rem;
  }
}

@media (max-width: 600px) {
  .tienda-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }

  .producto-info {
    padding: 0.85rem;
    gap: 0.75rem;
  }

  .producto-nombre {
    font-size: 0.92rem;
  }

  .producto-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
    padding-top: 0.7rem;
  }

  .producto-precio {
    font-size: 1.1rem;
  }

  .btn-consultar {
    width: 100%;
    padding: 0.55rem 0.75rem;
    font-size: 0.8rem;
  }

  .pedido-item-row,
  .admin-pedido-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .pedido-item-acciones {
    width: 100%;
    justify-content: space-between;
    border-top: 1px solid var(--gris-borde);
    padding-top: 0.6rem;
  }

  .admin-pedido-acciones {
    width: 100%;
    justify-content: flex-start;
    border-top: 1px solid var(--gris-borde);
    padding-top: 0.6rem;
  }

  .admin-buscador-box {
    max-width: 100%;
    width: 100%;
  }
}

@media (max-width: 360px) {
  .tienda-grid {
    grid-template-columns: 1fr;
  }
}
