/* Nebula WHMCS standard_cart — mobile CTA fix v2 (scoped) — 2026-08-16
   Solo presentación. Escritorio intacto.
   El reordenamiento del resumen se limita a viewcart (#checkout). */
@media (max-width: 767px) {
    #order-standard_cart {
        padding-bottom: 24px;
    }

    #order-standard_cart #frmConfigureDomains button[type="submit"] {
        display: block !important;
        width: 100% !important;
        min-height: 52px;
        margin: 18px 0 8px;
        padding: 14px 16px !important;
        font-size: 16px !important;
        font-weight: 700;
        color: #fff !important;
        background: #e9639b !important;
        border: 0 !important;
        border-radius: 12px !important;
        box-shadow: 0 8px 18px rgba(13, 15, 20, 0.18);
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    #order-standard_cart .btn-add-to-cart {
        min-height: 44px;
        padding: 10px 14px;
        font-size: 14px;
    }

    #order-standard_cart .btn-add-to-cart.checkout {
        display: block;
        width: 100%;
        min-height: 52px;
        margin-top: 8px;
        padding: 12px 14px 10px;
        font-size: 15px;
        font-weight: 700;
        color: #fff !important;
        background: #e9639b !important;
        border-color: #d94f86 !important;
    }

    #order-standard_cart .btn-add-to-cart.checkout::after {
        content: "Pulsa para continuar";
        display: block;
        margin-top: 4px;
        font-size: 12px;
        font-weight: 500;
        opacity: 0.92;
    }

    #order-standard_cart .domain-price,
    #order-standard_cart .suggested-domains .actions {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    #order-standard_cart .suggested-domains .list-group-item .btn {
        width: 100%;
    }

    #order-standard_cart .order-summary {
        margin-bottom: 16px;
        border-radius: 12px;
        overflow: hidden;
    }

    #order-standard_cart .order-summary .summary-container {
        padding: 16px 14px 18px;
        font-size: 14px;
    }

    #order-standard_cart .order-summary .text-right {
        text-align: center !important;
    }

    #order-standard_cart .order-summary .btn-checkout:not(.disabled),
    #order-standard_cart #checkout.btn-checkout:not(.disabled) {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100% !important;
        min-height: 52px;
        margin: 8px 0 0;
        padding: 14px 16px !important;
        font-size: 16px !important;
        font-weight: 700;
        line-height: 1.2;
        color: #fff !important;
        background: #e9639b !important;
        border: 0 !important;
        border-radius: 12px !important;
        box-shadow: 0 8px 18px rgba(13, 15, 20, 0.18);
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    #order-standard_cart .order-summary .btn-continue-shopping {
        display: block;
        width: 100%;
        margin: 10px 0 0;
        padding: 10px 8px;
        text-align: center;
        font-size: 14px;
    }
}

@supports selector(:has(*)) {
    @media (max-width: 767px) {
        #order-standard_cart .cart-body > .row:has(> .secondary-cart-sidebar #checkout) {
            display: flex;
            flex-direction: column;
        }

        #order-standard_cart .cart-body > .row:has(> .secondary-cart-sidebar #checkout) > .secondary-cart-sidebar {
            order: -1;
            float: none !important;
            width: 100% !important;
            max-width: 100% !important;
            margin: 0 0 20px !important;
            padding-left: 15px;
            padding-right: 15px;
        }

        #order-standard_cart .cart-body > .row:has(> .secondary-cart-sidebar #checkout) > .secondary-cart-body {
            float: none !important;
            width: 100% !important;
        }
    }
}
