/* Farmamol - Tarjeta de producto (imagen + etiqueta con el nombre)
   Valores por defecto; se pueden sobreescribir desde el widget de Elementor
   "Estilo de tarjetas de producto" sin tocar este archivo. */

.fbf-tarjeta-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 60px 24px;
    padding: 0;
    margin: 0 0 32px;
}

@media (max-width: 1024px) {
    .fbf-tarjeta-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .fbf-tarjeta-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .fbf-tarjeta-grid {
        grid-template-columns: 1fr;
    }
}

.fbf-sin-resultados {
    padding: 40px 0;
    text-align: center;
    color: #666;
}

.fbf-paginacion {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 12px 0 32px;
}

.fbf-paginacion a {
    text-decoration: none;
    font-weight: 600;
}

.fbf-paginacion a:hover {
    text-decoration: underline;
}

.fbf-pagina-info {
    color: #666;
}

.fbf-tarjeta-producto {
    position: relative;
    list-style: none;
    background: #fff;
    border: 1px solid #e2e2ea;
    border-radius: 14px;
    overflow: visible; /* la etiqueta se monta sobre el borde inferior, no se debe recortar */
}

.fbf-tarjeta-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    padding: 24px 16px 30px;
}

.fbf-tarjeta-imagen {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 140px;
}

.fbf-tarjeta-imagen img {
    max-width: 100%;
    max-height: 160px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.fbf-tarjeta-badge {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translate(-50%, 50%);
    display: inline-block;
    max-width: 90%;
    padding: 10px 18px;
    border-radius: 999px;
    background: #2f6bed;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 4px 10px rgba(47, 107, 237, 0.25);
    transition-duration: 0.2s;
    transition-property: color, background-color, border-color, box-shadow;
}

/* Se oscurece un poco al pasar el mouse por toda la tarjeta, para que se
   sienta como un botón -- editable desde la pestaña Hover del widget. */
.fbf-tarjeta-producto:hover .fbf-tarjeta-badge {
    filter: brightness(0.9);
}

.fbf-tarjeta-producto:hover .fbf-tarjeta-imagen img {
    opacity: 0.92;
}
