/* =======================================
   CATEGORÍAS / PRODUCTOS
   SOLO ESTILOS PROPIOS DE ESTA PÁGINA
======================================= */

/* ===== TÍTULO DE CATEGORÍA ===== */
.titulo-categoria {
    text-align: center;
    margin: 35px 0 15px;
    font-size: 32px;
    font-weight: 800;
}

.titulo-categoria span {
    color: #f30817;
}

/* ===== BARRA DE BÚSQUEDA ===== */
.barra-busqueda-top {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    z-index: 1200;
    padding: 0 15px;
}

.barra-busqueda input {
    width: 70%;
    max-width: 400px;
    padding: 10px;
    border: 2px solid #d32f2f;
    border-radius: 5px;
    font-size: 16px;
}

.barra-busqueda button {
    background: #d32f2f;
    border: none;
    color: white;
    padding: 10px 18px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

/* ===== CONTENEDOR DE PRODUCTOS ===== */
#contenedor-productos {
    max-width: 1400px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    padding: 20px;
}

/* ===== TARJETA DE PRODUCTO ===== */

.producto-card {
    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%;
    cursor: pointer;
}

.producto-card:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 25px rgba(0,0,0,0.18);
}

.producto-card img {
    width: 100%;
    height: 200px;
    object-fit: contain;
}

.producto-card h3 {
    font-size: 20px;
    margin-top: 10px;
    color: #333;
}

.producto-card h4 {
    font-weight: bold;
    font-size: 18px;
    margin-top: 6px;
    color: #d62828;
}

.producto-card .stock {
    margin-top: 8px;
    color: #555;
}

/* Aviso de especificaciones */
.aviso-ficha {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin-top: 6px;
    margin-bottom: 6px;
    transition: color 0.2s ease;
}

.producto-card:hover .aviso-ficha {
    color: #e50914;
}

/* Botón agregar */
.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: 20px 0;
}

.btn-pagina {
    display: inline-block;
    padding: 8px 14px;
    margin: 4px;
    background: #f30817;
    color: white;
    border-radius: 6px;
    font-weight: bold;
    border: none;
}

/* =======================================
   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;
    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);
}

/* BOTON CERRAR */
.cerrar-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 28px;
    cursor: pointer;
}

/* GRID 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;
}

/* INFO */
.modal-info h2 {
    font-size: 28px;
    margin-bottom: 8px;
    color: #333;
}

#modalCodigo {
    font-weight: 600;
    color: #555;
}

#modalUbicacion {
    color: #777;
    margin-bottom: 10px;
}

.modal-info p {
    margin: 6px 0;
    color: #666;
    font-size: 15px;
}

/* DESCRIPCIÓN */
.modal-descripcion {
    margin-top: 15px;
    line-height: 1.6;
    font-size: 15px;
    color: #444;
}

/* LISTA MÁS LIMPIA */
.modal-descripcion ul {
    margin-top: 10px;
    padding-left: 20px;
}

.modal-descripcion li {
    margin-bottom: 6px;
}

/* BOTÓN FICHA TÉCNICA MEJORADO */
.btn-pdf {
    display: none;
    align-items: center;
    justify-content: center;
    background: #c62828;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    margin-top: 20px;
    font-weight: 600;
    transition: 0.2s;
    width: fit-content;
}

.btn-pdf:hover {
    background: #a51d1d;
    transform: translateY(-2px);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {

    #contenedor-productos {
        grid-template-columns: 1fr;
    }

    .barra-busqueda {
        margin-top: 35px;
    }

    .modal-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .modal-imagen img {
        max-height: 320px;
    }

    .modal-descripcion ul {
        text-align: left;
    }

}
