/* Keep the theme's existing monochrome palette and typography. */
body.single-product .summary.entry-summary > p.stock {
    display: inline-flex !important;
    align-items: center;
    float: none !important;
    clear: both;
    margin: 0 0 16px !important;
}

body.single-product .summary.entry-summary form.cart:not(.variations_form),
body.single-product .summary.entry-summary form.variations_form .woocommerce-variation-add-to-cart {
    display: flex !important;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 12px;
    clear: both;
    width: 100% !important;
    max-width: 560px;
    margin: 4px 0 24px;
}

body.single-product .summary.entry-summary form.cart:not(.variations_form)::before,
body.single-product .summary.entry-summary form.cart:not(.variations_form)::after,
body.single-product .summary.entry-summary form.variations_form .woocommerce-variation-add-to-cart::before,
body.single-product .summary.entry-summary form.variations_form .woocommerce-variation-add-to-cart::after {
    display: none !important;
    content: none !important;
}

body.single-product .summary.entry-summary form.cart .quantity {
    order: 0;
    flex: 0 0 88px;
    float: none !important;
    margin: 0 !important;
}

body.single-product .summary.entry-summary form.cart .quantity .qty {
    width: 88px !important;
    height: 54px;
    min-height: 54px;
    margin: 0;
    text-align: center;
}

body.single-product .summary.entry-summary form.cart .single_add_to_cart_button {
    order: 1;
    flex: 1 1 calc(100% - 100px);
    float: none !important;
    width: auto !important;
    min-width: 0;
    min-height: 54px;
    margin: 0 !important;
    padding: 12px 20px;
    border-radius: 8px;
    background: #404044;
    color: #fdfdfc;
    font-weight: 700;
    white-space: nowrap;
}

body.single-product .summary.entry-summary form.cart .single_add_to_cart_button:hover {
    background: #28282b;
    color: #fdfdfc;
}

body.single-product .summary.entry-summary form.cart .vellax-checkout-now,
body.single-product .summary.entry-summary form.cart .vellax-direct-buy,
body.single-product .summary.entry-summary form.cart .spl-buy-now {
    order: 2;
    flex: 1 1 100%;
    float: none !important;
    width: 100% !important;
    min-height: 54px;
    margin: 0 !important;
    padding: 12px 20px;
    border: 1px solid #202124;
    border-radius: 8px;
    background: #202124;
    color: #fdfdfc;
    font-size: 16px;
    font-weight: 750;
    line-height: 1.3;
    text-align: center;
    cursor: pointer;
}

body.single-product .summary.entry-summary form.cart .vellax-checkout-now:hover,
body.single-product .summary.entry-summary form.cart .vellax-direct-buy:hover,
body.single-product .summary.entry-summary form.cart .spl-buy-now:hover {
    border-color: #404044;
    background: #404044;
    color: #fdfdfc;
}

body.single-product .summary.entry-summary form.cart .vellax-checkout-now[hidden] {
    display: none !important;
}

body.single-product .summary.entry-summary form.cart .vellax-checkout-now:focus-visible,
body.single-product .summary.entry-summary form.cart .vellax-direct-buy:focus-visible,
body.single-product .summary.entry-summary form.cart .spl-buy-now:focus-visible,
body.single-product .summary.entry-summary form.cart .single_add_to_cart_button:focus-visible,
body.single-product .summary.entry-summary form.cart .cpsw-express-checkout-button:focus-visible {
    outline: 3px solid #2763a6;
    outline-offset: 3px;
}

body.single-product .summary.entry-summary form.cart #cpsw-payment-request-wrapper {
    order: 3;
    flex: 1 1 100%;
    position: static !important;
    inset: auto !important;
    float: none !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    transform: none !important;
}

body.single-product .summary.entry-summary form.cart #cpsw-payment-request-wrapper fieldset,
body.single-product .summary.entry-summary form.cart #cpsw-payment-request-separator,
body.single-product .summary.entry-summary form.cart #cpsw-payment-request-custom-button,
body.single-product .summary.entry-summary form.cart #cpsw-payment-request-wrapper button {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body.single-product .summary.entry-summary form.cart #cpsw-payment-request-wrapper fieldset {
    padding: 0 !important;
    border: 0 !important;
}

body.single-product .summary.entry-summary form.cart #cpsw-payment-request-wrapper button {
    min-height: 54px !important;
    border-radius: 8px !important;
}

body.single-product .summary.entry-summary form.cart .vellax-checkout-now:disabled,
body.single-product .summary.entry-summary form.cart .vellax-checkout-now[aria-disabled="true"] {
    opacity: .55;
    cursor: not-allowed;
}

@media (max-width: 767px) {
    body.single-product .summary.entry-summary form.cart:not(.variations_form),
    body.single-product .summary.entry-summary form.variations_form .woocommerce-variation-add-to-cart {
        max-width: none;
        gap: 10px;
    }

    body.single-product .summary.entry-summary form.cart .quantity,
    body.single-product .summary.entry-summary form.cart .quantity .qty {
        width: 80px !important;
        flex-basis: 80px;
    }

    body.single-product .summary.entry-summary form.cart .single_add_to_cart_button {
        flex-basis: calc(100% - 90px);
    }
}

@media (prefers-reduced-motion: reduce) {
    body.single-product .summary.entry-summary form.cart button {
        transition: none !important;
    }
}
