/* SiteEcuador Commerce Flash - Checkout optimizado v7.5.0 */
body.sefc-checkout-enabled.woocommerce-checkout {
    --sefc-checkout-border:#dbe4f0;
    --sefc-checkout-muted:#64748b;
    --sefc-checkout-soft:#f7f9fc;
    --sefc-checkout-success:#18864b;
    --sefc-checkout-bank:#eef5ff;
}

body.sefc-checkout-enabled.woocommerce-checkout #Content .content_wrapper,
body.sefc-checkout-enabled.woocommerce-checkout #Content .sections_group,
body.sefc-checkout-enabled.woocommerce-checkout .section_wrapper,
body.sefc-checkout-enabled.woocommerce-checkout .woocommerce {
    width:100%!important;
    max-width:var(--sefc-checkout-max-width)!important;
    box-sizing:border-box!important;
}
body.sefc-checkout-enabled.woocommerce-checkout #Content .content_wrapper,
body.sefc-checkout-enabled.woocommerce-checkout .woocommerce {
    margin-left:auto!important;
    margin-right:auto!important;
}
body.sefc-checkout-enabled.woocommerce-checkout .woocommerce {
    padding:18px 24px 54px!important;
}

/* Cupón */
body.sefc-checkout-enabled.woocommerce-checkout .woocommerce-form-coupon-toggle {
    margin:4px 0 26px!important;
}
body.sefc-checkout-enabled.woocommerce-checkout .woocommerce-info {
    border:1px solid var(--sefc-checkout-border)!important;
    border-radius:12px!important;
    background:#fff!important;
    box-shadow:none!important;
    padding:14px 18px!important;
}

/* Layout principal: datos + resumen */
body.sefc-checkout-enabled.woocommerce-checkout form.checkout.woocommerce-checkout {
    display:grid!important;
    grid-template-columns:minmax(0,1.16fr) minmax(380px,.84fr)!important;
    grid-template-areas:
        "details review-heading"
        "details review"!important;
    column-gap:34px!important;
    row-gap:0!important;
    align-items:start!important;
    width:100%!important;
    max-width:none!important;
}
body.sefc-checkout-enabled.woocommerce-checkout form.checkout #customer_details {
    grid-area:details!important;
    width:100%!important;
    float:none!important;
    margin:0!important;
    min-width:0!important;
}
body.sefc-checkout-enabled.woocommerce-checkout form.checkout #order_review_heading {
    grid-area:review-heading!important;
    width:100%!important;
    float:none!important;
    margin:0!important;
    padding:22px 24px 0!important;
    border:1px solid var(--sefc-checkout-border)!important;
    border-bottom:0!important;
    border-radius:16px 16px 0 0!important;
    background:#fff!important;
    box-sizing:border-box!important;
    font-size:28px!important;
    line-height:1.2!important;
}
body.sefc-checkout-enabled.woocommerce-checkout form.checkout #order_review {
    grid-area:review!important;
    width:100%!important;
    float:none!important;
    margin:0!important;
    padding:10px 24px 24px!important;
    border:1px solid var(--sefc-checkout-border)!important;
    border-top:0!important;
    border-radius:0 0 16px 16px!important;
    background:#fff!important;
    box-shadow:0 12px 35px rgba(15,23,42,.06)!important;
    box-sizing:border-box!important;
    min-width:0!important;
}
body.sefc-checkout-sticky.woocommerce-checkout form.checkout #order_review {
    position:sticky!important;
    top:28px!important;
}

/* Datos de facturación */
body.sefc-checkout-enabled.woocommerce-checkout #customer_details > .col-1,
body.sefc-checkout-enabled.woocommerce-checkout #customer_details > .col-2 {
    width:100%!important;
    float:none!important;
    margin:0 0 24px!important;
    padding:24px!important;
    border:1px solid var(--sefc-checkout-border)!important;
    border-radius:16px!important;
    background:#fff!important;
    box-shadow:0 8px 28px rgba(15,23,42,.045)!important;
    box-sizing:border-box!important;
}
body.sefc-checkout-enabled.woocommerce-checkout #customer_details h3,
body.sefc-checkout-enabled.woocommerce-checkout .woocommerce-additional-fields h3 {
    margin:0 0 20px!important;
    font-size:29px!important;
    line-height:1.2!important;
    color:#153578!important;
}
body.sefc-checkout-enabled.woocommerce-checkout .form-row {
    margin-bottom:14px!important;
}
body.sefc-checkout-enabled.woocommerce-checkout .form-row label {
    font-size:13px!important;
    font-weight:700!important;
    color:#475569!important;
    margin-bottom:6px!important;
}
body.sefc-checkout-enabled.woocommerce-checkout .form-row input.input-text,
body.sefc-checkout-enabled.woocommerce-checkout .form-row textarea,
body.sefc-checkout-enabled.woocommerce-checkout .form-row select,
body.sefc-checkout-enabled.woocommerce-checkout .select2-container .select2-selection--single {
    width:100%!important;
    min-height:46px!important;
    border:1px solid #cbd5e1!important;
    border-radius:10px!important;
    background:#fff!important;
    box-shadow:none!important;
    box-sizing:border-box!important;
}
body.sefc-checkout-enabled.woocommerce-checkout .form-row input.input-text,
body.sefc-checkout-enabled.woocommerce-checkout .form-row textarea,
body.sefc-checkout-enabled.woocommerce-checkout .form-row select {
    padding:10px 12px!important;
}
body.sefc-checkout-enabled.woocommerce-checkout .form-row textarea {
    min-height:120px!important;
}
body.sefc-checkout-enabled.woocommerce-checkout .select2-container .select2-selection--single .select2-selection__rendered {
    line-height:44px!important;
    padding-left:12px!important;
}

/* Resumen del pedido */
body.sefc-checkout-enabled.woocommerce-checkout .woocommerce-checkout-review-order-table {
    border:0!important;
    margin:0 0 18px!important;
}
body.sefc-checkout-enabled.woocommerce-checkout .woocommerce-checkout-review-order-table th,
body.sefc-checkout-enabled.woocommerce-checkout .woocommerce-checkout-review-order-table td {
    padding:13px 10px!important;
    border-color:#e8edf4!important;
    vertical-align:middle!important;
}
body.sefc-checkout-enabled.woocommerce-checkout .woocommerce-checkout-review-order-table .product-name {
    font-weight:700!important;
    color:#334155!important;
}
body.sefc-checkout-enabled.woocommerce-checkout .woocommerce-checkout-review-order-table .order-total th,
body.sefc-checkout-enabled.woocommerce-checkout .woocommerce-checkout-review-order-table .order-total td {
    font-size:20px!important;
    color:#153578!important;
}
body.sefc-checkout-compact-order.woocommerce-checkout .woocommerce-checkout-review-order-table .cart_item td {
    padding-top:10px!important;
    padding-bottom:10px!important;
}

/* Encabezado de formas de pago */
body.sefc-checkout-enabled.woocommerce-checkout .sefc-payment-heading {
    margin:18px 0 12px!important;
    padding-top:4px!important;
}
body.sefc-checkout-enabled.woocommerce-checkout .sefc-payment-heading h3 {
    margin:0 0 4px!important;
    font-size:21px!important;
    line-height:1.25!important;
    color:#153578!important;
}
body.sefc-checkout-enabled.woocommerce-checkout .sefc-payment-heading p {
    margin:0!important;
    color:var(--sefc-checkout-muted)!important;
    font-size:13px!important;
}

/* Métodos de pago como tarjetas */
body.sefc-checkout-enabled.woocommerce-checkout #payment {
    background:transparent!important;
    border:0!important;
    padding:0!important;
}
body.sefc-checkout-enabled.woocommerce-checkout #payment ul.payment_methods {
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:12px!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    list-style:none!important;
}
body.sefc-checkout-enabled.woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method {
    margin:0!important;
    padding:0!important;
    border:1px solid var(--sefc-checkout-border)!important;
    border-radius:14px!important;
    background:#fff!important;
    overflow:hidden!important;
    box-shadow:none!important;
    transition:border-color .2s ease, box-shadow .2s ease, transform .2s ease!important;
}
body.sefc-checkout-enabled.woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method:hover {
    border-color:#aabbd4!important;
    transform:translateY(-1px)!important;
}
body.sefc-checkout-enabled.woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method.sefc-payment-selected,
body.sefc-checkout-enabled.woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method:has(input[type="radio"]:checked) {
    border-color:var(--sefc-checkout-primary)!important;
    box-shadow:0 0 0 2px color-mix(in srgb,var(--sefc-checkout-primary) 14%,transparent)!important;
}
body.sefc-checkout-enabled.woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method > input[type="radio"] {
    position:absolute!important;
    opacity:0!important;
    pointer-events:none!important;
}
body.sefc-checkout-enabled.woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method > label {
    display:flex!important;
    align-items:center!important;
    gap:12px!important;
    min-height:60px!important;
    margin:0!important;
    padding:14px 16px!important;
    cursor:pointer!important;
    color:#1e293b!important;
    font-size:15px!important;
    font-weight:800!important;
    box-sizing:border-box!important;
}
body.sefc-checkout-enabled.woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method > label::before {
    content:''!important;
    flex:0 0 18px!important;
    width:18px!important;
    height:18px!important;
    border-radius:50%!important;
    border:2px solid #a7b4c7!important;
    background:#fff!important;
    box-sizing:border-box!important;
}
body.sefc-checkout-enabled.woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method.sefc-payment-selected > label::before,
body.sefc-checkout-enabled.woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method:has(input[type="radio"]:checked) > label::before {
    border:5px solid var(--sefc-checkout-primary)!important;
}
body.sefc-checkout-enabled.woocommerce-checkout #payment .wc_payment_method img {
    width:auto!important;
    max-width:180px!important;
    max-height:var(--sefc-checkout-logo-height)!important;
    height:auto!important;
    object-fit:contain!important;
    margin-left:auto!important;
    float:none!important;
    vertical-align:middle!important;
}
body.sefc-checkout-enabled.woocommerce-checkout #payment .payment_box {
    margin:0 14px 14px!important;
    padding:14px 16px!important;
    border:0!important;
    border-radius:11px!important;
    background:var(--sefc-checkout-soft)!important;
    color:#475569!important;
    font-size:13px!important;
    line-height:1.55!important;
}
body.sefc-checkout-enabled.woocommerce-checkout #payment .payment_box::before {
    display:none!important;
}
body.sefc-checkout-enabled.woocommerce-checkout #payment .payment_box p:last-child {
    margin-bottom:0!important;
}

/* Transferencia / depósito mucho más visible */
body.sefc-checkout-highlight-bacs.woocommerce-checkout #payment li.payment_method_bacs {
    border-color:#9db7e3!important;
    background:linear-gradient(180deg,#fff 0%,#fbfdff 100%)!important;
}
body.sefc-checkout-highlight-bacs.woocommerce-checkout #payment li.payment_method_bacs > label::after {
    content:'Comprobante validado por Caja';
    margin-left:auto!important;
    padding:5px 8px!important;
    border-radius:999px!important;
    background:#eaf2ff!important;
    color:#24488b!important;
    font-size:10px!important;
    font-weight:800!important;
    line-height:1.2!important;
}
body.sefc-checkout-highlight-bacs.woocommerce-checkout #payment li.payment_method_bacs .payment_box {
    background:var(--sefc-checkout-bank)!important;
    border:1px solid #d4e2f7!important;
}
body.sefc-checkout-enabled.woocommerce-checkout .sefc-bacs-helper {
    display:grid!important;
    grid-template-columns:38px minmax(0,1fr)!important;
    gap:10px!important;
    align-items:start!important;
    margin:0 0 10px!important;
    padding:12px!important;
    border-radius:10px!important;
    background:#fff!important;
    border:1px solid #d7e5f7!important;
}
body.sefc-checkout-enabled.woocommerce-checkout .sefc-bacs-icon {
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:38px!important;
    height:38px!important;
    border-radius:10px!important;
    background:#e8f1ff!important;
    font-size:18px!important;
}
body.sefc-checkout-enabled.woocommerce-checkout .sefc-bacs-helper strong {
    display:block!important;
    margin:0 0 3px!important;
    color:#18386f!important;
    font-size:14px!important;
}
body.sefc-checkout-enabled.woocommerce-checkout .sefc-bacs-helper p {
    margin:0!important;
    color:#52657f!important;
}

/* Botón final */
body.sefc-checkout-enabled.woocommerce-checkout #payment .place-order {
    margin-top:16px!important;
    padding:0!important;
}
body.sefc-checkout-enabled.woocommerce-checkout #place_order {
    width:100%!important;
    min-height:52px!important;
    border-radius:11px!important;
    background:var(--sefc-checkout-primary)!important;
    color:#fff!important;
    font-weight:800!important;
    font-size:15px!important;
    box-shadow:none!important;
}
body.sefc-checkout-enabled.woocommerce-checkout #place_order:hover {
    filter:brightness(.94)!important;
}

/* Franja de confianza */
body.sefc-checkout-enabled.woocommerce-checkout .sefc-checkout-trust {
    display:flex!important;
    flex-wrap:wrap!important;
    gap:8px 14px!important;
    margin:14px 0 0!important;
    padding:12px 14px!important;
    border:1px solid #dce7df!important;
    border-radius:11px!important;
    background:#f7fcf8!important;
    color:#456050!important;
    font-size:11px!important;
}
body.sefc-checkout-enabled.woocommerce-checkout .sefc-checkout-trust span {
    display:inline-flex!important;
    align-items:center!important;
    gap:5px!important;
}
body.sefc-checkout-enabled.woocommerce-checkout .sefc-checkout-trust b {
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:17px!important;
    height:17px!important;
    border-radius:50%!important;
    background:#e5f6e9!important;
    color:var(--sefc-checkout-success)!important;
    font-size:10px!important;
}

@media (max-width:1050px) {
    body.sefc-checkout-enabled.woocommerce-checkout form.checkout.woocommerce-checkout {
        grid-template-columns:1fr!important;
        grid-template-areas:"details" "review-heading" "review"!important;
        gap:0!important;
    }
    body.sefc-checkout-sticky.woocommerce-checkout form.checkout #order_review {
        position:static!important;
    }
    body.sefc-checkout-enabled.woocommerce-checkout form.checkout #order_review_heading {
        margin-top:8px!important;
    }
}

@media (max-width:640px) {
    body.sefc-checkout-enabled.woocommerce-checkout .woocommerce {
        padding:12px 12px 34px!important;
    }
    body.sefc-checkout-enabled.woocommerce-checkout #customer_details > .col-1,
    body.sefc-checkout-enabled.woocommerce-checkout #customer_details > .col-2,
    body.sefc-checkout-enabled.woocommerce-checkout form.checkout #order_review {
        padding:18px 14px!important;
    }
    body.sefc-checkout-enabled.woocommerce-checkout form.checkout #order_review_heading {
        padding:18px 14px 0!important;
    }
    body.sefc-checkout-enabled.woocommerce-checkout #customer_details h3,
    body.sefc-checkout-enabled.woocommerce-checkout .woocommerce-additional-fields h3,
    body.sefc-checkout-enabled.woocommerce-checkout form.checkout #order_review_heading {
        font-size:24px!important;
    }
    body.sefc-checkout-enabled.woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method > label {
        flex-wrap:wrap!important;
        min-height:54px!important;
        padding:12px!important;
    }
    body.sefc-checkout-enabled.woocommerce-checkout #payment .wc_payment_method img {
        max-width:135px!important;
        max-height:38px!important;
    }
    body.sefc-checkout-highlight-bacs.woocommerce-checkout #payment li.payment_method_bacs > label::after {
        width:100%!important;
        margin-left:30px!important;
        text-align:left!important;
        background:transparent!important;
        padding:0!important;
    }
}

/* ===== Commerce Flash v7.6.0: campos personalizados checkout ===== */
body.sefc-checkout-enabled #billing_identity_document_field,
body.sefc-checkout-enabled .sefc-custom-checkout-field{width:100%!important;float:none!important;clear:both!important}
body.sefc-checkout-enabled #billing_identity_document_field{margin-top:10px!important;padding-top:12px!important;border-top:1px solid #edf1f6}
body.sefc-checkout-enabled #billing_identity_document_field label:before{content:'🪪';margin-right:7px}
body.sefc-checkout-enabled .sefc-customer-extra{margin-top:22px;padding:18px;border:1px solid #e4e9f1;border-radius:12px;background:#fff}
body.sefc-checkout-enabled .sefc-customer-extra dl{display:grid;grid-template-columns:minmax(140px,220px) 1fr;gap:8px 16px;margin:0}
body.sefc-checkout-enabled .sefc-customer-extra dt{font-weight:700}
body.sefc-checkout-enabled .sefc-customer-extra dd{margin:0}
@media(max-width:600px){body.sefc-checkout-enabled .sefc-customer-extra dl{grid-template-columns:1fr}}


/* ===== Commerce Flash v7.6.1: compatibilidad reforzada con BeTheme ===== */
/* El checkout debe ocupar el área completa del contenido, sin sidebar ni columnas heredadas. */
body.sefc-checkout-enabled.woocommerce-checkout #Content,
body.sefc-checkout-enabled.woocommerce-checkout #Content .content_wrapper,
body.sefc-checkout-enabled.woocommerce-checkout #Content .sections_group,
body.sefc-checkout-enabled.woocommerce-checkout #Content .section_wrapper,
body.sefc-checkout-enabled.woocommerce-checkout #Content .mcb-section,
body.sefc-checkout-enabled.woocommerce-checkout #Content .mcb-section-inner,
body.sefc-checkout-enabled.woocommerce-checkout #Content .mcb-wrap,
body.sefc-checkout-enabled.woocommerce-checkout #Content .mcb-wrap-inner,
body.sefc-checkout-enabled.woocommerce-checkout #Content .column,
body.sefc-checkout-enabled.woocommerce-checkout #Content .column_attr,
body.sefc-checkout-enabled.woocommerce-checkout #Content .woocommerce {
    box-sizing:border-box!important;
    min-width:0!important;
}
body.sefc-checkout-enabled.woocommerce-checkout #Content .content_wrapper,
body.sefc-checkout-enabled.woocommerce-checkout #Content .sections_group {
    display:block!important;
    float:none!important;
    width:100%!important;
    max-width:none!important;
    margin:0!important;
}
body.sefc-checkout-enabled.woocommerce-checkout #Content .section_wrapper {
    display:block!important;
    float:none!important;
    width:min(calc(100% - 40px), var(--sefc-checkout-max-width))!important;
    max-width:var(--sefc-checkout-max-width)!important;
    margin-left:auto!important;
    margin-right:auto!important;
}
body.sefc-checkout-enabled.woocommerce-checkout #Content .mcb-section-inner,
body.sefc-checkout-enabled.woocommerce-checkout #Content .mcb-wrap,
body.sefc-checkout-enabled.woocommerce-checkout #Content .mcb-wrap-inner,
body.sefc-checkout-enabled.woocommerce-checkout #Content .column,
body.sefc-checkout-enabled.woocommerce-checkout #Content .column_attr {
    float:none!important;
    width:100%!important;
    max-width:none!important;
    margin-left:0!important;
    margin-right:0!important;
}
body.sefc-checkout-enabled.woocommerce-checkout #Content .sidebar,
body.sefc-checkout-enabled.woocommerce-checkout #Content .widget-area,
body.sefc-checkout-enabled.woocommerce-checkout .woocommerce-MyAccount-navigation {
    display:none!important;
}
body.sefc-checkout-enabled.woocommerce-checkout #Content .woocommerce {
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:18px 0 54px!important;
    overflow:visible!important;
}

/* Grid estable incluso cuando BeTheme deja floats/clases de columnas. */
body.sefc-checkout-enabled.woocommerce-checkout form.checkout.woocommerce-checkout {
    display:grid!important;
    grid-template-columns:minmax(0,1.08fr) minmax(390px,.92fr)!important;
    grid-template-areas:"details review-heading" "details review"!important;
    column-gap:30px!important;
    row-gap:0!important;
    align-items:start!important;
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    overflow:visible!important;
}
body.sefc-checkout-enabled.woocommerce-checkout form.checkout > #customer_details,
body.sefc-checkout-enabled.woocommerce-checkout form.checkout > #order_review_heading,
body.sefc-checkout-enabled.woocommerce-checkout form.checkout > #order_review {
    min-width:0!important;
    max-width:none!important;
}
body.sefc-checkout-enabled.woocommerce-checkout form.checkout #order_review_heading,
body.sefc-checkout-enabled.woocommerce-checkout form.checkout #order_review {
    display:block!important;
    visibility:visible!important;
    opacity:1!important;
}
body.sefc-checkout-sticky.woocommerce-checkout form.checkout #order_review {
    top:56px!important;
}
body.admin-bar.sefc-checkout-sticky.woocommerce-checkout form.checkout #order_review {
    top:88px!important;
}

/* Facturación más compacta y aprovechando el ancho disponible. */
body.sefc-checkout-enabled.woocommerce-checkout .woocommerce-billing-fields__field-wrapper {
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:14px 16px!important;
    align-items:start!important;
}
body.sefc-checkout-enabled.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row {
    width:100%!important;
    float:none!important;
    clear:none!important;
    margin:0!important;
    min-width:0!important;
}
body.sefc-checkout-enabled.woocommerce-checkout #billing_company_field,
body.sefc-checkout-enabled.woocommerce-checkout #billing_identity_document_field,
body.sefc-checkout-enabled.woocommerce-checkout #billing_address_1_field,
body.sefc-checkout-enabled.woocommerce-checkout #billing_address_2_field,
body.sefc-checkout-enabled.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .sefc-custom-checkout-field {
    grid-column:1 / -1!important;
}
body.sefc-checkout-enabled.woocommerce-checkout #billing_country_field,
body.sefc-checkout-enabled.woocommerce-checkout #billing_phone_field,
body.sefc-checkout-enabled.woocommerce-checkout #billing_email_field {
    grid-column:1 / -1!important;
}
body.sefc-checkout-enabled.woocommerce-checkout #billing_identity_document_field {
    margin-top:0!important;
}

/* El resumen nunca debe quedar detrás de menús o capas del tema. */
body.sefc-checkout-enabled.woocommerce-checkout #order_review_heading,
body.sefc-checkout-enabled.woocommerce-checkout #order_review {
    position:relative;
    z-index:2;
}

@media (max-width:1050px) {
    body.sefc-checkout-enabled.woocommerce-checkout #Content .section_wrapper {
        width:min(calc(100% - 28px), var(--sefc-checkout-max-width))!important;
    }
    body.sefc-checkout-enabled.woocommerce-checkout form.checkout.woocommerce-checkout {
        grid-template-columns:1fr!important;
        grid-template-areas:"details" "review-heading" "review"!important;
    }
    body.sefc-checkout-enabled.woocommerce-checkout .woocommerce-billing-fields__field-wrapper {
        grid-template-columns:repeat(2,minmax(0,1fr))!important;
    }
}
@media (max-width:640px) {
    body.sefc-checkout-enabled.woocommerce-checkout #Content .section_wrapper {
        width:calc(100% - 20px)!important;
    }
    body.sefc-checkout-enabled.woocommerce-checkout .woocommerce-billing-fields__field-wrapper {
        grid-template-columns:1fr!important;
        gap:12px!important;
    }
    body.sefc-checkout-enabled.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row,
    body.sefc-checkout-enabled.woocommerce-checkout #billing_company_field,
    body.sefc-checkout-enabled.woocommerce-checkout #billing_identity_document_field,
    body.sefc-checkout-enabled.woocommerce-checkout #billing_address_1_field,
    body.sefc-checkout-enabled.woocommerce-checkout #billing_address_2_field,
    body.sefc-checkout-enabled.woocommerce-checkout #billing_country_field,
    body.sefc-checkout-enabled.woocommerce-checkout #billing_phone_field,
    body.sefc-checkout-enabled.woocommerce-checkout #billing_email_field {
        grid-column:1!important;
    }
}


/* ===== v7.6.2: plantilla propia de checkout (BeTheme-proof) ===== */
body.sefc-checkout-native-template #Content,
body.sefc-checkout-native-template #Content > .content_wrapper,
body.sefc-checkout-native-template #Content .sections_group,
body.sefc-checkout-native-template #Content .section_wrapper,
body.sefc-checkout-native-template .sefc-native-checkout-page,
body.sefc-checkout-native-template .sefc-native-checkout-shell,
body.sefc-checkout-native-template .sefc-native-checkout-content,
body.sefc-checkout-native-template .sefc-native-checkout-content > .woocommerce{
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    float:none!important;
    margin-left:0!important;
    margin-right:0!important;
    box-sizing:border-box!important;
}
body.sefc-checkout-native-template #Content{
    padding:0!important;
    overflow:visible!important;
}
body.sefc-checkout-native-template .sefc-native-checkout-page{
    background:#f7f9fc!important;
    padding:34px 18px 64px!important;
    overflow:visible!important;
}
body.sefc-checkout-native-template .sefc-native-checkout-shell{
    max-width:var(--sefc-checkout-max-width)!important;
    margin:0 auto!important;
}
body.sefc-checkout-native-template .sefc-native-checkout-content > .woocommerce{
    padding:0!important;
}
body.sefc-checkout-native-template .sefc-native-checkout-header{
    margin:0 0 24px!important;
}
body.sefc-checkout-native-template .sefc-native-back-cart{
    display:inline-flex!important;
    align-items:center!important;
    margin:0 0 20px!important;
    color:var(--sefc-checkout-primary)!important;
    font-size:13px!important;
    font-weight:700!important;
    text-decoration:none!important;
}
body.sefc-checkout-native-template .sefc-native-checkout-progress{
    display:grid!important;
    grid-template-columns:auto minmax(36px,1fr) auto minmax(36px,1fr) auto!important;
    align-items:center!important;
    max-width:620px!important;
    margin:0 auto 10px!important;
}
body.sefc-checkout-native-template .sefc-native-checkout-progress > div{
    display:flex!important;
    align-items:center!important;
    gap:9px!important;
    color:#64748b!important;
    white-space:nowrap!important;
}
body.sefc-checkout-native-template .sefc-native-checkout-progress span{
    display:grid!important;
    place-items:center!important;
    width:36px!important;
    height:36px!important;
    border:1px solid #d8e0eb!important;
    border-radius:50%!important;
    background:#fff!important;
    color:#475569!important;
    font-weight:800!important;
}
body.sefc-checkout-native-template .sefc-native-checkout-progress .is-done span,
body.sefc-checkout-native-template .sefc-native-checkout-progress .is-current span{
    border-color:#69bfee!important;
    background:#69bfee!important;
    color:#fff!important;
}
body.sefc-checkout-native-template .sefc-native-checkout-progress > i{
    display:block!important;
    height:1px!important;
    margin:0 12px!important;
    background:#dbe4f0!important;
}

/* El shortcode es el único contenido de la página; ningún wrapper de BeTheme puede reducirlo. */
body.sefc-checkout-native-template form.checkout.woocommerce-checkout{
    display:grid!important;
    grid-template-columns:minmax(0,1.12fr) minmax(390px,.88fr)!important;
    grid-template-areas:
        "details review-heading"
        "details review"!important;
    gap:0 32px!important;
    align-items:start!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    margin:0!important;
}
body.sefc-checkout-native-template form.checkout #customer_details{
    grid-area:details!important;
    min-width:0!important;
}
body.sefc-checkout-native-template form.checkout #order_review_heading{
    grid-area:review-heading!important;
}
body.sefc-checkout-native-template form.checkout #order_review{
    grid-area:review!important;
    min-width:0!important;
}
body.sefc-checkout-native-template .woocommerce-MyAccount-navigation,
body.sefc-checkout-native-template .mcb-wrap:not(:has(#sefcNativeCheckout)) .woocommerce-MyAccount-navigation{
    display:none!important;
}

/* Campos: dos columnas reales solo donde corresponde. */
body.sefc-checkout-native-template #customer_details .woocommerce-billing-fields__field-wrapper{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:0 16px!important;
}
body.sefc-checkout-native-template #customer_details .woocommerce-billing-fields__field-wrapper > .form-row{
    width:100%!important;
    float:none!important;
    min-width:0!important;
}
body.sefc-checkout-native-template #billing_first_name_field,
body.sefc-checkout-native-template #billing_last_name_field,
body.sefc-checkout-native-template #billing_city_field,
body.sefc-checkout-native-template #billing_state_field{
    grid-column:auto!important;
}
body.sefc-checkout-native-template #billing_company_field,
body.sefc-checkout-native-template #billing_country_field,
body.sefc-checkout-native-template #billing_identity_document_field,
body.sefc-checkout-native-template #billing_address_1_field,
body.sefc-checkout-native-template #billing_address_2_field,
body.sefc-checkout-native-template #billing_postcode_field,
body.sefc-checkout-native-template #billing_phone_field,
body.sefc-checkout-native-template #billing_email_field,
body.sefc-checkout-native-template .sefc-custom-checkout-field{
    grid-column:1 / -1!important;
}

@media(max-width:1024px){
    body.sefc-checkout-native-template form.checkout.woocommerce-checkout{
        grid-template-columns:1fr!important;
        grid-template-areas:"details" "review-heading" "review"!important;
        gap:20px!important;
    }
    body.sefc-checkout-sticky.sefc-checkout-native-template form.checkout #order_review{
        position:static!important;
    }
}
@media(max-width:680px){
    body.sefc-checkout-native-template .sefc-native-checkout-page{padding:18px 10px 42px!important}
    body.sefc-checkout-native-template .sefc-native-checkout-progress strong{display:none!important}
    body.sefc-checkout-native-template .sefc-native-checkout-progress{max-width:260px!important}
    body.sefc-checkout-native-template #customer_details .woocommerce-billing-fields__field-wrapper{
        grid-template-columns:1fr!important;
    }
    body.sefc-checkout-native-template #customer_details .woocommerce-billing-fields__field-wrapper > .form-row{
        grid-column:1!important;
    }
    body.sefc-checkout-native-template #customer_details > .col-1,
    body.sefc-checkout-native-template #customer_details > .col-2,
    body.sefc-checkout-native-template form.checkout #order_review_heading,
    body.sefc-checkout-native-template form.checkout #order_review{
        padding-left:16px!important;
        padding-right:16px!important;
    }
}


/* ===== Commerce Flash v7.6.3: aislamiento del checkout y neutralización del login lateral de BeTheme ===== */
/*
 * BeTheme añade la clase `woocommerce` a su panel lateral de acceso de cabecera.
 * Las versiones anteriores podían confundir ese drawer con el checkout. En la
 * plantilla propia lo desactivamos por completo y hacemos que ningún estado
 * lateral pueda reducir el ancho de la página.
 */
body.sefc-checkout-native-template .mfn-header-login,
body.sefc-checkout-native-template .mfn-header-modal-login,
body.sefc-checkout-native-template .mfn-header-login.is-side,
body.sefc-checkout-native-template [class*="mfn-header-modal-login"],
body.sefc-checkout-native-template [class*="mfn-header-login"][role="navigation"]{
    display:none!important;
    visibility:hidden!important;
    opacity:0!important;
    pointer-events:none!important;
    width:0!important;
    min-width:0!important;
    max-width:0!important;
    height:0!important;
    min-height:0!important;
    overflow:hidden!important;
    position:absolute!important;
    left:auto!important;
    right:-99999px!important;
    top:-99999px!important;
    transform:none!important;
}

/* Oculta disparadores de ese drawer solo durante checkout. El acceso de cuenta
 * normal del sitio permanece intacto en el resto de páginas. */
body.sefc-checkout-native-template .mfn-header-login-trigger,
body.sefc-checkout-native-template [data-mfn-login],
body.sefc-checkout-native-template a[href="#mfn-header-login"]{
    display:none!important;
}

/* Si BeTheme dejó transformaciones/márgenes después de abrir el drawer, se
 * neutralizan únicamente en la pantalla de finalizar compra. */
html:has(body.sefc-checkout-native-template),
body.sefc-checkout-native-template{
    width:100%!important;
    max-width:none!important;
    margin-left:0!important;
    margin-right:0!important;
    padding-right:0!important;
    overflow-x:hidden!important;
}
body.sefc-checkout-native-template #Wrapper,
body.sefc-checkout-native-template #Content,
body.sefc-checkout-native-template #sefcNativeCheckout{
    width:100%!important;
    max-width:none!important;
    margin-left:0!important;
    margin-right:0!important;
    left:auto!important;
    right:auto!important;
    transform:none!important;
    translate:none!important;
    box-sizing:border-box!important;
}

/* Aislamiento explícito: cualquier regla visual sensible se aplica solo al
 * WooCommerce que vive dentro del checkout propio, nunca al WooCommerce del
 * header/modal de BeTheme. */
body.sefc-checkout-native-template #sefcNativeCheckout .woocommerce{
    display:block!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    margin:0!important;
    padding:0!important;
    float:none!important;
    position:relative!important;
    transform:none!important;
    contain:none!important;
    content-visibility:visible!important;
}
body.sefc-checkout-native-template #sefcNativeCheckout form.checkout.woocommerce-checkout{
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
}

/* El panel de cliente y el resumen deben ocupar exactamente sus columnas. */
body.sefc-checkout-native-template #sefcNativeCheckout #customer_details,
body.sefc-checkout-native-template #sefcNativeCheckout #order_review_heading,
body.sefc-checkout-native-template #sefcNativeCheckout #order_review{
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    box-sizing:border-box!important;
}

@media(max-width:1024px){
    body.sefc-checkout-native-template #sefcNativeCheckout form.checkout.woocommerce-checkout{
        grid-template-columns:1fr!important;
        grid-template-areas:"details" "review-heading" "review"!important;
    }
}


/* ===== Commerce Flash v7.6.4: facturación a nombre de otra persona ===== */
body.sefc-checkout-enabled #sefc_invoice_other_person_field{
    width:100%!important;
    float:none!important;
    clear:both!important;
    margin:18px 0 12px!important;
    padding:14px 16px!important;
    border:1px solid #dbe4f0!important;
    border-radius:12px!important;
    background:#f8fafc!important;
    box-sizing:border-box!important;
}
body.sefc-checkout-enabled #sefc_invoice_other_person_field label{
    display:flex!important;
    align-items:center!important;
    gap:10px!important;
    margin:0!important;
    cursor:pointer!important;
    color:#24406f!important;
    font-weight:800!important;
}
body.sefc-checkout-enabled #sefc_invoice_other_person_field input[type="checkbox"]{
    width:18px!important;
    height:18px!important;
    min-height:0!important;
    flex:0 0 18px!important;
    margin:0!important;
}
body.sefc-checkout-enabled #sefc_invoice_other_person_field.is-checked{
    border-color:#9db7e3!important;
    background:#eef5ff!important;
}
body.sefc-checkout-enabled .sefc-invoice-recipient-panel{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:0 16px;
    width:100%;
    margin:0 0 16px;
    padding:16px;
    border:1px solid #cddcf0;
    border-radius:12px;
    background:#fbfdff;
    box-sizing:border-box;
}
body.sefc-checkout-enabled .sefc-invoice-recipient-panel::before{
    content:'Datos para la factura';
    grid-column:1/-1;
    display:block;
    margin:0 0 12px;
    color:#153578;
    font-size:15px;
    font-weight:800;
}
body.sefc-checkout-enabled .sefc-invoice-recipient-panel .form-row{
    width:100%!important;
    float:none!important;
    clear:none!important;
    margin:0 0 12px!important;
}
body.sefc-checkout-enabled .sefc-invoice-recipient-panel #sefc_invoice_name_field,
body.sefc-checkout-enabled .sefc-invoice-recipient-panel #sefc_invoice_identity_field,
body.sefc-checkout-enabled .sefc-invoice-recipient-panel #sefc_invoice_email_field,
body.sefc-checkout-enabled .sefc-invoice-recipient-panel #sefc_invoice_address_field{
    width:100%!important;
}
body.sefc-checkout-enabled .sefc-invoice-recipient-panel #sefc_invoice_address_field{
    grid-column:1/-1;
}
@media(max-width:700px){
    body.sefc-checkout-enabled .sefc-invoice-recipient-panel{grid-template-columns:1fr;}
    body.sefc-checkout-enabled .sefc-invoice-recipient-panel #sefc_invoice_address_field{grid-column:auto;}
}
