/* ========================
   BOTÓN LOGIN (si lo usas)
   ======================== */
.boton-login {
    position: absolute;
    top: 15px;
    right: 20px;
    background-color: #f30817;
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    z-index: 1000;
    transition: background-color 0.3s;
}

.boton-login:hover {
    background-color: #cc0613;
}

/* ========================
   CARRUSEL
   ======================== */
.carrusel-container {
    width: 100%;
    max-width: 1200px;
    margin: 30px auto;
    overflow: hidden;
    border-radius: 20px;
    position: relative;
    height: auto;
}

.carrusel-superior {
    height: 400px;
}

.carrusel-marcas {
    height: 350px;
}

.slide {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
    position: relative;
    z-index: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

/* ========================
   CATÁLOGO
   ======================== */

.catalogo-container {
    max-width: 1400px;
    margin: auto;
    padding: 20px;
    text-align: center;
}

.catalogo-container h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: black;
}

/* ========================
   GALERÍA DE PRODUCTOS
   ======================== */

.galeria-productos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
    justify-items: center;
    transition: opacity .25s ease;
}

/* ========================
   TARJETA PRODUCTO
   ======================== */

.tarjeta-producto {
    background: white;
    padding: 18px;
    border-radius: 14px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
    text-align: center;
    transition: transform .2s ease, box-shadow .2s ease;
    width: 100%;
}

.tarjeta-producto:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 25px rgba(0,0,0,0.18);
}

.tarjeta-producto img {
    width: 100%;
    height: 200px;
    object-fit: contain;
}

.tarjeta-producto h3 {
    font-size: 20px;
    margin-top: 10px;
    color: #333;
}

.tarjeta-producto p,
.tarjeta-producto .desc {
    font-size: 14px;
    color: #444;
    min-height: 50px;
}

.tarjeta-producto .precio,
.tarjeta-producto .codigo {
    font-weight: bold;
    font-size: 20px;
    margin-top: 10px;
    color: #d62828;
}

.tarjeta-producto .ubicacion,
.tarjeta-producto .stock {
    margin-top: 8px;
    color: #555;
}

.btn-agregar-lista {
    width: 100%;
    background-color: #e50914;
    color: white;
    border: none;
    padding: 10px;
    margin-top: 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    transition: background 0.3s ease, transform 0.1s ease;
}

.btn-agregar-lista:hover {
    background-color: #c20812;
    transform: translateY(-1px);
}

/* ========================
   PAGINACIÓN
   ======================== */

.paginacion {
    text-align: center;
    margin: 30px 0;
}

.paginacion a {
    display: inline-block;
    margin: 0 5px;
    padding: 8px 14px;
    background-color: #f30817;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
}

.paginacion a:hover,
.paginacion a.activa {
    background-color: #cc0613;
}

/* ========================
   ENCABEZADO CATÁLOGO
   ======================== */

.encabezado-catalogo {
    max-width: 1000px;
    margin: 40px auto 50px auto;
    background: #ffffff;
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    text-align: center;
}

.encabezado-catalogo h1 {
    font-size: 2.4rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 20px;
    line-height: 1.3;
    position: relative;
}

.encabezado-catalogo h1::after {
    content: "";
    display: block;
    width: 60%;
    max-width: 600px;
    height: 5px;
    background-color: #e50914;
    margin: 20px auto 0;
    border-radius: 3px;
}

.encabezado-catalogo p {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.7;
    margin-top: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* ========================
   MODAL PRODUCTO MEJORADO
   ======================== */

.modal-producto {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5000;
    padding: 30px;
    opacity: 0;
    visibility: hidden;
    transition: 0.25s ease;
}

.modal-producto.activo {
    opacity: 1;
    visibility: visible;
}

.modal-contenido {
    background: white;
    width: 95%;
    max-width: 1100px;
    height: auto;
    border-radius: 16px;
    position: relative;
    padding: 35px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    transform: scale(0.92);
    transition: 0.25s ease;
}

.modal-producto.activo .modal-contenido {
    transform: scale(1);
}

.cerrar-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 28px;
    cursor: pointer;
}

/* Layout correcto del modal */
.modal-grid {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 35px;
    align-items: center;
}

/* Imagen mejorada */
.modal-imagen img {
    width: 100%;
    max-height: 420px;
    object-fit: contain;
    border-radius: 10px;
    background: #f5f5f5;
    padding: 15px;
}

/* Texto */
.modal-info h2 {
    font-size: 28px;
    margin-bottom: 8px;
    color: #333;
}

.modal-info p {
    margin: 6px 0;
    color: #666;
    font-size: 15px;
}

.modal-info {
    display: flex;
    flex-direction: column;
}

.modal-descripcion {
    margin-top: 15px;
    line-height: 1.6;
    font-size: 15px;
    color: #444;
}

.modal-descripcion ul {
    text-align: left;
    padding-left: 22px;
    margin-top: 10px;
}

.modal-descripcion li {
    margin-bottom: 6px;
    line-height: 1.5;
}

/* Botón ficha técnica */
.btn-pdf {
  position: relative;
  margin: 20px auto 0;
  padding: 10px 18px;
  background: #c62828;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  display: none;
  justify-content: center;
  align-items: center;
  width: fit-content;
  transition: 0.2s ease;
}

.btn-pdf:hover {
  background: #a51d1d;
  transform: translateY(-1px);
}

.aviso-ficha {
  font-size: 12px;
  font-weight: 600;
  color: #555;
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}

.tarjeta-producto:hover .aviso-ficha {
  color: #e50914;
}

/* ========================
   RESPONSIVE
   ======================== */

@media (max-width: 1280px) {

    .carrusel-superior {
        height: 400px;
    }

    .carrusel-marcas {
        height: 400px;
    }

    .galeria-productos { 
        grid-template-columns: repeat(3, 1fr); 
    }

}

@media (max-width: 900px) {

    .carrusel-superior {
        height: 260px;
    }

    .carrusel-marcas {
        height: 130px;
    }

    .galeria-productos { 
        grid-template-columns: repeat(2, 1fr); 
    }

    .modal-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .modal-contenido {
        padding: 25px;
    }

    .modal-info {
        text-align: left;
    }

    .modal-descripcion {
        text-align: left;
    }
}

@media (max-width: 480px) {

    .carrusel-superior {
        height: 140px;
    }

    .carrusel-marcas {
        height: 140px;
    }

    .galeria-productos { 
        grid-template-columns: repeat(1, 1fr); 
    }
}
