/**
 * UltraHogar Plus – Estilos para badges de producto.
 *
 * Los badges se superponen sobre la miniatura del producto.
 * Cada tipo tiene su propia clase para personalización fácil.
 */

/* ── Contenedor de badges ─────────────────────────────────────────────── */
.uhp-badges-wrapper {
    top: 8px;
    left: 8px;
    z-index: 10;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
}

/* Asegurar que la miniatura tenga position:relative */
.woocommerce ul.products li.product .woocommerce-loop-product__link,
.woocommerce ul.products li.product a.woocommerce-loop-product__link,
.woocommerce-loop-product__link {
    position: relative;
    display: block;
}

/* ── Badge base ───────────────────────────────────────────────────────── */
.uhp-badge {
    display: inline-block;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 3px;
    white-space: nowrap;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    margin: 0.1rem;
}

.uhp-badge~.uhp-badge {
    margin-left: 4px;
}

/* ── Variantes por tipo ────────────────────────────────────────────────── */
.uhp-badge--instalacion_gratis {
    background-color: #27ae60;
}

.uhp-badge--oferta_flash {
    background-color: #e74c3c;
    animation: uhp-pulse 1.8s ease-in-out infinite;
}

.uhp-badge--remate {
    background-color: #e67e22;
}

.uhp-badge--envio_gratis {
    background-color: #2980b9;
}

.uhp-badge--pickup {
    background-color: #8e44ad;
}

.uhp-badge--nuevo {
    background-color: #16a085;
}

.uhp-badge--agotado_pronto {
    background-color: #c0392b;
}

.uhp-badge--garantia_extendida {
    background-color: #2c3e50;
}

/* ── Animación oferta flash ───────────────────────────────────────────── */
@keyframes uhp-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* ── Posicionamiento correcto dentro de las tarjetas WooCommerce ─────── */
.woocommerce ul.products li.product {
    position: relative;
}

/* Compat con temas que usan figure */
.woocommerce ul.products li.product .attachment-woocommerce_thumbnail {
    position: relative;
    z-index: 1;
}

/* ── Vista en página de producto individual ──────────────────────────── */
.woocommerce div.product .images .uhp-badges-wrapper {
    position: absolute;
    top: 12px;
    left: 12px;
}

.woocommerce-product-details__short-description ul li {
    text-align: left;
}

.uhp-purchase-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid #e3e9ef;
    border-radius: 8px;
    background: linear-gradient(180deg, #f8fbff 0%, #f4f8fc 100%);
}

.uhp-purchase-info__icons {
    /* height: 2rem !important; */
    width: 100% !important;
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}

.uhp-purchase-info__icons .uhp-pay-badge--svg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.uhp-purchase-info__icons .uhp-pay-badge__image {
    height: 2rem !important;
    width: auto !important;
    object-fit: contain;
}

.uhp-purchase-info__icons .uhp-pay-badge {
    display: inline-flex;
    align-items: center;
}

.uhp-purchase-info__row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 14px;
    color: #22303f;
}

.uhp-purchase-info__row strong {
    color: #0f2f57;
    font-weight: 700;
    min-width: 120px;
}

.uhp-purchase-info__row span {
    line-height: 1.45;
}

@media (max-width: 767px) {
    .uhp-purchase-info__row {
        flex-direction: column;
        gap: 2px;
    }

    .uhp-purchase-info__row strong {
        min-width: 0;
    }
}