/* Contenedor principal */
.wp-recently-viewed-wrapper {
    margin: 30px 0;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid #f0f0f0;
}

/* Título de la sección */
.wp-recently-viewed-title {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

/* Grid de los artículos/productos */
.wp-recently-viewed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

/* Tarjeta individual */
.wp-recently-viewed-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eaeaea;
}

.wp-recently-viewed-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.wp-recently-viewed-item a.rv-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

/* Imagen de la tarjeta */
.rv-image-wrapper {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f9f9f9;
    position: relative;
}

.rv-image-wrapper img.rv-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.wp-recently-viewed-item:hover .rv-image-wrapper img.rv-image {
    transform: scale(1.05);
}

/* Cuando no hay imagen */
.rv-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    color: #888;
    font-size: 14px;
    font-weight: 500;
}

/* Contenido de la tarjeta (Título y precio) */
.rv-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.rv-item-title {
    margin: 0 0 10px 0;
    font-size: 15px;
    line-height: 1.4;
    font-weight: 500;
    color: #222;
}

.wp-recently-viewed-item:hover .rv-item-title {
    color: #0073aa; /* Color de hover de WordPress por defecto */
}

/* Precio (si es WooCommerce) */
.rv-price {
    margin-top: auto;
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.rv-price del {
    color: #999;
    font-weight: normal;
    font-size: 12px;
    margin-right: 5px;
}

.rv-price ins {
    text-decoration: none;
    color: #d9534f;
}

/* Responsive */
@media (max-width: 768px) {
    .wp-recently-viewed-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .wp-recently-viewed-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .rv-content {
        padding: 10px;
    }
    
    .rv-item-title {
        font-size: 13px;
    }
}