/* Finalizar compra - The Body Shop */
.tbs-finalizar-compra {
    --tbs-green: #004236;
    --tbs-green-dark: #00382f;
    --tbs-border: #d9ddd8;
    --tbs-soft: #f7f6f2;
    --tbs-muted: #5d5d5d;
    --tbs-danger: #b40000;
    width: min(1280px, calc(100% - 64px));
    max-width: 1280px;
    margin: clamp(64px, 5vw, 96px) auto 0;
    color: var(--tbs-green);
}

.tbs-finalizar-compra * {
    box-sizing: border-box;
}

.tbs-finalizar-compra a {
    color: var(--tbs-green);
}

.tbs-finalizar-compra__cart {
    margin-bottom: clamp(36px, 4vw, 64px);
}

.tbs-finalizar-compra__checkout {
    margin-top: clamp(24px, 3vw, 42px);
}

.tbs-finalizar-compra h2,
.tbs-finalizar-compra h3,
.tbs-checkout-block__title,
.tbs-checkout-summary-title {
    color: var(--tbs-green);
    font-family: inherit;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.tbs-finalizar-compra .woocommerce-notices-wrapper,
.tbs-finalizar-compra .woocommerce-message,
.tbs-finalizar-compra .woocommerce-info,
.tbs-finalizar-compra .woocommerce-error {
    margin-bottom: 22px;
}

/* Cart top */
.tbs-cart-wrapper {
    width: 100%;
}

.tbs-cart-table,
.tbs-review-order-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--tbs-border);
    background: #fff;
}

.tbs-cart-table {
    table-layout: fixed;
}

.tbs-cart-col-remove {
    width: 48px;
}

.tbs-cart-col-thumbnail {
    width: 112px;
}

.tbs-cart-col-name {
    width: auto;
}

.tbs-cart-col-price {
    width: 150px;
}

.tbs-cart-col-quantity {
    width: 132px;
}

.tbs-cart-col-subtotal {
    width: 160px;
}

.tbs-cart-table th,
.tbs-cart-table td,
.tbs-review-order-table th,
.tbs-review-order-table td {
    border-bottom: 1px solid var(--tbs-border);
    padding: 18px 18px;
    vertical-align: middle;
    color: var(--tbs-green);
}

.tbs-cart-table thead th,
.tbs-review-order-table thead th {
    background: #fff;
    color: var(--tbs-green);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.tbs-cart-table .product-remove {
    width: 44px;
    text-align: center;
}

.tbs-cart-table .remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: var(--tbs-danger);
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
}

.tbs-cart-table .product-thumbnail {
    width: 112px;
    text-align: center;
}

.tbs-cart-product-image-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tbs-cart-table .product-thumbnail img,
.tbs-cart-product-image {
    width: 86px !important;
    height: 86px !important;
    max-width: 86px !important;
    object-fit: contain;
    display: block;
    background: #fff;
}

.tbs-cart-table .product-name,
.tbs-review-order-table .product-name {
    color: var(--tbs-green);
    font-weight: 500;
    line-height: 1.35;
}

.tbs-cart-table .product-name a,
.tbs-review-order-table .product-name a {
    color: var(--tbs-green);
    font-weight: 700;
    text-decoration: none;
}

.tbs-cart-table .variation,
.tbs-review-order-table .variation {
    margin: 6px 0 0;
    color: var(--tbs-muted);
    font-size: 12px;
    line-height: 1.35;
}

.tbs-cart-table .variation dt,
.tbs-cart-table .variation dd,
.tbs-review-order-table .variation dt,
.tbs-review-order-table .variation dd {
    display: inline;
    float: none;
    margin: 0;
}

.tbs-cart-table .product-price,
.tbs-cart-table .product-subtotal,
.tbs-review-order-table .product-total {
    text-align: right;
    white-space: nowrap;
}

.tbs-review-order-table tfoot td {
    text-align: right;
    white-space: normal;
}

.tbs-cart-table .quantity,
.tbs-finalizar-compra .quantity {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tbs-cart-table input.qty,
.tbs-finalizar-compra input.qty {
    width: 56px;
    height: 42px;
    padding: 0 8px;
    border: 1px solid var(--tbs-border);
    border-radius: 0;
    color: var(--tbs-green);
    text-align: center;
    background: #fff;
}

.tbs-cart-actions-row td.actions {
    padding: 18px 16px;
    background: #fff;
}

.tbs-cart-actions-row .actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.tbs-cart-actions-row .actions--checkout-only {
    justify-content: flex-end;
}

.tbs-cart-update-button {
    margin-left: auto;
}

.tbs-cart-coupon {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tbs-cart-coupon input.input-text {
    width: 170px;
    min-height: 42px;
}

/* Checkout layout from Woo template */
.tbs-checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(390px, 500px);
    gap: clamp(34px, 4vw, 72px);
    align-items: start;
}

.tbs-checkout-customer-details {
    display: grid;
    gap: 28px;
}

.tbs-checkout-layout__summary {
    position: sticky;
    top: 24px;
}

.admin-bar .tbs-checkout-layout__summary {
    top: 56px;
}

.tbs-checkout-panel,
.tbs-checkout-review-order {
    width: 100%;
}

.tbs-checkout-block__title,
.tbs-checkout-summary-title {
    margin: 0 0 22px;
    font-size: clamp(28px, 3vw, 40px);
}

.tbs-checkout-block__title--checkbox label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.tbs-checkout-block__title--checkbox input[type="checkbox"] {
    margin: 0;
}

/* Fields */
.tbs-finalizar-compra .form-row {
    margin: 0 0 16px;
    padding: 0;
}

.tbs-finalizar-compra .form-row label {
    display: block;
    margin-bottom: 7px;
    color: var(--tbs-green);
    font-size: 14px;
    font-weight: 600;
}

.tbs-finalizar-compra abbr.required,
.tbs-finalizar-compra .required {
    color: var(--tbs-danger);
    text-decoration: none;
}

.tbs-finalizar-compra input.input-text,
.tbs-finalizar-compra input[type="text"],
.tbs-finalizar-compra input[type="email"],
.tbs-finalizar-compra input[type="tel"],
.tbs-finalizar-compra input[type="password"],
.tbs-finalizar-compra textarea,
.tbs-finalizar-compra select,
.tbs-finalizar-compra .select2-container .select2-selection--single {
    width: 100%;
    min-height: 48px;
    border: 1px solid #9da9a5;
    border-radius: 0;
    background: #fff;
    color: #222;
    font-size: 15px;
    line-height: 1.4;
    padding: 11px 14px;
    box-shadow: none;
    outline: none;
}

.tbs-finalizar-compra textarea {
    min-height: 116px;
    resize: vertical;
}

.tbs-finalizar-compra .select2-container .select2-selection--single {
    display: flex;
    align-items: center;
    padding: 0 14px;
}

.tbs-finalizar-compra .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding: 0;
    color: #222;
    line-height: 46px;
}

.tbs-finalizar-compra input:focus,
.tbs-finalizar-compra textarea:focus,
.tbs-finalizar-compra select:focus,
.tbs-finalizar-compra .select2-container--focus .select2-selection--single {
    border-color: var(--tbs-green);
    box-shadow: 0 0 0 1px var(--tbs-green);
}

.tbs-finalizar-compra input[type="checkbox"],
.tbs-finalizar-compra input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--tbs-green);
}

.tbs-finalizar-compra .woocommerce-form__label-for-checkbox,
.tbs-finalizar-compra .woocommerce-form__label-for-radio {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--tbs-green);
}

/* Order card */
.tbs-checkout-layout__summary {
    background: #fff;
}

.tbs-checkout-review-order {
    border: 1px solid var(--tbs-border);
    background: #fff;
}

.tbs-review-order-table {
    border: 0;
}

.tbs-review-order-table th,
.tbs-review-order-table td {
    padding: 14px 16px;
}

.tbs-review-order-table tbody td {
    font-size: 14px;
}

.tbs-review-order-table tfoot th {
    text-align: left;
    font-weight: 700;
}

.tbs-review-order-table .order-total th,
.tbs-review-order-table .order-total td {
    font-size: 18px;
    font-weight: 800;
}

.tbs-review-order-table .woocommerce-shipping-methods {
    margin: 0;
    padding: 0;
    list-style: none;
}

.tbs-review-order-table .woocommerce-shipping-totals td,
.tbs-review-order-table .woocommerce-shipping-totals .woocommerce-shipping-destination,
.tbs-review-order-table .woocommerce-shipping-totals .woocommerce-shipping-calculator,
.tbs-review-order-table .woocommerce-shipping-totals .woocommerce-shipping-methods li {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    line-height: 1.45;
}

.tbs-review-order-table .woocommerce-shipping-totals td {
    text-align: left;
    font-size: 13px;
}

.tbs-review-order-table .woocommerce-shipping-totals th {
    vertical-align: top;
}

/* Payment */
.tbs-checkout-payment {
    border-top: 1px solid var(--tbs-border);
    background: #f0eef6;
    padding: 18px 18px 20px;
}

.tbs-checkout-payment ul.payment_methods {
    margin: 0;
    padding: 0;
    list-style: none;
}

.tbs-checkout-payment ul.payment_methods>li {
    margin: 0 0 14px;
    color: #222;
}

.tbs-checkout-payment .payment_box {
    margin: 12px 0 0;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.75);
    color: #333;
}

.tbs-place-order {
    margin: 18px 0 0;
    padding: 0;
}

.tbs-place-order .woocommerce-terms-and-conditions-wrapper {
    margin-bottom: 16px;
    color: #333;
    font-size: 13px;
    line-height: 1.5;
}

/* Buttons */
.tbs-finalizar-compra .button,
.tbs-finalizar-compra button.button,
.tbs-finalizar-compra #place_order {
    min-height: 44px;
    border: 1px solid var(--tbs-green);
    border-radius: 0;
    background: var(--tbs-green);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0 24px;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.tbs-finalizar-compra .button:hover,
.tbs-finalizar-compra button.button:hover,
.tbs-finalizar-compra #place_order:hover {
    background: var(--tbs-green-dark);
    border-color: var(--tbs-green-dark);
    color: #fff;
}

.tbs-finalizar-compra .coupon .button,
.tbs-cart-update-button {
    background: #fff;
    color: var(--tbs-green);
}

.tbs-finalizar-compra .coupon .button:hover,
.tbs-cart-update-button:hover {
    background: var(--tbs-green);
    color: #fff;
}

.tbs-finalizar-compra #place_order {
    width: 100%;
    min-height: 52px;
}

/* Checkout coupon/login notices */
.tbs-finalizar-compra .woocommerce-form-coupon-toggle,
.tbs-finalizar-compra .woocommerce-form-login-toggle {
    margin: 0 0 18px;
}

.tbs-finalizar-compra .woocommerce-form-coupon,
.tbs-finalizar-compra .woocommerce-form-login {
    border: 1px solid var(--tbs-border);
    background: #fff;
    margin: 0 0 28px;
    padding: 18px;
}

.tbs-finalizar-compra .woocommerce-form-coupon .form-row-last,
.tbs-finalizar-compra .woocommerce-form-coupon .form-row-first {
    width: auto;
    float: none;
}

/* Responsive */
@media (max-width: 1024px) {
    .tbs-finalizar-compra {
        width: min(100% - 36px, 920px);
        margin-top: 44px;
    }

    .tbs-checkout-layout {
        grid-template-columns: 1fr;
    }

    .tbs-checkout-layout__summary {
        position: static;
    }
}

@media (max-width: 768px) {
    .tbs-cart-table thead {
        display: none;
    }

    .tbs-cart-table,
    .tbs-cart-table tbody,
    .tbs-cart-table tr,
    .tbs-cart-table td {
        display: block;
        width: 100%;
    }

    .tbs-cart-table tr.cart_item {
        position: relative;
        border: 1px solid var(--tbs-border);
        margin-bottom: 16px;
        padding: 14px;
    }

    .tbs-cart-table tr.cart_item td {
        border: 0;
        padding: 8px 0;
    }

    .tbs-cart-table .product-remove {
        position: absolute;
        top: 10px;
        right: 10px;
        width: auto;
    }

    .tbs-cart-table .product-thumbnail img,
    .tbs-cart-product-image {
        width: 86px !important;
        height: 86px !important;
        max-width: 86px !important;
    }

    .tbs-cart-table .product-price,
    .tbs-cart-table .product-subtotal {
        text-align: left;
    }

    .tbs-cart-actions-row .actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .tbs-cart-coupon,
    .tbs-cart-coupon input.input-text,
    .tbs-cart-coupon .button,
    .tbs-cart-update-button {
        width: 100%;
    }
}


/* V3 ajustes estructurales checkout/carrito */
.tbs-finalizar-compra__cart,
.tbs-finalizar-compra__checkout {
    width: 100%;
}

.tbs-cart-wrapper--combined-checkout .tbs-cart-coupon {
    display: none !important;
}

.tbs-cart-table .product-name,
.tbs-cart-table .product-price,
.tbs-cart-table .product-quantity,
.tbs-cart-table .product-subtotal {
    vertical-align: middle;
}

.tbs-cart-table .product-quantity {
    text-align: center;
}

.tbs-cart-table .product-name a {
    display: inline-block;
    max-width: 100%;
}

.tbs-cart-table img {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

.tbs-checkout-review-order .woocommerce-info,
.tbs-checkout-review-order .woocommerce-error,
.tbs-checkout-review-order .woocommerce-message {
    white-space: normal;
    overflow-wrap: anywhere;
}

.tbs-review-order-table .product-name {
    width: 68%;
    white-space: normal;
    overflow-wrap: anywhere;
}

.tbs-review-order-table .product-total {
    width: 32%;
}

.tbs-review-order-table tfoot th {
    width: 32%;
}

.tbs-review-order-table tfoot td {
    width: 68%;
}

@media (min-width: 1280px) {
    .tbs-finalizar-compra {
        width: min(1280px, calc(100% - 96px));
    }
}

@media (max-width: 900px) {

    .tbs-cart-col-remove,
    .tbs-cart-col-thumbnail,
    .tbs-cart-col-name,
    .tbs-cart-col-price,
    .tbs-cart-col-quantity,
    .tbs-cart-col-subtotal {
        width: auto;
    }
}

/* V4 ajustes finales: cupón bajo carro, actualizar carrito e imágenes fijas */
.tbs-finalizar-compra__coupon {
    width: 100%;
    margin: -22px 0 clamp(32px, 4vw, 56px);
}

.tbs-finalizar-compra__coupon .woocommerce-form-coupon-toggle {
    margin: 0;
}

.tbs-finalizar-compra__coupon .woocommerce-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    margin: 0 0 12px !important;
    padding: 14px 18px !important;
    border-top: 3px solid #009fe3;
    border-right: 1px solid var(--tbs-border);
    border-bottom: 1px solid var(--tbs-border);
    border-left: 1px solid var(--tbs-border);
    background: #f7f8fb;
    color: var(--tbs-green);
    font-size: 14px;
    line-height: 1.35;
}

.tbs-finalizar-compra__coupon .woocommerce-info::before {
    position: static;
    margin: 0;
    color: #0075bd;
}

.tbs-finalizar-compra__coupon .woocommerce-info a,
.tbs-finalizar-compra__coupon .showcoupon {
    color: var(--tbs-green);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.tbs-finalizar-compra__coupon .woocommerce-form-coupon {
    display: block;
    margin: 0 0 0 !important;
    padding: 20px 22px !important;
    border: 1px solid var(--tbs-border) !important;
    background: #fff;
}

.tbs-finalizar-compra__coupon .woocommerce-form-coupon p:first-child {
    margin-top: 0;
}

.tbs-finalizar-compra__coupon .woocommerce-form-coupon .form-row {
    margin: 0 0 12px;
    padding: 0;
}

.tbs-finalizar-compra__coupon .woocommerce-form-coupon .form-row-first,
.tbs-finalizar-compra__coupon .woocommerce-form-coupon .form-row-last {
    width: 100%;
    float: none;
}

.tbs-finalizar-compra__coupon .woocommerce-form-coupon input.input-text {
    width: 100%;
    height: 48px;
    border: 1px solid var(--tbs-green);
    color: var(--tbs-green);
}

.tbs-finalizar-compra__coupon .woocommerce-form-coupon button.button {
    min-width: 160px;
    background: #fff;
    color: var(--tbs-green);
}

.tbs-finalizar-compra__coupon .woocommerce-form-coupon button.button:hover {
    background: var(--tbs-green);
    color: #fff;
}

.tbs-cart-footer-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: 100%;
    margin: 18px 0 0;
    padding: 0 18px 0 0;
}

.tbs-cart-footer-actions--checkout-only {
    justify-content: flex-end;
}

.tbs-cart-footer-actions__right {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-left: auto;
}

.tbs-cart-footer-actions .tbs-cart-update-button {
    min-width: 170px;
    margin-left: auto !important;
    margin-right: 0 !important;
}

.tbs-cart-actions-row,
.tbs-cart-actions-row td.actions {
    display: none !important;
}

.tbs-cart-product-image-link,
.tbs-cart-table .product-thumbnail {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
}

.tbs-cart-table .product-thumbnail img.tbs-cart-product-image,
.tbs-cart-product-image.no-lazy,
.tbs-cart-product-image.skip-lazy,
.tbs-cart-product-image[data-tbs-fixed-cart-image="1"] {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
    filter: none !important;
    width: 86px !important;
    min-width: 86px !important;
    max-width: 86px !important;
    height: 86px !important;
    min-height: 86px !important;
    max-height: 86px !important;
    object-fit: contain !important;
    object-position: center center !important;
    background: #fff !important;
}

@media (max-width: 768px) {
    .tbs-finalizar-compra__coupon {
        margin-top: -12px;
    }

    .tbs-cart-footer-actions,
    .tbs-cart-footer-actions__right,
    .tbs-cart-footer-actions .tbs-cart-update-button {
        width: 100%;
    }

    .tbs-cart-footer-actions {
        padding-right: 0;
    }
}

/* =========================================================
   V5 mobile: finalizar compra combinado carrito + checkout
   ========================================================= */
@media (max-width: 768px) {
    .tbs-finalizar-compra {
        width: 100% !important;
        max-width: none !important;
        margin: 0 auto !important;
        padding: 18px 14px 0 !important;
        background: #fafafa;
        overflow-x: hidden;
    }

    .tbs-finalizar-compra__cart {
        margin: 0 0 22px !important;
    }

    .tbs-finalizar-compra__checkout {
        margin-top: 24px !important;
    }

    .tbs-finalizar-compra .woocommerce-notices-wrapper,
    .tbs-finalizar-compra .woocommerce-message,
    .tbs-finalizar-compra .woocommerce-info,
    .tbs-finalizar-compra .woocommerce-error {
        width: 100% !important;
        margin: 0 0 14px !important;
        padding: 12px 14px !important;
        font-size: 13px !important;
        line-height: 1.35 !important;
        overflow-wrap: anywhere;
    }

    /* Carrito: cards legibles */
    .tbs-cart-table {
        display: block !important;
        width: 100% !important;
        border: 0 !important;
        background: transparent !important;
        table-layout: auto !important;
    }

    .tbs-cart-table thead,
    .tbs-cart-table colgroup {
        display: none !important;
    }

    .tbs-cart-table tbody {
        display: grid !important;
        width: 100% !important;
        gap: 12px !important;
    }

    .tbs-cart-table tr.cart_item,
    .tbs-cart-table tr.woocommerce-cart-form__cart-item {
        display: grid !important;
        grid-template-columns: 72px minmax(0, 1fr);
        grid-template-areas:
            "thumb name"
            "thumb price"
            "thumb qty"
            "thumb subtotal";
        column-gap: 12px;
        row-gap: 8px;
        width: 100% !important;
        margin: 0 !important;
        padding: 12px 38px 12px 12px !important;
        border: 1px solid var(--tbs-border) !important;
        background: #ffffff !important;
        position: relative;
    }

    .tbs-cart-table tr.cart_item td,
    .tbs-cart-table tr.woocommerce-cart-form__cart-item td {
        width: auto !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
    }

    .tbs-cart-table.shop_table_responsive tr td::before,
    .tbs-cart-table tr td::before {
        content: none !important;
        display: none !important;
    }

    .tbs-cart-table .product-remove {
        position: absolute !important;
        top: 8px !important;
        right: 8px !important;
        z-index: 2;
        width: 24px !important;
        height: 24px !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    .tbs-cart-table .remove {
        width: 24px !important;
        height: 24px !important;
        font-size: 18px !important;
        line-height: 1 !important;
        color: var(--tbs-danger) !important;
        background: transparent !important;
    }

    .tbs-cart-table .product-thumbnail {
        grid-area: thumb;
        display: flex !important;
        align-items: flex-start;
        justify-content: center;
        padding-top: 2px !important;
    }

    .tbs-cart-product-image-link {
        width: 72px !important;
        height: 72px !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        background: #fff;
    }

    .tbs-cart-table .product-thumbnail img.tbs-cart-product-image,
    .tbs-cart-product-image.no-lazy,
    .tbs-cart-product-image.skip-lazy,
    .tbs-cart-product-image[data-tbs-fixed-cart-image="1"] {
        width: 72px !important;
        min-width: 72px !important;
        max-width: 72px !important;
        height: 72px !important;
        min-height: 72px !important;
        max-height: 72px !important;
        object-fit: contain !important;
    }

    .tbs-cart-table .product-name {
        grid-area: name;
        display: block !important;
        padding-right: 4px !important;
        color: var(--tbs-green) !important;
        font-size: 13px !important;
        font-weight: 700 !important;
        line-height: 1.22 !important;
        overflow-wrap: anywhere;
    }

    .tbs-cart-table .product-name a {
        color: var(--tbs-green) !important;
        font-size: 13px !important;
        font-weight: 800 !important;
        line-height: 1.22 !important;
        text-decoration: none !important;
    }

    .tbs-cart-table .variation {
        margin-top: 4px !important;
        font-size: 11px !important;
        line-height: 1.25 !important;
        color: var(--tbs-muted) !important;
    }

    .tbs-cart-table .product-price,
    .tbs-cart-table .product-quantity,
    .tbs-cart-table .product-subtotal {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        min-height: 30px;
        color: #222 !important;
        font-size: 12px !important;
        line-height: 1.2 !important;
        text-align: right !important;
    }

    .tbs-cart-table .product-price {
        grid-area: price;
    }

    .tbs-cart-table .product-quantity {
        grid-area: qty;
    }

    .tbs-cart-table .product-subtotal {
        grid-area: subtotal;
        padding-top: 4px !important;
        border-top: 1px solid rgba(0, 66, 54, .12) !important;
        font-weight: 700 !important;
    }

    .tbs-cart-table .product-price::before,
    .tbs-cart-table .product-quantity::before,
    .tbs-cart-table .product-subtotal::before {
        display: inline-block !important;
        flex: 0 0 auto;
        color: var(--tbs-green);
        font-size: 11px;
        font-weight: 800;
        line-height: 1;
        letter-spacing: .04em;
        text-transform: uppercase;
        content: attr(data-title) ":" !important;
    }

    .tbs-cart-table .quantity,
    .tbs-finalizar-compra .quantity {
        display: inline-flex !important;
        align-items: center;
        justify-content: flex-end;
    }

    .tbs-cart-table input.qty,
    .tbs-finalizar-compra input.qty {
        width: 48px !important;
        min-width: 48px !important;
        height: 34px !important;
        min-height: 34px !important;
        padding: 0 6px !important;
        font-size: 13px !important;
        text-align: center !important;
    }

    .tbs-cart-footer-actions {
        display: block !important;
        width: 100% !important;
        margin: 14px 0 0 !important;
        padding: 0 !important;
    }

    .tbs-cart-footer-actions__right {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
    }

    .tbs-cart-footer-actions .tbs-cart-update-button {
        width: 100% !important;
        min-width: 0 !important;
        min-height: 46px !important;
        margin: 0 !important;
    }

    /* Cupón */
    .tbs-finalizar-compra__coupon {
        margin: 16px 0 24px !important;
    }

    .tbs-finalizar-compra__coupon .woocommerce-info {
        display: block !important;
        padding: 12px 14px !important;
        font-size: 13px !important;
    }

    .tbs-finalizar-compra__coupon .woocommerce-form-coupon {
        padding: 14px !important;
    }

    .tbs-finalizar-compra__coupon .woocommerce-form-coupon input.input-text,
    .tbs-finalizar-compra__coupon .woocommerce-form-coupon button.button {
        width: 100% !important;
        min-width: 0 !important;
    }

    /* Checkout */
    .tbs-checkout-layout {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 26px !important;
        width: 100% !important;
    }

    .tbs-checkout-layout__main,
    .tbs-checkout-layout__summary,
    .tbs-checkout-panel,
    .tbs-checkout-review-order {
        width: 100% !important;
        min-width: 0 !important;
    }

    .tbs-checkout-layout__summary {
        position: static !important;
        background: transparent !important;
    }

    .tbs-checkout-customer-details {
        display: grid !important;
        gap: 20px !important;
    }

    .tbs-checkout-block__title,
    .tbs-checkout-summary-title {
        margin: 0 0 16px !important;
        color: var(--tbs-green) !important;
        font-size: 26px !important;
        line-height: 1.04 !important;
        letter-spacing: -0.03em !important;
    }

    .tbs-checkout-block__title--checkbox label {
        display: flex !important;
        align-items: flex-start !important;
        gap: 10px !important;
        line-height: 1.05 !important;
    }

    .tbs-finalizar-compra .form-row,
    .tbs-finalizar-compra .form-row-first,
    .tbs-finalizar-compra .form-row-last,
    .tbs-finalizar-compra .form-row-wide,
    .tbs-finalizar-compra .woocommerce-form-row {
        float: none !important;
        clear: both !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 14px !important;
        padding: 0 !important;
    }

    .tbs-finalizar-compra .tbs-checkout-fields,
    .tbs-finalizar-compra .woocommerce-billing-fields__field-wrapper,
    .tbs-finalizar-compra .woocommerce-shipping-fields__field-wrapper,
    .tbs-finalizar-compra .woocommerce-additional-fields__field-wrapper {
        display: block !important;
        width: 100% !important;
    }

    .tbs-finalizar-compra .form-row label {
        margin-bottom: 6px !important;
        font-size: 12px !important;
        line-height: 1.2 !important;
    }

    .tbs-finalizar-compra input.input-text,
    .tbs-finalizar-compra input[type="text"],
    .tbs-finalizar-compra input[type="email"],
    .tbs-finalizar-compra input[type="tel"],
    .tbs-finalizar-compra input[type="password"],
    .tbs-finalizar-compra textarea,
    .tbs-finalizar-compra select,
    .tbs-finalizar-compra .select2-container,
    .tbs-finalizar-compra .select2-container .select2-selection--single {
        width: 100% !important;
        max-width: 100% !important;
        min-height: 44px !important;
        font-size: 14px !important;
        line-height: 1.3 !important;
    }

    .tbs-finalizar-compra textarea {
        min-height: 96px !important;
    }

    /* Pedido */
    .tbs-checkout-summary-title {
        margin-top: 4px !important;
    }

    .tbs-review-order-table {
        width: 100% !important;
        table-layout: fixed !important;
        border: 1px solid var(--tbs-border) !important;
        background: #fff !important;
    }

    .tbs-review-order-table th,
    .tbs-review-order-table td {
        padding: 10px 10px !important;
        font-size: 12px !important;
        line-height: 1.25 !important;
        vertical-align: top !important;
    }

    .tbs-review-order-table thead th {
        font-size: 10px !important;
        letter-spacing: .05em !important;
    }

    .tbs-review-order-table .product-name {
        width: 68% !important;
        overflow-wrap: anywhere !important;
    }

    .tbs-review-order-table .product-total {
        width: 32% !important;
        text-align: right !important;
        white-space: normal !important;
    }

    .tbs-review-order-table__product-name {
        display: inline !important;
        font-weight: 700 !important;
    }

    .tbs-review-order-table .product-quantity {
        display: inline !important;
        color: #222 !important;
        font-size: 11px !important;
        white-space: nowrap !important;
    }

    .tbs-review-order-table tfoot th,
    .tbs-review-order-table tfoot td {
        width: auto !important;
        font-size: 12px !important;
    }

    .tbs-review-order-table .woocommerce-shipping-totals th,
    .tbs-review-order-table .woocommerce-shipping-totals td {
        display: block !important;
        width: 100% !important;
        text-align: left !important;
    }

    .tbs-review-order-table .woocommerce-shipping-totals td {
        padding-top: 0 !important;
    }

    .tbs-review-order-table .woocommerce-shipping-methods,
    .tbs-review-order-table .woocommerce-shipping-methods li,
    .tbs-review-order-table .woocommerce-shipping-destination {
        margin: 0 !important;
        padding: 0 !important;
        font-size: 11px !important;
        line-height: 1.35 !important;
        overflow-wrap: anywhere !important;
    }

    .tbs-review-order-table .order-total th,
    .tbs-review-order-table .order-total td {
        font-size: 15px !important;
        font-weight: 800 !important;
        vertical-align: middle !important;
    }

    /* Pago */
    .tbs-checkout-payment {
        margin: 0 !important;
        padding: 14px !important;
        border-top: 0 !important;
    }

    .tbs-checkout-payment ul.payment_methods>li {
        margin-bottom: 12px !important;
    }

    .tbs-checkout-payment .payment_box {
        margin: 10px 0 0 !important;
        padding: 12px !important;
        font-size: 12px !important;
        line-height: 1.45 !important;
    }

    .tbs-checkout-payment img,
    .tbs-payment-methods img {
        max-width: 150px !important;
        height: auto !important;
    }

    .tbs-place-order {
        margin-top: 14px !important;
    }

    .tbs-place-order .woocommerce-terms-and-conditions-wrapper {
        margin-bottom: 14px !important;
        font-size: 11px !important;
        line-height: 1.45 !important;
    }

    .tbs-finalizar-compra #place_order {
        width: 100% !important;
        min-height: 50px !important;
        padding: 0 16px !important;
        font-size: 12px !important;
    }
}

@media (max-width: 380px) {
    .tbs-finalizar-compra {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .tbs-cart-table tr.cart_item,
    .tbs-cart-table tr.woocommerce-cart-form__cart-item {
        grid-template-columns: 64px minmax(0, 1fr);
        column-gap: 10px;
        padding: 10px 34px 10px 10px !important;
    }

    .tbs-cart-product-image-link,
    .tbs-cart-table .product-thumbnail img.tbs-cart-product-image,
    .tbs-cart-product-image.no-lazy,
    .tbs-cart-product-image.skip-lazy,
    .tbs-cart-product-image[data-tbs-fixed-cart-image="1"] {
        width: 64px !important;
        min-width: 64px !important;
        max-width: 64px !important;
        height: 64px !important;
        min-height: 64px !important;
        max-height: 64px !important;
    }

    .tbs-checkout-block__title,
    .tbs-checkout-summary-title {
        font-size: 24px !important;
    }
}

/* =========================================================
   Fix v2 - botón actualizar carrito con estilo primario TBS
========================================================= */
.tbs-finalizar-compra .tbs-cart-update-button,
.tbs-finalizar-compra button.tbs-cart-update-button,
.tbs-cart-footer-actions .tbs-cart-update-button {
    border-color: var(--tbs-green, #004236) !important;
    background: var(--tbs-green, #004236) !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

.tbs-finalizar-compra .tbs-cart-update-button:hover,
.tbs-finalizar-compra .tbs-cart-update-button:focus,
.tbs-finalizar-compra button.tbs-cart-update-button:hover,
.tbs-finalizar-compra button.tbs-cart-update-button:focus,
.tbs-cart-footer-actions .tbs-cart-update-button:hover,
.tbs-cart-footer-actions .tbs-cart-update-button:focus {
    border-color: var(--tbs-green-dark, #00382f) !important;
    background: var(--tbs-green-dark, #00382f) !important;
    color: #ffffff !important;
}

.tbs-finalizar-compra .tbs-cart-update-button:disabled,
.tbs-finalizar-compra button.tbs-cart-update-button:disabled,
.tbs-cart-footer-actions .tbs-cart-update-button:disabled {
    border-color: #e9e5ec !important;
    background: #e9e5ec !important;
    color: rgba(0, 66, 54, .55) !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
}

/* =========================================================
   Fix v3 - mantener botón Actualizar carrito verde al presionar
   WooCommerce agrega :active/:focus/disabled y puede heredar blanco.
========================================================= */
.tbs-finalizar-compra button[name="update_cart"],
.tbs-finalizar-compra input[name="update_cart"],
.tbs-finalizar-compra .button[name="update_cart"],
.tbs-finalizar-compra .tbs-cart-update-button,
.tbs-finalizar-compra button.tbs-cart-update-button,
.tbs-cart-footer-actions button[name="update_cart"],
.tbs-cart-footer-actions input[name="update_cart"],
.tbs-cart-footer-actions .button[name="update_cart"],
.tbs-cart-footer-actions .tbs-cart-update-button {
    border: 1px solid var(--tbs-green, #004236) !important;
    background-color: var(--tbs-green, #004236) !important;
    background-image: none !important;
    color: #ffffff !important;
    box-shadow: none !important;
    opacity: 1 !important;
    -webkit-tap-highlight-color: transparent;
}

.tbs-finalizar-compra button[name="update_cart"]:hover,
.tbs-finalizar-compra button[name="update_cart"]:focus,
.tbs-finalizar-compra button[name="update_cart"]:focus-visible,
.tbs-finalizar-compra button[name="update_cart"]:active,
.tbs-finalizar-compra input[name="update_cart"]:hover,
.tbs-finalizar-compra input[name="update_cart"]:focus,
.tbs-finalizar-compra input[name="update_cart"]:active,
.tbs-finalizar-compra .button[name="update_cart"]:hover,
.tbs-finalizar-compra .button[name="update_cart"]:focus,
.tbs-finalizar-compra .button[name="update_cart"]:active,
.tbs-finalizar-compra .tbs-cart-update-button:hover,
.tbs-finalizar-compra .tbs-cart-update-button:focus,
.tbs-finalizar-compra .tbs-cart-update-button:focus-visible,
.tbs-finalizar-compra .tbs-cart-update-button:active,
.tbs-cart-footer-actions button[name="update_cart"]:hover,
.tbs-cart-footer-actions button[name="update_cart"]:focus,
.tbs-cart-footer-actions button[name="update_cart"]:focus-visible,
.tbs-cart-footer-actions button[name="update_cart"]:active,
.tbs-cart-footer-actions .tbs-cart-update-button:hover,
.tbs-cart-footer-actions .tbs-cart-update-button:focus,
.tbs-cart-footer-actions .tbs-cart-update-button:focus-visible,
.tbs-cart-footer-actions .tbs-cart-update-button:active {
    border-color: var(--tbs-green-dark, #00382f) !important;
    background-color: var(--tbs-green-dark, #00382f) !important;
    background-image: none !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

.tbs-finalizar-compra button[name="update_cart"]:disabled,
.tbs-finalizar-compra input[name="update_cart"]:disabled,
.tbs-finalizar-compra .button[name="update_cart"]:disabled,
.tbs-finalizar-compra .tbs-cart-update-button:disabled,
.tbs-finalizar-compra .tbs-cart-update-button.disabled,
.tbs-finalizar-compra .tbs-cart-update-button[aria-disabled="true"],
.tbs-finalizar-compra .tbs-cart-update-button[aria-busy="true"],
.tbs-cart-footer-actions button[name="update_cart"]:disabled,
.tbs-cart-footer-actions input[name="update_cart"]:disabled,
.tbs-cart-footer-actions .button[name="update_cart"]:disabled,
.tbs-cart-footer-actions .tbs-cart-update-button:disabled,
.tbs-cart-footer-actions .tbs-cart-update-button.disabled,
.tbs-cart-footer-actions .tbs-cart-update-button[aria-disabled="true"],
.tbs-cart-footer-actions .tbs-cart-update-button[aria-busy="true"] {
    border-color: var(--tbs-green, #004236) !important;
    background-color: var(--tbs-green, #004236) !important;
    background-image: none !important;
    color: #ffffff !important;
    box-shadow: none !important;
    opacity: .72 !important;
    cursor: not-allowed !important;
}

/* =========================================================
   Fix mobile: cerrar envío a dirección diferente por defecto
========================================================= */
@media (max-width: 768px) {

    .tbs-finalizar-compra.tbs-mobile-shipping-ready.tbs-mobile-shipping-closed .woocommerce-shipping-fields .shipping_address,
    .tbs-finalizar-compra.tbs-mobile-shipping-ready.tbs-mobile-shipping-closed .shipping_address {
        display: none !important;
    }

    .tbs-finalizar-compra.tbs-mobile-shipping-ready.tbs-mobile-shipping-open .woocommerce-shipping-fields .shipping_address,
    .tbs-finalizar-compra.tbs-mobile-shipping-ready.tbs-mobile-shipping-open .shipping_address {
        display: block !important;
    }

    .tbs-finalizar-compra .woocommerce-shipping-fields:has(#ship-to-different-address-checkbox:not(:checked)) .shipping_address {
        display: none !important;
    }

    .tbs-finalizar-compra .woocommerce-shipping-fields:has(#ship-to-different-address-checkbox:checked) .shipping_address {
        display: block !important;
    }
}


/* =========================================================
   Fix v4 mobile cart: título a la izquierda y precios mayores
========================================================= */
@media (max-width: 768px) {

    .tbs-cart-table tr.cart_item,
    .tbs-cart-table tr.woocommerce-cart-form__cart-item {
        grid-template-columns: 72px minmax(0, 1fr) !important;
        grid-template-areas:
            "name name"
            "thumb price"
            "thumb qty"
            "thumb subtotal" !important;
        column-gap: 12px !important;
        row-gap: 9px !important;
        padding: 14px 38px 14px 12px !important;
    }

    .tbs-cart-table .product-name {
        grid-area: name !important;
        display: block !important;
        width: 100% !important;
        padding: 0 8px 2px 0 !important;
        text-align: left !important;
        justify-self: stretch !important;
    }

    .tbs-cart-table .product-name a,
    .tbs-cart-table .product-name .product-title,
    .tbs-cart-table .product-name .tbs-cart-product-title {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        text-align: left !important;
    }

    .tbs-cart-table .product-thumbnail {
        padding-top: 0 !important;
    }

    .tbs-cart-table .product-price,
    .tbs-cart-table .product-quantity,
    .tbs-cart-table .product-subtotal {
        font-size: 14px !important;
        line-height: 1.25 !important;
    }

    .tbs-cart-table .product-price .amount,
    .tbs-cart-table .product-price bdi,
    .tbs-cart-table .product-subtotal .amount,
    .tbs-cart-table .product-subtotal bdi {
        font-size: 14px !important;
        line-height: 1.25 !important;
    }

    .tbs-cart-table .product-subtotal,
    .tbs-cart-table .product-subtotal .amount,
    .tbs-cart-table .product-subtotal bdi {
        font-size: 15px !important;
        font-weight: 800 !important;
    }
}

@media (max-width: 380px) {

    .tbs-cart-table tr.cart_item,
    .tbs-cart-table tr.woocommerce-cart-form__cart-item {
        grid-template-columns: 64px minmax(0, 1fr) !important;
        grid-template-areas:
            "name name"
            "thumb price"
            "thumb qty"
            "thumb subtotal" !important;
    }
}