/* ===== CATALOGO DISEÑO TABLA COMPLETA ===== */
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

.catalogo-section {
  flex: 1;
  padding: 100px 20px 60px;
  background: url('../assets/images/893.jpg') no-repeat center center fixed;
  background-size: cover;
  position: relative;
  min-height: calc(100vh - 80px); /* Altura menos el header */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Overlay para mejor legibilidad */
.catalogo-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1;
}

.catalogo-container {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  width: 100%;
}

.catalogo-header {
  text-align: center;
  margin-bottom: 40px;
}

.catalogo-header h1 {
  font-size: 3rem;
  color: #fff;
  margin-bottom: 15px;
  font-family: 'Poppins', sans-serif;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.catalogo-header .amarillo {
  color: #F4C10B;
}

.catalogo-header .linea-decorativa {
  width: 100px;
  height: 4px;
  background: #F4C10B;
  margin: 0 auto;
  border-radius: 2px;
}

/* Botón agregar */
.btn-agregar-container {
  text-align: center;
  margin-bottom: 30px;
}

.btn-agregar {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #27ae60;
  color: #fff;
  padding: 15px 25px;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 600;
  font-size: 1.1rem;
  box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.btn-agregar:hover {
  background: #219652;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(39, 174, 96, 0.4);
}

/* Tabla de catálogos */
.catalogo-table-container {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  backdrop-filter: blur(10px);
}

.catalogo-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.catalogo-table thead {
  background: #0985C8;
}

.catalogo-table th {
  padding: 18px 15px;
  text-align: left;
  color: white;
  font-weight: 600;
  font-size: 1.1rem;
  border: none;
}

.catalogo-table th:first-child {
  border-radius: 8px 0 0 0;
}

.catalogo-table th:last-child {
  border-radius: 0 8px 0 0;
}

.catalogo-table tbody tr {
  border-bottom: 1px solid #eee;
  transition: background 0.3s ease;
}

.catalogo-table tbody tr:hover {
  background: #f8f9fa;
}

.catalogo-table tbody tr:last-child {
  border-bottom: none;
}

.catalogo-table td {
  padding: 20px 15px;
  vertical-align: middle;
}

/* Columna del nombre con icono */
.catalogo-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.catalogo-info i {
  font-size: 2rem;
  color: #e74c3c;
  min-width: 40px;
}

.catalogo-info span {
  font-size: 1.1rem;
  font-weight: 500;
  color: #333;
}

/* Columna de acciones */
.catalogo-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 140px;
  justify-content: center;
}

.btn-descargar {
  background: #0985C8;
  color: #fff;
}

.btn-descargar:hover {
  background: #066aa3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(9, 133, 200, 0.3);
}

.btn-eliminar {
  background: #e74c3c;
  color: #fff;
}

.btn-eliminar:hover {
  background: #c0392b;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

/* Sin catálogos */
.no-catalogos {
  text-align: center;
  padding: 60px 20px;
  background: #f8f9fa;
  border-radius: 10px;
  border: 2px dashed #ddd;
}

.no-catalogos i {
  font-size: 4rem;
  color: #bdc3c7;
  margin-bottom: 20px;
}

.no-catalogos p {
  font-size: 1.2rem;
  color: #7f8c8d;
  margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .catalogo-section {
    padding: 100px 15px 40px;
  }
  
  .catalogo-header h1 {
    font-size: 2.2rem;
  }
  
  .catalogo-table-container {
    padding: 20px;
    overflow-x: auto;
  }
  
  .catalogo-table {
    min-width: 600px;
  }
  
  .catalogo-table th,
  .catalogo-table td {
    padding: 15px 10px;
  }
  
  .catalogo-actions {
    flex-direction: column;
    gap: 8px;
  }
  
  .btn {
    min-width: 120px;
    padding: 8px 15px;
  }
}

@media (max-width: 480px) {
  .catalogo-header h1 {
    font-size: 1.8rem;
  }
  
  .btn-agregar {
    padding: 12px 20px;
    font-size: 1rem;
  }
  
  .catalogo-info {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
  
  .catalogo-info i {
    font-size: 1.8rem;
  }
}

/********************agregegar catalogo *****************************/
/* ===== FORMULARIO AGREGAR CATÁLOGO ===== */
.agregar-catalogo-section {
  flex: 1;
  padding: 100px 20px 60px;
  background: url('../assets/images/893.jpg') no-repeat center center fixed;
  background-size: cover;
  position: relative;
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Overlay para mejor legibilidad */
.agregar-catalogo-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1;
}

.agregar-catalogo-container {
  position: relative;
  z-index: 2;
  max-width: 600px;
  width: 100%;
}

.agregar-catalogo-header {
  text-align: center;
  margin-bottom: 40px;
}

.agregar-catalogo-header h1 {
  font-size: 2.8rem;
  color: #fff;
  margin-bottom: 15px;
  font-family: 'Poppins', sans-serif;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.agregar-catalogo-header .amarillo {
  color: #F4C10B;
}

.agregar-catalogo-header .linea-decorativa {
  width: 100px;
  height: 4px;
  background: #F4C10B;
  margin: 0 auto;
  border-radius: 2px;
}

/* Formulario */
.catalogo-form-container {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  backdrop-filter: blur(10px);
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 1.1rem;
}

.form-group input[type="text"],
.form-group input[type="file"] {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #fff;
}

.form-group input[type="text"]:focus,
.form-group input[type="file"]:focus {
  outline: none;
  border-color: #0985C8;
  box-shadow: 0 0 0 3px rgba(9, 133, 200, 0.1);
}

.form-group input[type="file"] {
  padding: 10px 15px;
  background: #f8f9fa;
}

/* Mensajes de alerta */
.alerta {
  padding: 15px 20px;
  margin-bottom: 25px;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid transparent;
}

.alerta:contains("✅") {
  background: #d4edda;
  color: #155724;
  border-color: #c3e6cb;
}

.alerta:contains("❌"),
.alerta:contains("⚠️") {
  background: #f8d7da;
  color: #721c24;
  border-color: #f5c6cb;
}

/* ===== BOTONES FORMULARIO ===== */
.form-buttons {
  display: flex;
  gap: 15px;
  margin-top: 30px;
}

.btn-volver {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 25px;
  background: #6c757d;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  flex: 1;
  justify-content: center;
}

.btn-volver:hover {
  background: #5a6268;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
  color: #fff;
  text-decoration: none;
}

.btn-guardar {
  flex: 1;
  padding: 15px;
  background: #27ae60;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-guardar:hover {
  background: #219652;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

/* Responsive para botones */
@media (max-width: 480px) {
  .form-buttons {
    flex-direction: column;
    gap: 12px;
  }
  
  .btn-volver,
  .btn-guardar {
    width: 100%;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .agregar-catalogo-section {
    padding: 100px 15px 40px;
  }
  
  .agregar-catalogo-header h1 {
    font-size: 2.2rem;
  }
  
  .catalogo-form-container {
    padding: 30px 25px;
  }
}

@media (max-width: 480px) {
  .agregar-catalogo-header h1 {
    font-size: 1.8rem;
  }
  
  .catalogo-form-container {
    padding: 25px 20px;
  }
  
  .form-group input[type="text"],
  .form-group input[type="file"] {
    padding: 10px 12px;
  }
}

/* ===== RESPONSIVE MOBILE ADICIONAL - catalogo.css ===== */
@media (max-width: 480px) {
  /* CATÁLOGO PRINCIPAL */
  .catalogo-section {
    padding: 90px 10px 30px;
  }
  
  .catalogo-header h1 {
    font-size: 1.6rem;
  }
  
  .catalogo-table-container {
    padding: 15px;
    border-radius: 8px;
  }
  
  .catalogo-table {
    min-width: 500px;
  }
  
  .catalogo-table th,
  .catalogo-table td {
    padding: 12px 8px;
    font-size: 0.9rem;
  }
  
  .catalogo-info {
    flex-direction: column;
    gap: 5px;
    text-align: center;
  }
  
  .catalogo-info i {
    font-size: 1.5rem;
  }
  
  .catalogo-actions {
    flex-direction: column;
    gap: 6px;
  }
  
  .btn {
    min-width: 110px;
    padding: 8px 12px;
    font-size: 0.85rem;
  }
  
  /* FORMULARIO AGREGAR CATÁLOGO */
  .agregar-catalogo-section {
    padding: 90px 10px 30px;
  }
  
  .agregar-catalogo-header h1 {
    font-size: 1.6rem;
  }
  
  .catalogo-form-container {
    padding: 20px 15px;
  }
  
  .form-group {
    margin-bottom: 20px;
  }
  
  .form-group label {
    font-size: 1rem;
  }
  
  .form-group input[type="text"],
  .form-group input[type="file"] {
    padding: 10px 12px;
    font-size: 0.9rem;
  }
  
  .form-buttons {
    flex-direction: column;
    gap: 10px;
  }
  
  .btn-volver,
  .btn-guardar {
    padding: 12px 20px;
    font-size: 1rem;
  }
}

/* ===== TABLETAS PEQUEÑAS ===== */
@media (max-width: 1024px) and (min-width: 769px) {
  .catalogo-table-container {
    padding: 25px;
  }
  
  .catalogo-table {
    font-size: 0.95rem;
  }
  
  .catalogo-info i {
    font-size: 1.8rem;
  }
}

/* ===== ORIENTACIÓN HORIZONTAL EN MÓVILES ===== */
@media (max-height: 500px) and (max-width: 768px) {
  .catalogo-section,
  .agregar-catalogo-section {
    padding: 80px 15px 30px;
    min-height: auto;
  }
  
  .comentarios-page,
  .editar-page,
  .perfil-page {
    padding: 80px 15px 30px;
    min-height: auto;
  }
}

/* ===== MEJORAS PARA TÁCTIL ===== */
@media (hover: none) and (pointer: coarse) {
  .btn:hover,
  .btn-agregar:hover,
  .btn-descargar:hover,
  .btn-eliminar:hover,
  .btn-volver:hover,
  .btn-guardar:hover,
  .btn-icon:hover {
    transform: none;
    box-shadow: none;
  }
  
  .nav-links li a:hover {
    color: white;
  }
  
  .nav-links li:hover::after {
    width: 0%;
  }
}