/* ===========================
   ESTILOS GENERALES
   =========================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  /* Prevenir zoom en doble tap en dispositivos táctiles */
  touch-action: manipulation;
}

:root {
  /* Paleta de colores marrón inspirada en el logo */
  --color-primary: #4a3728;        /* Marrón oscuro principal */
  --color-secondary: #f5f1ed;      /* Beige claro */
  --color-accent: #8b6f47;         /* Marrón medio */
  --color-hover: #5c4435;          /* Marrón hover */
  --color-dark: #2d1f17;           /* Marrón muy oscuro */
  --color-light: #d4c5b5;          /* Beige medio */
  --color-text: #2d1f17;           /* Texto oscuro */
  --color-text-light: #6b5745;     /* Texto medio */
  --color-border: #c9b9a6;         /* Bordes */
  --color-bg: #faf8f5;             /* Fondo general */
  
  --shadow-sm: 0 2px 8px rgba(74, 55, 40, 0.1);
  --shadow-md: 0 4px 16px rgba(74, 55, 40, 0.15);
  --shadow-lg: 0 8px 32px rgba(74, 55, 40, 0.2);
  --transition: all 0.3s ease;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  padding: 2rem 1rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* Utilidades generales */
.oculto {
  display: none !important;
}

.cargando {
  text-align: center;
  padding: 4rem 2rem;
  font-size: 1.2rem;
  color: var(--color-text-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.spinner-lg {
  width: 50px;
  height: 50px;
  border-width: 4px;
}

/* Notificaciones */
.notificacion {
  position: fixed;
  top: 100px;
  right: 20px;
  background-color: var(--color-accent);
  color: var(--color-secondary);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  z-index: 10000;
  animation: slideIn 0.3s ease;
  font-weight: 500;
}

.notificacion.success {
  background-color: #28a745;
}

.notificacion.error {
  background-color: #dc3545;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Botones generales */
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-secondary);
  padding: 0.875rem 1.75rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--color-secondary);
  color: var(--color-primary);
  padding: 0.875rem 1.75rem;
  border: 2px solid var(--color-primary);
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
}

.btn-secondary:hover {
  background-color: var(--color-light);
}

/* ===========================
   SPINNER DE CARGA DE IMÁGENES
   =========================== */
.image-loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-light);
  z-index: 5;
  transition: opacity 0.3s ease;
}

.image-loader.loaded {
  opacity: 0;
  pointer-events: none;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive Generales */
@media (max-width: 768px) {
  main {
    padding: 1.5rem 0.75rem;
  }

  .btn-primary,
  .btn-secondary {
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
  }
}










