.payment_method_stripe fieldset {
    border: none;
    padding: 0;
    margin: .25rem 0 0 0;
}
#add_payment_method #payment ul.payment_methods li input, .woocommerce-checkout #payment ul.payment_methods li input {
    margin-right: .4rem;
    position: relative;
    top: 2px;
}
#add_payment_method .checkout .checkout-inline-error-message, 
.woocommerce-checkout .checkout .checkout-inline-error-message {
    line-height: 1.5;
}

fieldset#wc-stripe-upe-form {
    border: 0;
    margin: 0;
    padding: 0;
}

/* =====================================================================
   My Account — auth & account forms
   ---------------------------------------------------------------------
   Mirrors the checkout look & feel (see .dv-checkout-* above): rounded
   #c0c4cd inputs with a soft focus ring, primary pill buttons, centered
   primary headings, and the shared .dv-checkout-social buttons WC already
   injects via woocommerce_login_form_end. Everything is scoped to
   body.woocommerce-account (plus body.woocommerce-order-received for the
   login form WC prints on the thank-you page for a logged-out shopper who
   owns the order) so it never leaks into the inline checkout login panel
   or other WC forms. CSS-only — no template overrides.
   ===================================================================== */

/* Logged-out auth pages (login / register / lost & reset password): one
   centred card. The two-column login+register layout widens via :has. */
body.woocommerce-account:not(.logged-in) .woocommerce {
    max-width: 480px;
    margin: 0 auto;          /* vertical spacing comes from .e-my-account-tab */
}
body.woocommerce-account:not(.logged-in) .woocommerce:has(#customer_login.col2-set) {
    max-width: 940px;
}

/* Two-column login/register → grid instead of WC's floats. */
body.woocommerce-account #customer_login.col2-set {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}
body.woocommerce-account #customer_login .col-1,
body.woocommerce-account #customer_login .col-2 {
    float: none;
    width: auto;
}

/* The form itself is the card. */
body:is(.woocommerce-account, .woocommerce-order-received) .woocommerce-form-login,
body.woocommerce-account .woocommerce-form-register,
body.woocommerce-account .woocommerce-ResetPassword {
    border: 0;
    border-radius: var(--dv-card-radius);
    background: var(--dv-card-bg);
    padding: 32px;
}

/* Form / column heading → checkout's centred primary heading. */
body.woocommerce-account .woocommerce > h2,
body.woocommerce-account #customer_login .col-1 > h2,
body.woocommerce-account #customer_login .col-2 > h2 {
    text-align: center;
    color: var(--e-global-color-primary);
    text-transform: uppercase;
    font-weight: 600;
    font-size: 18px;
    letter-spacing: 0.04em;
    line-height: 1.4;
    margin: 0 0 22px;
}

/* Intro copy on the lost-password / reset forms. */
body.woocommerce-account .woocommerce-ResetPassword > p:first-of-type {
    font-size: 14px;
    color: color-mix(in srgb, var(--e-global-color-text) 85%, transparent);
    margin: 0 0 18px;
}

/* Lost password / reset form width for Elementor's My Account widget. */
.elementor-widget-woocommerce-my-account .e-my-account-tab:not(.e-my-account-tab__dashboard--custom) .woocommerce .woocommerce-ResetPassword {
    width: 100%;
}
.elementor-widget-woocommerce-my-account .e-my-account-tab:not(.e-my-account-tab__dashboard--custom) .woocommerce .woocommerce-ResetPassword .form-row-first,
.elementor-widget-woocommerce-my-account .e-my-account-tab:not(.e-my-account-tab__dashboard--custom) .woocommerce .woocommerce-ResetPassword .form-row-last {
    margin-bottom: 20px;
}


/* Field rows + labels -------------------------------------------------- */
body:is(.woocommerce-account, .woocommerce-order-received) .woocommerce form .form-row {
    margin: 0 0 16px;
    padding: 0;
}
body:is(.woocommerce-account, .woocommerce-order-received) .woocommerce form .form-row:last-of-type {
    margin-bottom: 0;
}
body:is(.woocommerce-account, .woocommerce-order-received) .woocommerce form .form-row label:not(.woocommerce-form__label-for-checkbox),
body.woocommerce-account .woocommerce-address-fields label:not(.woocommerce-form__label-for-checkbox) {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--e-global-color-text);
    margin: 0 0 6px;
}
body:is(.woocommerce-account, .woocommerce-order-received) .required {
    color: var(--e-global-color-primary);
    border: 0;
    text-decoration: none;
}

/* Inputs → checkout input style. */
/* Elementor's My Account widget styles inputs/buttons with a higher-specificity
   selector than ours, so the contested visual props use !important — same
   approach as the checkout login panel above. */
body:is(.woocommerce-account, .woocommerce-order-received) .woocommerce form input[type="text"],
body:is(.woocommerce-account, .woocommerce-order-received) .woocommerce form input[type="email"],
body:is(.woocommerce-account, .woocommerce-order-received) .woocommerce form input[type="password"],
body:is(.woocommerce-account, .woocommerce-order-received) .woocommerce form input[type="tel"],
body:is(.woocommerce-account, .woocommerce-order-received) .woocommerce form input[type="number"],
body:is(.woocommerce-account, .woocommerce-order-received) .woocommerce form select,
body:is(.woocommerce-account, .woocommerce-order-received) .woocommerce form textarea {
    border: 1px solid #c0c4cd !important;
    background: #fff !important;
    border-radius: 10px !important;
    padding: 12px 18px !important;
    font-family: inherit;
    font-size: 16px !important;
    line-height: normal;
    width: 100% !important;
    box-sizing: border-box;
    color: #000 !important;
    height: auto !important;
    transition: border-color 0.2s, box-shadow 0.2s;
}
body:is(.woocommerce-account, .woocommerce-order-received) .woocommerce form input:focus,
body:is(.woocommerce-account, .woocommerce-order-received) .woocommerce form select:focus,
body:is(.woocommerce-account, .woocommerce-order-received) .woocommerce form textarea:focus {
    outline: none;
    border-color: var(--e-global-color-primary) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--e-global-color-primary) 12%, transparent) !important;
}
body:is(.woocommerce-account, .woocommerce-order-received) .woocommerce form input::placeholder,
body:is(.woocommerce-account, .woocommerce-order-received) .woocommerce form textarea::placeholder {
    color: color-mix(in srgb, var(--e-global-color-text) 70%, transparent);
}
/* WC's password visibility toggle: keep the input full-width, float the eye. */
body:is(.woocommerce-account, .woocommerce-order-received) .woocommerce form span.password-input {
    display: block;
    position: relative;
}
body:is(.woocommerce-account, .woocommerce-order-received) .woocommerce form span.password-input .show-password-input {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
}

/* Submit buttons → primary pill. */
body:is(.woocommerce-account, .woocommerce-order-received) .woocommerce form button[type="submit"],
body:is(.woocommerce-account, .woocommerce-order-received) .woocommerce-form-login__submit,
body:is(.woocommerce-account, .woocommerce-order-received) button[name="login"],
body.woocommerce-account button[name="register"],
body.woocommerce-account button[name="save_account_details"],
body.woocommerce-account button[name="save_address"] {
    display: inline-block;
    background: var(--e-global-color-primary) !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 10px 30px 30px 0px !important;
    padding: 20px 30px 20px 30px !important;
    font-family: inherit;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
    font-size: 13px !important;
    line-height: 1.2;
    cursor: pointer;
    transition: opacity 0.2s, background 0.2s;
}
body:is(.woocommerce-account, .woocommerce-order-received) .woocommerce form button[type="submit"]:hover {
    opacity: 0.92;
    background: var(--e-global-color-primary) !important;
}
/* Login + reset submit stretch full width; account/address save stay auto. */
body:is(.woocommerce-account, .woocommerce-order-received) .woocommerce-form-login__submit,
body.woocommerce-account .woocommerce-ResetPassword button[type="submit"] {
    width: 100%;
}

/* Login: button stacked above remember-me, both above the lost-password link. */
body:is(.woocommerce-account, .woocommerce-order-received) .woocommerce-form-login p.form-row:has(.woocommerce-form-login__rememberme) {
    display: flex;
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 14px;
    margin-bottom: 6px;
}
body:is(.woocommerce-account, .woocommerce-order-received) .woocommerce-form-login__rememberme {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 14px;
    color: var(--e-global-color-text);
    cursor: pointer;
}
body:is(.woocommerce-account, .woocommerce-order-received) .woocommerce-form-login__rememberme input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--e-global-color-primary);
}

/* Lost-password link. */
body:is(.woocommerce-account, .woocommerce-order-received) .woocommerce-LostPassword {
    margin: 14px 0 0;
}
body:is(.woocommerce-account, .woocommerce-order-received) .woocommerce-LostPassword a {
    color: var(--e-global-color-primary);
    font-size: 14px;
    text-decoration: none;
}
body:is(.woocommerce-account, .woocommerce-order-received) .woocommerce-LostPassword a:hover {
    text-decoration: underline;
}

/* Social buttons (injected into the login form) get a soft separator. */
body:is(.woocommerce-account, .woocommerce-order-received) .woocommerce-form-login .dv-checkout-social {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid color-mix(in srgb, var(--e-global-color-text) 14%, transparent);
}

/* On the filled card the checkout's #f6f6f7 social buttons nearly vanish,
   so here they get a white face and the same hairline as the inputs. The
   inline checkout login panel (white background) is left untouched. */
body:is(.woocommerce-account, .woocommerce-order-received) .woocommerce-form-login .dv-checkout-social-btn {
    background: #fff !important;
    border: 1px solid #c0c4cd;
}
body:is(.woocommerce-account, .woocommerce-order-received) .woocommerce-form-login .dv-checkout-social-btn:hover:not(:disabled) {
    background: color-mix(in srgb, var(--e-global-color-primary) 8%, #fff) !important;
    border-color: var(--e-global-color-primary);
}

/* Thank-you page, logged-out owner: WC prints "thanks" line + notice +
   bare login form as direct children of .woocommerce (the logged-in view
   nests everything inside .dv-thankyou, so the > combinator keeps these
   out of it). Same 48px page margins as .dv-thankyou, notice and card at
   the account card's 480px, both centred. */
body.woocommerce-order-received .woocommerce > .woocommerce-thankyou-order-received {
    margin-top: 48px;
    text-align: center;
}
body.woocommerce-order-received .woocommerce > .woocommerce-info {
    max-width: 480px;
}
body.woocommerce-order-received .woocommerce-form-login {
    max-width: 480px;
    margin: 0 auto 48px;
}

/* WooCommerce overrides ------------------------------------------------- */
.woocommerce form .form-row-first, .woocommerce form .form-row-last, .woocommerce-page form .form-row-first, .woocommerce-page form .form-row-last {
    width: 100%;
    float: none;
}

/* =====================================================================
   Shared order / account card tokens
   ---------------------------------------------------------------------
   One card language for the thank-you page (.dv-order-card) and for every
   My account endpoint. Change a value here and both follow.
   ===================================================================== */
:root {
    --dv-card-bg: rgba(230, 235, 244, .4);
    --dv-card-radius: 10px;
    --dv-card-padding: 28px 32px;
    --dv-card-divider: var(--wp--preset--color--secondary-alt);
    --dv-card-label-color: var(--wp--preset--color--primary);
    --dv-card-label-size: 13px;
}
@media (max-width: 768px) {
    :root { --dv-card-padding: 24px 16px; }
}

.dv-order-card {
    background: var(--dv-card-bg);
    border-radius: var(--dv-card-radius);
    padding: var(--dv-card-padding);
    margin: 0 0 24px;
}

/* "Ordina di nuovo" sits inside the card on My account > order view
   (woocommerce_order_details_after_order_table). Brand pill, not
   Elementor's outlined table button. */
.woocommerce .dv-order-card .order-again {
    margin: 24px 0 0;
}
.woocommerce .dv-order-card .order-again .button {
    display: inline-block;
    background: var(--wp--preset--color--primary);
    color: #fff;
    border: 0;
    border-radius: 10px 30px 30px 0;
    padding: 16px 28px;
    font-weight: 700;
    font-size: var(--dv-card-label-size);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-decoration: none;
}
.woocommerce .dv-order-card .order-again .button:hover {
    opacity: 0.92;
}

/* Order details table inside the card */
.woocommerce .dv-order-card .woocommerce-order-details { margin: 0; }
.woocommerce .dv-order-card table.woocommerce-table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
    border: 0;
    margin: 0;
    font-size: 16px;
}
.woocommerce .dv-order-card table.woocommerce-table thead th {
    color: var(--wp--preset--color--primary);
    font-size: 13px;
    font-weight: 400;
    text-transform: uppercase;
    text-align: left;
    padding: 0 0 12px;
    border: 0;
    background: transparent;
    line-height: 1.2;
}
.woocommerce .dv-order-card table.woocommerce-table thead th.product-quantity { text-align: right; }
.woocommerce .dv-order-card table.woocommerce-table thead th.product-quantity .dv-label-short { display: none; }
.woocommerce .dv-order-card table.woocommerce-table thead th.product-total { text-align: right; }

.woocommerce .dv-order-card table.woocommerce-table tbody td {
    padding: 12px 0;
    border: 0;
    border-bottom: 1px solid var(--wp--preset--color--secondary-alt);
    background: transparent;
    vertical-align: baseline;
    font-weight: 400;
    line-height: 1.4;
}
.woocommerce .dv-order-card table.woocommerce-table tbody td.product-name { width: 68%}
.woocommerce .dv-order-card table.woocommerce-table tbody td.product-quantity { text-align: right; }
.woocommerce .dv-order-card table.woocommerce-table tbody td.product-total { text-align: right; white-space: nowrap; }
.woocommerce .dv-order-card table.woocommerce-table tbody td a { color: var(--wp--preset--color--text); text-decoration: none; }
.woocommerce .dv-order-card table.woocommerce-table tbody td a:hover { color: var(--wp--preset--color--primary); }

/* Small left gutter on every cell after the first, so adjacent columns
   don't touch. Scoped to the order-details section (thank-you page and
   My account > order view). */
.woocommerce .woocommerce-order-details table.woocommerce-table tr > th:not(:first-child),
.woocommerce .woocommerce-order-details table.woocommerce-table tr > td:not(:first-child) {
    padding-left: 9px;
}

/* Totals stack: right-aligned, transparent left side */
.woocommerce .dv-order-card table.woocommerce-table tfoot th,
.woocommerce .dv-order-card table.woocommerce-table tfoot td {
    padding: 4px 0;
    border: 0;
    background: transparent;
    font-weight: 400;
    line-height: 1.4;
}
.woocommerce .dv-order-card table.woocommerce-table tfoot tr.dv-totals-row th {
    text-align: right;
    color: var(--wp--preset--color--primary);
    font-size: 13px;
    font-weight: 400;
    text-transform: uppercase;
    width: 80%;
    padding-top: 4px;
    vertical-align: baseline;
}
.woocommerce .dv-order-card table.woocommerce-table tfoot tr.dv-totals-row th span {
    width: 240px;
    display: inline-block;
    text-align: left;
}

.woocommerce .dv-order-card table.woocommerce-table tfoot tr.dv-totals-row td {
    text-align: right;
    white-space: nowrap;
    color: var(--wp--preset--color--text);
    font-size: 16px;
    padding-bottom: 0;
    padding-top: 4px;
}
.woocommerce .dv-order-card table.woocommerce-table tfoot tr.dv-totals-row:first-child th,
.woocommerce .dv-order-card table.woocommerce-table tfoot tr.dv-totals-row:first-child td {
    padding-top: 16px;
}
.woocommerce .dv-order-card table.woocommerce-table tfoot tr.dv-totals-row--order_total th,
.woocommerce .dv-order-card table.woocommerce-table tfoot tr.dv-totals-row--order_total td {
    font-weight: 700;
    color: var(--wp--preset--color--primary);
    font-size: 16px;
}
.woocommerce .dv-order-card table.woocommerce-table tfoot tr.dv-totals-row--order_total th {
    font-weight: 700;
}
.dv-totals-row--shipping .woocommerce-Price-amount.amount {
    position: relative;
    right: -5px;
}
.woocommerce .dv-order-card table.woocommerce-table tfoot tr.dv-totals-row--note th { text-transform: none; }
.woocommerce .dv-order-card table.woocommerce-table tfoot tr.dv-totals-row .shipped_via {
    color: var(--wp--preset--color--text);
    opacity: 0.7;
    font-size: var(--wp--preset--font-size--sm);
    margin-left: 4px;
    display: block
}

/* Customer details (Fatturazione / Spedizione) inside the card */
.woocommerce .dv-order-card .dv-customer-details {
    display: block;
    margin: 24px 0 0;
    padding-top: 20px;
    border-top: 1px solid var(--wp--preset--color--secondary-alt);
}
.woocommerce .dv-order-card .dv-customer-details--two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}
.woocommerce .dv-order-card .dv-customer-details__title {
    color: var(--wp--preset--color--primary);
    font-size: 13px;
    font-weight: 400;
    text-transform: uppercase;
    margin: 0 0 8px;
}

.woocommerce .dv-order-card .dv-customer-details__col address {
    font-style: normal;
    color: var(--wp--preset--color--text);
    border: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    width: auto;
}
.woocommerce .dv-order-card .dv-customer-details__col address p { margin: 0; }
.woocommerce .dv-order-card .dv-customer-details .woocommerce-customer-details--phone,
.woocommerce .dv-order-card .dv-customer-details .woocommerce-customer-details--email {
    padding-left: 0;
    margin: 0;
}
.woocommerce .dv-order-card .dv-customer-details .woocommerce-customer-details--phone::before,
.woocommerce .dv-order-card .dv-customer-details .woocommerce-customer-details--email::before {
    display: none;
}

@media (max-width: 768px) {
    .woocommerce .dv-order-card .dv-customer-details--two-col {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}
@media (max-width: 480px) {
    .woocommerce .dv-order-card table.woocommerce-table tfoot tr.dv-totals-row th {
        text-align: left !important;
        width:auto;
    }
    .woocommerce .dv-order-card table.woocommerce-table tfoot tr.dv-totals-row th span {
        width:auto;
        vertical-align: baseline;
    }
    .woocommerce .dv-order-card table.woocommerce-table tfoot tr.dv-totals-row td {
        padding-block: 4px;
        vertical-align: baseline;
    }
    .woocommerce .dv-order-card table.woocommerce-table tbody td.product-quantity {
        min-width: 0px !important;
    }
    .woocommerce .dv-order-card table.woocommerce-table thead th.product-quantity .dv-label-full { display: none; }
    .woocommerce .dv-order-card table.woocommerce-table thead th.product-quantity .dv-label-short { display: inline; }
    body.woocommerce-order-received .e-con {
        --container-default-padding-right: 16px;
        --container-default-padding-left: 16px;
    }

}
