/* --- Contenedor Principal del Catálogo --- */

main#catalogo {

    max-width: 1300px;

    margin: 40px auto;

    padding: 0 20px;

    /* No agregamos estilos de body ni header aquí para no romper el diseño global */

}



main#catalogo h1 {

    text-align: center;

    color: #2c3e50;

    font-size: 2.5rem;

    margin-bottom: 40px;

    border-bottom: 3px solid #ff8c42;

    display: inline-block;

    /* Centrar el título */

    position: relative;

    left: 50%;

    transform: translateX(-50%);

    padding-bottom: 10px;

}



main#catalogo p.subtitulo {

    text-align: center;

    font-size: 1.2rem;

    color: #666;

    margin-bottom: 30px;

}



/* --- GRID (Cuadrícula) --- */

.grid-catalogo {

    display: grid;

    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));

    gap: 30px;

    justify-content: center;

}



/* --- TARJETA (Card) --- */

.card-link {

    text-decoration: none;

    color: inherit;

    display: block; /* Hace que todo el cuadro sea clicable */

}



.card {

    background: #fff;

    border-radius: 12px;

    overflow: hidden;

    box-shadow: 0 5px 15px rgba(0,0,0,0.08);

    position: relative;

    transition: all 0.3s ease;

    height: 400px;

    display: flex;

    flex-direction: column;

}



.card:hover {

    transform: translateY(-5px);

    box-shadow: 0 12px 25px rgba(0,0,0,0.15);

}



.card figure {

    margin: 0;

    height: 220px;

    background: #fff;

    display: flex;

    align-items: center;

    justify-content: center;

    overflow: hidden;

}



.card img {

    width: 100%;

    height: 100%;

    object-fit: contain;

    padding: 10px;

    border-bottom: 1px solid #eee;

}



.card-content {

    padding: 20px;

    flex-grow: 1;

    display: flex;

    flex-direction: column;

    justify-content: flex-start;

}



.card-content h3 {

    margin: 0 0 10px 0;

    color: #2c3e50;

    font-size: 1.3rem;

    line-height: 1.3;

}



.card-content p {

    color: #666;

    margin: 0;

    font-size: 0.95rem;

}



/* --- OVERLAY (Información al pasar el mouse) --- */

.overlay {

    position: absolute;

    top: 0; left: 0; right: 0; bottom: 0;

    background: rgba(30, 40, 50, 0.96);

    color: #fff;

    padding: 25px;

    opacity: 0;

    transition: opacity 0.3s ease;

    display: flex;

    flex-direction: column;

    justify-content: center;

    align-items: center;

    text-align: left;

}



.card:hover .overlay {

    opacity: 1;

}



.overlay ul {

    list-style: none;

    padding: 0;

    margin: 0 0 20px 0;

    width: 100%;

}



.overlay li {

    display: flex;

    justify-content: space-between;

    padding: 6px 0;

    border-bottom: 1px dotted rgba(255,255,255,0.2);

    font-size: 0.95rem;

}



.overlay .lbl { color: #bbb; font-weight: 600; }

.overlay .val { color: #fff; text-align: right; }



.btn-ver {

    background: #ff8c42;

    color: #fff;

    padding: 8px 20px;

    border-radius: 20px;

    font-weight: bold;

    font-size: 0.9rem;

}



/* Mensaje si no hay productos */

.no-products {

    text-align: center;

    padding: 50px;

    grid-column: 1 / -1;

}

.btn-volver {

    display: inline-block;

    padding: 10px 25px;

    background: #2c3e50;

    color: #fff;

    text-decoration: none;

    border-radius: 5px;

    margin-top: 20px;

}