/* =========================================================
   UBD Modular Bonito 1.9.12
   Ajuste fino: ETS sin encimarse, PayPal azul suave y sin splash.
   Solo presentación: no cambia inputs, precios guardados ni eventos nativos.
   ========================================================= */

/* La pantalla de carga añadida en 1.9.11 ya no se muestra. */
html .ubd-boot-splash,
body .ubd-boot-splash {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* =========================================================
   ETS Extra Options: filas con altura real y precio equilibrado
   ========================================================= */
html.ubd-product-ready body#product .block-product-attribute-custom .ubd-eto-modular-track {
    align-items: stretch !important;
    grid-auto-rows: minmax(218px, max-content) !important;
    row-gap: 12px !important;
}

html.ubd-product-ready body#product .block-product-attribute-custom .ubd-eto-modular-track > :is(.radio, .checkbox) {
    min-height: 218px !important;
    height: auto !important;
    padding: 10px 9px 13px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

html.ubd-product-ready body#product .block-product-attribute-custom .ubd-eto-modular-track > :is(.radio, .checkbox) > label,
html.ubd-product-ready body#product .block-product-attribute-custom .ubd-eto-modular-track > :is(.radio, .checkbox) > label.control-label > div:first-child {
    min-height: 0 !important;
    height: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}

html.ubd-product-ready body#product .block-product-attribute-custom .attr-text {
    min-height: 2.65em !important;
    max-height: none !important;
    overflow: visible !important;
    font-size: 11px !important;
    line-height: 1.23 !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    text-wrap: balance !important;
}

html.ubd-product-ready body#product .block-product-attribute-custom :is(
    .product-discount,
    .attribute_price_save,
    .attr-text > .price,
    .ubd-ets-price-clean-v1911,
    .ubd-ets-price-clean-v1912
) {
    display: block !important;
    width: 100% !important;
    min-height: 0 !important;
    margin: 5px 0 3px !important;
    overflow: visible !important;
    color: #fff !important;
    font-size: clamp(14px, 3vw, 17px) !important;
    font-weight: 900 !important;
    line-height: 1.08 !important;
    letter-spacing: -.01em !important;
    white-space: normal !important;
    text-align: center !important;
    text-overflow: clip !important;
}

html.ubd-product-ready body#product .block-product-attribute-custom :is(
    .product-discount,
    .attribute_price_save,
    .attr-text > .price,
    .ubd-ets-price-clean-v1911,
    .ubd-ets-price-clean-v1912
) > :is(strong, span) {
    display: inline !important;
    color: inherit !important;
    font: inherit !important;
    line-height: inherit !important;
    white-space: inherit !important;
}

/* Imágenes centradas y siempre dentro de la tarjeta. */
html.ubd-product-ready body#product .block-product-attribute-custom .ubd-eto-modular-track > :is(.radio, .checkbox) img,
html.ubd-product-ready body#product .block-product-attribute-custom img.ets_zoom_img {
    position: static !important;
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: min(72%, 96px) !important;
    height: auto !important;
    max-height: 96px !important;
    margin: 0 auto 7px !important;
    object-fit: contain !important;
    object-position: center center !important;
    box-sizing: border-box !important;
}

@media (max-width: 699px) {
    html.ubd-product-ready body#product .block-product-attribute-custom .ubd-eto-modular-track {
        grid-template-rows: repeat(2, minmax(214px, max-content)) !important;
        grid-auto-rows: minmax(214px, max-content) !important;
        grid-auto-columns: clamp(142px, 42vw, 178px) !important;
        gap: 12px 10px !important;
        padding-bottom: 9px !important;
    }

    html.ubd-product-ready body#product .block-product-attribute-custom .ubd-eto-modular-track > :is(.radio, .checkbox) {
        min-height: 214px !important;
        padding: 9px 7px 12px !important;
    }

    html.ubd-product-ready body#product .block-product-attribute-custom .attr-text {
        min-height: 2.7em !important;
        font-size: 10.5px !important;
    }

    html.ubd-product-ready body#product .block-product-attribute-custom :is(
        .product-discount,
        .attribute_price_save,
        .attr-text > .price,
        .ubd-ets-price-clean-v1911,
        .ubd-ets-price-clean-v1912
    ) {
        font-size: 15px !important;
    }
}

/* =========================================================
   PayPal: oculto en modo sencillo; azul/blanco tenue en experto
   ========================================================= */
html.ubd-product-ready.ubd-catalog-simple body#product :is(
    .ubd-commerce-trust-payments,
    #ps_checkout-payment-method-logo-block-container,
    .ps_checkout-payment-method-logo-block-container,
    #ps_checkout-express-button-container,
    .ps_checkout-express-button-container,
    #paypal-button-container,
    .paypal-button-container,
    .paypal-buttons-context-iframe,
    [id*="payment-method-logo-block"],
    [class*="payment-method-logo-block"]
) {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    min-height: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

html.ubd-product-ready:not(.ubd-catalog-simple) body#product :is(
    #ps_checkout-payment-method-logo-block-container,
    .ps_checkout-payment-method-logo-block-container,
    #ps_checkout-express-button-container,
    .ps_checkout-express-button-container,
    #paypal-button-container,
    .paypal-button-container,
    .ubd-commerce-trust-payments
) {
    border-color: rgba(16, 91, 166, .14) !important;
    background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(235,246,255,.94)) !important;
    box-shadow: 0 13px 30px rgba(25, 91, 153, .09) !important;
}

html.ubd-product-ready:not(.ubd-catalog-simple) body#product :is(
    #ps_checkout-payment-method-logo-block-container,
    #ps_checkout-express-button-container,
    #paypal-button-container
)::before {
    background: rgba(226, 241, 255, .96) !important;
    color: #124f88 !important;
    box-shadow: inset 0 0 0 1px rgba(18, 79, 136, .08) !important;
}

html.ubd-product-ready:not(.ubd-catalog-simple) body#product :is(
    #ps_checkout-payment-method-logo-block-title,
    .ubd-commerce-trust-payments .ubd-commerce-trust-label
) {
    color: #184e7d !important;
}

html.ubd-product-ready:not(.ubd-catalog-simple) body#product #ps_checkout-payment-method-logos-container {
    padding: 7px 9px !important;
    border-radius: 14px !important;
    background: rgba(255,255,255,.66) !important;
}
