/* Cart fixes live with the commerce plugin, independently of the active theme. */
html body form.woocommerce-cart-form table.cart td.actions .coupon {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center;
    gap: 10px;
    max-width: 100%;
}

html body form.woocommerce-cart-form table.cart td.actions .coupon #coupon_code {
    flex: 0 1 320px !important;
    float: none !important;
    width: 320px !important;
    min-width: 240px !important;
    max-width: 100% !important;
    min-height: 48px !important;
    margin: 0 !important;
    padding: 12px !important;
    box-sizing: border-box !important;
    font-size: 16px !important;
    line-height: 1.4 !important;
}

html body form.woocommerce-cart-form table.cart td.actions .coupon .button {
    flex: 0 0 auto !important;
    float: none !important;
    width: auto !important;
    min-height: 48px;
    margin: 0 !important;
    box-sizing: border-box;
}

/* Safety for cart fragments inserted later by a payment plugin. The payment
   page has no cart-collaterals wrapper and keeps its original wallet buttons. */
html body .cart-collaterals #wc-stripe-express-checkout-element,
html body .cart-collaterals #wc-stripe-express-checkout-button-separator,
html body .cart-collaterals #wc-stripe-payment-request-wrapper,
html body .cart-collaterals #wc-stripe-payment-request-button-separator {
    display: none !important;
}

/* Product forms lead to the cart. Wallets belong to checkout payment options. */
html body .product .summary #wc-stripe-express-checkout-element,
html body .product .summary #wc-stripe-express-checkout-button-separator,
html body .product .summary #wc-stripe-payment-request-wrapper,
html body .product .summary #wc-stripe-payment-request-button-separator {
    display: none !important;
}

@media (max-width: 767px) {
    html body form.woocommerce-cart-form table.cart td.actions .coupon {
        float: none !important;
        width: 100% !important;
    }

    html body form.woocommerce-cart-form table.cart td.actions .coupon #coupon_code,
    html body form.woocommerce-cart-form table.cart td.actions .coupon .button {
        flex-basis: 100% !important;
        width: 100% !important;
        min-width: 0 !important;
    }
}

/* Cart reminder: a short email field and consent beside a half-size checkbox. */
html body .n38-reminder form .n38-reminder-email {
    display: block !important;
    width: min(420px, 100%) !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: auto !important;
    text-align: left !important;
}

html body .n38-reminder form .n38-reminder-email input[type="email"] {
    display: block !important;
    width: 100% !important;
    max-width: 420px !important;
    margin: 6px 0 0 !important;
    box-sizing: border-box;
}

html body .n38-reminder form .n38-reminder-consent {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 10px;
    width: 100%;
    text-align: left;
    line-height: 1.6;
}

html body .n38-reminder form .n38-reminder-consent input[type="checkbox"] {
    flex: 0 0 18.8px !important;
    width: 18.8px !important;
    height: 18.8px !important;
    min-width: 18.8px !important;
    min-height: 18.8px !important;
    max-width: 18.8px !important;
    max-height: 18.8px !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
    accent-color: var(--ink, #24281d);
}

html body .n38-reminder form .n38-reminder-consent span {
    display: block;
    min-width: 0;
}

/* One quantity border, with independent minus/plus controls inside. */
html body form.woocommerce-cart-form .quantity {
    display: inline-flex !important;
    align-items: center;
    gap: 0 !important;
    width: 102.2px !important;
    max-width: 100%;
    height: 48px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid var(--line, #d5d7cb) !important;
    background: #fff;
    box-sizing: border-box;
}

html body form.woocommerce-cart-form .quantity input.qty {
    flex: 0 0 39.2px !important;
    width: 39.2px !important;
    min-width: 0 !important;
    max-width: 39.2px !important;
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    margin: 0 !important;
    padding: 6px 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    text-align: center;
    font-size: 16px;
    box-sizing: border-box;
}

html body form.woocommerce-cart-form .n38-cart-quantity input.qty {
    appearance: textfield;
    -moz-appearance: textfield;
}

html body form.woocommerce-cart-form .n38-cart-quantity input.qty::-webkit-inner-spin-button,
html body form.woocommerce-cart-form .n38-cart-quantity input.qty::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

html body form.woocommerce-cart-form .quantity .n38-qty-button {
    flex: 0 0 30.5px;
    width: 30.5px !important;
    min-width: 30.5px;
    max-width: 30.5px;
    height: 46px !important;
    min-height: 46px;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    color: var(--ink, #24281d);
    font: 400 22px/1 var(--sans, sans-serif);
    cursor: pointer;
    opacity: 1;
    box-shadow: none;
}

html body form.woocommerce-cart-form .quantity .n38-qty-button:disabled {
    cursor: not-allowed;
    opacity: .35;
}

html body form.woocommerce-cart-form button[name="update_cart"] {
    background: var(--ink, #24281d) !important;
    color: #fff !important;
    border: 1px solid var(--ink, #24281d) !important;
    opacity: 1 !important;
    transition: none !important;
}

html body form.woocommerce-cart-form button[name="update_cart"]:disabled {
    background: var(--ink, #24281d) !important;
    color: #fff !important;
    border-color: var(--ink, #24281d) !important;
    opacity: 1 !important;
    cursor: not-allowed;
}

/* A compact shipping selector to the left of its carrier label. */
html body .woocommerce ul#shipping_method li {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px;
    margin-bottom: 12px;
    text-align: left !important;
}

html body .woocommerce ul#shipping_method li input[type="radio"] {
    display: block !important;
    flex: 0 0 16px !important;
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
    accent-color: var(--ink, #24281d);
}

html body .woocommerce ul#shipping_method li label {
    display: block !important;
    flex: 1 1 auto;
    min-width: 0;
    width: auto !important;
    margin: 0 !important;
    text-align: left !important;
    line-height: 1.5;
}

html body .woocommerce ul#shipping_method li label img {
    display: inline-block;
    width: auto;
    height: auto;
    max-width: 100px;
    max-height: 24px;
    margin: 0 8px 0 0;
    vertical-align: middle;
    object-fit: contain;
}

@media (max-width: 768px) {
    html body .woocommerce .cart_totals ul#shipping_method {
        clear: both;
        padding-top: 8px;
    }
}

/* Checkout item details span both the product and subtotal columns. */
html body .woocommerce-checkout-review-order-table .n38-checkout-item-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
}

html body .woocommerce-checkout-review-order-table .n38-checkout-item-name {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
}

html body .woocommerce-checkout-review-order-table .n38-checkout-item-name .product-quantity {
    display: inline;
    white-space: nowrap;
}

html body .woocommerce-checkout-review-order-table .n38-checkout-item-subtotal {
    flex: 0 0 auto;
    white-space: nowrap;
    text-align: right;
}

html body .woocommerce-checkout-review-order-table thead th.product-total {
    text-align: right;
}

@media (max-width: 599px) {
    html body .woocommerce-checkout-review-order-table .n38-checkout-item-line {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }
}

html body.woocommerce-checkout main#contenido.n38-page,
html body.woocommerce-checkout main#contenido.n38-woo {
    padding-top: 40px;
    padding-bottom: 40px;
}

html body.woocommerce-checkout .footer {
    padding-top: 32px;
}

@media (max-width: 760px) {
    html body.woocommerce-checkout main#contenido.n38-page,
    html body.woocommerce-checkout main#contenido.n38-woo {
        padding-top: 24px;
        padding-bottom: 24px;
    }

    html body.woocommerce-checkout .footer {
        padding-top: 24px;
    }
}

html body .woocommerce-checkout-review-order-table tr.n38-checkout-item-heading > td {
    padding-bottom: 6px !important;
}

html body .woocommerce-checkout-review-order-table tr.n38-checkout-item-details > td {
    border-top: 0 !important;
    padding-top: 0 !important;
    text-align: left;
}

html body .woocommerce-checkout-review-order-table .n38-checkout-item-details dl.variation {
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    line-height: 1.5;
}

html body .woocommerce-checkout-review-order-table .n38-checkout-item-details dl.variation > dt,
html body .woocommerce-checkout-review-order-table .n38-checkout-item-details dl.variation > dd {
    display: inline;
    float: none;
    margin: 0;
    padding: 0;
    font-weight: 400;
}

html body .woocommerce-checkout-review-order-table .n38-checkout-item-details dl.variation > dt {
    margin-right: .25em;
}

html body .woocommerce-checkout-review-order-table .n38-checkout-item-details dl.variation > dd::after {
    content: '';
    display: block;
}

html body .woocommerce-checkout-review-order-table .n38-checkout-item-details dl.variation > dd > p {
    display: inline;
    margin: 0;
}

@media (max-width: 360px) {
    html body .woocommerce-checkout-review-order-table .n38-checkout-item-name,
    html body .woocommerce-checkout-review-order-table .n38-checkout-item-details {
        font-size: 13px;
    }
}
html body .n38-add-to-cart-pending button[type="submit"],
html body .n38-add-to-cart-pending input[type="submit"] {
    cursor: wait;
}

