/* 
 * RECO: Estilos del Catálogo de Productos (Carga Condicional) 
 */

.reco-tienda-maestra {
    width: 100%;
}

/* El título de la tienda ("Tienda") */
.woocommerce-products-header__title {
    font-size: 2rem;
    margin-bottom: var(--reco-espacio-md);
    text-align: center;
}

/* La cuadrícula mágica (CSS Grid) */
ul.products {
    display: grid;
    /* Crea columnas de mínimo 240px, y rellena el espacio disponible (Responsive automático) */
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--reco-espacio-md);
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Diseño de la Tarjeta */
.tarjeta-producto {
    display: flex;
    flex-direction: column;
    background-color: var(--reco-color-fondo);
    border: 1px solid var(--reco-color-borde);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tarjeta-producto:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}

.enlace-producto {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Empuja el botón siempre hacia abajo */
    color: var(--reco-color-texto);
}

.enlace-producto:hover {
    opacity: 1; /* Sobrescribimos el hover global para la tarjeta */
}

.imagen-producto img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1; /* Imágenes siempre cuadradas uniformes */
    object-fit: cover;
    display: block;
}

.info-producto {
    padding: var(--reco-espacio-sm);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.titulo-producto {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--reco-espacio-xs);
    line-height: 1.3;
}

.precio-producto {
    margin-top: auto; /* Empuja el precio al fondo de la info */
    font-weight: 700;
    color: var(--reco-color-primario);
}

.precio-producto del {
    color: #888;
    font-size: 0.85em;
    font-weight: 400;
    margin-right: 5px;
}

.precio-producto ins {
    text-decoration: none;
}

/* Botón de Añadir al Carrito */
.accion-producto {
    padding: var(--reco-espacio-sm);
    border-top: 1px solid var(--reco-color-borde);
}

.accion-producto .button {
    display: block;
    width: 100%;
    text-align: center;
    background-color: var(--reco-color-primario);
    color: var(--reco-color-fondo);
    padding: 0.75rem;
    border-radius: 4px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.accion-producto .button:hover {
    opacity: 0.8;
}

/* Ocultar el botón si está cargando (AJAX) */
.accion-producto .button.loading {
    opacity: 0.5;
    pointer-events: none;
}