/* FERRETERÍA OMEGA Catálogos */

:root {
  --blue-primary: #121a77;
  --blue-secondary: #221c5a;
  --orange-main: #f97316;
  --orange-deep: #e36414;
  --orange-soft: #cd9b65;
  --gray-light: #f9fafb;
  --gray-mid: #d1d5db;
  --gray-dark: #374151;
}

/* SECCIÓN PRINCIPAL */
.catalogs-section {
  background-color: var(--gray-light);
  padding-top: 2rem;
  padding-bottom: 3rem;
}

/* TÍTULO Y SUBTÍTULO */
.section-title {
  font-size: clamp(1.5rem, 2vw + 0.5rem, 2rem);
  color: var(--blue-primary);
  font-weight: 700;
  text-transform: uppercase;
  position: relative;
  letter-spacing: 0.5px;
}

.section-title::after {
  content: "";
  display: block;
  width: 90px;
  height: 3px;
  background: var(--orange-main);
  margin: 0.6rem auto 0 auto;
  border-radius: 3px;
}

.section-subtitle {
  font-size: 0.95rem;
  color: var(--gray-dark);
  opacity: 0.85;
  max-width: 650px;
  margin: 0.8rem auto 0 auto;
}

/* CATÁLOGOS - GRID GENERAL */
.row.g-4 {
  margin-top: 1.5rem;
}

.catalog-card {
  background-color: #fff;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.catalog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* IMAGEN DEL CATÁLOGO */
.catalog-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--gray-mid);
}

.catalog-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.catalog-card:hover img {
  transform: scale(1.04);
  filter: brightness(0.95);
}

/*  OVERLAY INTERACTIVO */
.catalog-overlay {
  position: absolute;
  inset: 0;
  background: rgba(18, 26, 119, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.catalog-card:hover .catalog-overlay {
  opacity: 1;
  visibility: visible;
}

.catalog-overlay a {
  background: var(--orange-main);
  color: #fff;
  border-radius: 50px;
  padding: 0.6rem 1.4rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.3s ease;
}

.catalog-overlay a:hover {
  background: var(--orange-soft);
  transform: scale(1.06);
}

/*  CUERPO DEL CARD */
.catalog-body {
  padding: 1rem 0.8rem 1.3rem;
}

.catalog-title {
  font-size: 0.85rem;
  color: var(--blue-secondary);
  font-weight: 500;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.3s ease;
}

.catalog-card:hover .catalog-title {
  color: var(--orange-main);
}

/* MODAL SIN CATÁLOGOS  */
.modal-dialog {
  max-width: 480px;
}

.modal-content {
  border: none;
  border-radius: 1rem;
  overflow: hidden;
  background: #ffffff;
  color: var(--gray-dark);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  transform: scale(0.98);
  transition: transform 0.3s ease;
}

.modal.show .modal-content {
  transform: scale(1);
}

/* modal-header */
.modal-header {
  background: linear-gradient(135deg, var(--orange-deep), var(--orange-main));
  color: #ffffff;
  /* blanco para contraste */
  text-align: center;
  justify-content: center;
  border-bottom: none;
  padding: 1rem 1.5rem;
}

.modal-header h5 {
  font-weight: 700;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/*  modal-body */
.modal-body {
  text-align: center;
  background: #ffffff;
  padding: 2rem 1.5rem 1.5rem;
}

.modal-body i {
  color: var(--orange-main);
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.modal-body p {
  font-size: 0.95rem;
  color: var(--gray-dark);
  line-height: 1.6;
  margin: 0;
}

/*  modal-footer */
.modal-footer {
  border-top: none;
  justify-content: center;
  background: #ffffff;
  padding-bottom: 1.5rem;
}

/* Botón "Entendido" */
.modal-footer .btn-orange {
  background: var(--orange-main);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 0.6rem 1.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.3px;
  box-shadow: 0 3px 10px rgba(249, 115, 22, 0.25);
  transition: all 0.3s ease;
}

.modal-footer .btn-orange:hover {
  background: #ff9c4b;
  box-shadow: 0 3px 12px rgba(249, 115, 22, 0.35);
  transform: scale(1.05);
}

/* ============================================================
    RESPONSIVIDAD GENERAL
   ============================================================ */
@media (max-width: 768px) {
  .catalogs-section {
    padding-top: 1rem;
    padding-bottom: 2rem;
  }

  .section-title {
    font-size: 1.4rem;
  }

  .section-subtitle {
    font-size: 0.85rem;
    line-height: 1.4;
    padding: 0 1rem;
  }

  .catalog-image {
    aspect-ratio: 3 / 2;
  }

  .catalog-body {
    padding: 0.8rem 0.5rem 1rem;
  }

  .catalog-title {
    font-size: 0.8rem;
  }

  .btn-orange,
  .catalog-overlay a {
    padding: 0.45rem 1rem;
    font-size: 0.8rem;
    border-radius: 40px;
  }

  .modal-dialog {
    max-width: 90%;
  }

  .modal-header h5 {
    font-size: 1rem;
  }

  .modal-body {
    padding: 1.5rem 1rem;
  }

  .modal-body i {
    font-size: 2rem;
  }

  .modal-body p {
    font-size: 0.9rem;
  }

  .modal-footer .btn-orange {
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
  }
}

/*  Teléfonos pequeños (menos de 576px) */
@media (max-width: 576px) {
  .catalogs-section {
    padding-top: 0.8rem;
    padding-bottom: 1.8rem;
  }

  .section-title {
    font-size: 1.25rem;
  }

  .section-subtitle {
    font-size: 0.8rem;
  }

  .catalog-image {
    aspect-ratio: 1 / 1;
  }

  .catalog-card {
    border-radius: 0.7rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  }

  .catalog-title {
    font-size: 0.75rem;
  }

  .catalog-body {
    padding: 0.7rem 0.5rem 0.9rem;
  }

  #load-more {
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
  }
}

/*  Teléfonos ultrapequeños (menos de 400px) */
@media (max-width: 400px) {
  .section-title {
    font-size: 1.1rem;
  }

  .section-subtitle {
    font-size: 0.75rem;
  }

  .catalog-title {
    font-size: 0.7rem;
  }

  .btn-orange,
  #load-more {
    font-size: 0.8rem;
    padding: 0.4rem 1rem;
  }
}

/* ANIMACIÓN DE APARICIÓN SUAVE DEL MODAL */
.modal.fade .modal-dialog {
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
  transform: translateY(-15px);
  opacity: 0;
}

.modal.show .modal-dialog {
  transform: translateY(0);
  opacity: 1;
}

/* BACKDROP LIMPIO (sin sombras exageradas) */
.modal-backdrop.show {
  background-color: rgba(255, 255, 255, 0.4);
  /* claro y limpio */
  backdrop-filter: none;
}