/* =================================================================== */
/* ESTILOS PARA LA PÁGINA DE CATEGORÍA DE PRODUCTOS */
/* =================================================================== */

/* --- Grilla de Productos con Prefijo "catp-" --- */
main.ctn-categoria {
    height:80vh;
}
.catp-product-grid {
    display: grid;
    gap: 1.5rem;
    /* Por defecto (móvil), mostramos 2 columnas */
    grid-template-columns: repeat(2, 1fr);
    padding-top:0;
}

/* --- Tarjeta de Producto (similar a tienda.css pero con prefijo) --- */
.catp-product-card {
    background-color: var(--white-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}
.catp-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.catp-product-card a { text-decoration: none; }
.catp-product-card .product-image {
    position: relative;
    width: 100%;
    height: 0 !important; /* Resetea cualquier altura preexistente */
    padding-top: 100% !important; /* Forza la altura a ser el 100% del ancho */
    background-color: var(--light-bg);
}

.catp-product-card .product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Asegura que la imagen cubra el cuadrado sin deformarse */
}
.catp-product-card .product-info { padding: 1rem; text-align: center; }
.catp-product-card .product-title { font-size: 1.2rem; color: var(--text-dark); margin: 0.25rem 0; }
.catp-product-card .product-price { font-size: 1.1rem; font-weight: bold; color: #81160e; margin: 0.5rem 0; }
.catp-product-card .product-actions { padding: 0 1rem 1rem 1rem; }

/* --- Responsividad de la Grilla --- */

/* Tablet (4 columnas) */
@media (min-width: 768px) {
    .catp-product-grid {
        grid-template-columns: repeat(4, 1fr);
        padding-top:10px;
    }
}

/* PC (6 columnas) */
@media (min-width: 1200px) {
    .catp-product-grid {
        grid-template-columns: repeat(6, 1fr);
        padding-top:30px;
    }
}