
/* ============================================================
   PONTRAGA - CHECKOUT
   Distribución en dos columnas y elementos específicos
   ============================================================ */


/* ============================================================
   PASO 1: FACTURACIÓN Y ENVÍO
   ============================================================ */

@media screen and (min-width: 768px) {

    .wpmc-step-item.wpmc-step-billing.wpmc-step-shipping.current {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
        column-gap: 40px !important;
        align-items: start !important;
    }

    /* Facturación: columna izquierda */

    .wpmc-step-item.wpmc-step-billing.wpmc-step-shipping.current
    .woocommerce-billing-fields {
        grid-column: 1 !important;
        grid-row: 1 !important;
        min-width: 0 !important;
    }

    .wpmc-step-item.wpmc-step-billing.wpmc-step-shipping.current
    .woocommerce-billing-fields__field-wrapper {
        width: 100% !important;
    }

    /* Envío: columna derecha */

    .wpmc-step-item.wpmc-step-billing.wpmc-step-shipping.current
    .woocommerce-shipping-fields {
        grid-column: 2 !important;
        grid-row: 1 !important;
        min-width: 0 !important;
    }

    .wpmc-step-item.wpmc-step-billing.wpmc-step-shipping.current
    .shipping_address {
        width: 100% !important;
    }

    /* Campos adicionales debajo de las dos columnas */

    .wpmc-step-item.wpmc-step-billing.wpmc-step-shipping.current
    .woocommerce-additional-fields {
        grid-column: 1 / -1 !important;
        grid-row: 2 !important;
        margin-top: 30px !important;
    }

}

/* Ocultar el paso de facturación cuando no está activo */

.wpmc-step-item.wpmc-step-billing.wpmc-step-shipping:not(.current) {
    display: none !important;
}


/* ============================================================
   PASO 2: TU PEDIDO Y PAGO
   ============================================================ */

@media screen and (min-width: 768px) {

    .wpmc-step-item.wpmc-step-review.wpmc-step-payment.current {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
        column-gap: 40px !important;
        align-items: start !important;
        position: relative !important;
    }

    /* Reset de encabezados */

    .wpmc-step-item.wpmc-step-review.wpmc-step-payment.current
    #order_review_heading,
    .wpmc-step-item.wpmc-step-review.wpmc-step-payment.current
    #payment_heading {
        margin: 14px 0 20px !important;
        padding: 0 !important;
        float: none !important;
        clear: none !important;
        align-self: start !important;
        font-family: "Inter", "Roboto", "Open Sans", "Helvetica Neue", Arial, sans-serif !important;
        font-size: 17px !important;
        font-weight: 500 !important;
        color: #333 !important;
        letter-spacing: 0.2px !important;
        line-height: 1.4 !important;
    }

    /* Tu pedido: columna izquierda */

    .wpmc-step-item.wpmc-step-review.wpmc-step-payment.current
    #order_review_heading {
        grid-column: 1 !important;
        grid-row: 1 !important;
    }

    .wpmc-step-item.wpmc-step-review.wpmc-step-payment.current
    #order_review {
        grid-column: 1 !important;
        grid-row: 2 !important;
        align-self: start !important;
        width: 100% !important;
        max-width: none !important;
        float: none !important;
        clear: none !important;
    }

    /* Pago: columna derecha */

    .wpmc-step-item.wpmc-step-review.wpmc-step-payment.current
    #payment_heading {
        grid-column: 2 !important;
        grid-row: 1 !important;
    }

    .wpmc-step-item.wpmc-step-review.wpmc-step-payment.current
    #payment {
        grid-column: 2 !important;
        grid-row: 2 !important;
        align-self: start !important;
        width: 100% !important;
        max-width: none !important;
        float: none !important;
        clear: none !important;
        margin: 0 !important;
        padding: 20px !important;
        border: 1px solid #e5e5e5 !important;
        background: #fafafa !important;
        box-sizing: border-box !important;
    }

    /* Eliminar márgenes internos superiores */

    .wpmc-step-item.wpmc-step-review.wpmc-step-payment.current
    #order_review > *:first-child,
    .wpmc-step-item.wpmc-step-review.wpmc-step-payment.current
    #payment > *:first-child {
        margin-top: 0 !important;
    }


}

/* Ocultar encabezados de la tabla del pedido en el checkout */
    body.woocommerce-checkout
    table.woocommerce-checkout-review-order-table thead {
        display: none !important;
    }



/* ============================================================
   TÍTULO DE LA PÁGINA
   ============================================================ */

body.woocommerce-checkout .entry-title {
    display: none !important;
}


/* ============================================================
   AVISO Y FORMULARIO DE CUPÓN
   ============================================================ */

.woocommerce-form-coupon-toggle .woocommerce-info {
    border-top: none !important;
    font-family: "Inter", "Roboto", "Open Sans", "Helvetica Neue", Arial, sans-serif !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    letter-spacing: 0.3px !important;
    color: #333 !important;
    font-style: normal !important;
    text-decoration: none !important;
}

.woocommerce-form-coupon-toggle .woocommerce-info a {
    font-family: "Inter", "Roboto", "Open Sans", "Helvetica Neue", Arial, sans-serif !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    color: #333 !important;
    text-decoration: none !important;
    border-bottom: 1px solid #ccc !important;
    padding-bottom: 2px !important;
    transition: all 0.2s ease !important;
}

/* Icono de cupón */

.woocommerce-form-coupon-toggle .woocommerce-info::before {
    content: "" !important;
    display: inline-block !important;
    position: static !important;
    float: none !important;
    width: 19px !important;
    height: 13px !important;
    min-width: 19px !important;
    margin: 0 9px 0 0 !important;
    padding: 0 !important;
    border: 1.5px solid #555 !important;
    border-radius: 2px !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
    background: repeating-linear-gradient(
        to bottom,
        #555 0,
        #555 2px,
        transparent 2px,
        transparent 4px
    ) center / 1px 8px no-repeat !important;
}

@media screen and (min-width: 768px) {

    .woocommerce-form-coupon-toggle,
    form.checkout_coupon.woocommerce-form-coupon {
        width: calc(50% - 20px) !important;
        max-width: calc(50% - 20px) !important;
        margin-left: 0 !important;
        margin-right: auto !important;
        box-sizing: border-box !important;
    }

}


/* ============================================================
   TÍTULOS DE FACTURACIÓN Y ENVÍO
   ============================================================ */

.wpmc-step-item.wpmc-step-billing.wpmc-step-shipping.current
.woocommerce-billing-fields h3,
.wpmc-step-item.wpmc-step-billing.wpmc-step-shipping.current
.woocommerce-shipping-fields h3 {
    font-family: "Inter", "Roboto", "Open Sans", "Helvetica Neue", Arial, sans-serif !important;
    font-size: 17px !important;
    font-weight: 500 !important;
    color: #333 !important;
    letter-spacing: 0.2px !important;
    line-height: 1.4 !important;
    margin-top: 10px !important;
    margin-bottom: 18px !important;
    padding: 0 !important;
}

/* Checkbox de dirección de envío diferente */

.wpmc-step-item.wpmc-step-billing.wpmc-step-shipping.current
#ship-to-different-address {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}


/* ============================================================
   DISEÑO RESPONSIVE
   ============================================================ */

@media screen and (max-width: 767px) {

    .wpmc-step-item.wpmc-step-billing.wpmc-step-shipping.current,
    .wpmc-step-item.wpmc-step-review.wpmc-step-payment.current {
        display: block !important;
    }

    .wpmc-step-item.wpmc-step-review.wpmc-step-payment.current
    #payment {
        margin-top: 25px !important;
    }

    .woocommerce-form-coupon-toggle,
    form.checkout_coupon.woocommerce-form-coupon {
        width: 100% !important;
        max-width: 100% !important;
    }

}


/* ============================================================
   PONTRAGA - CHECKOUT
   Estilos específicos de la página de finalizar pedido
   ============================================================ */

/* Variaciones de producto - checkout */
.woocommerce-checkout-review-order-table .product-name .variation {
    display: block !important;
    margin: 4px 0 0 !important;
    padding: 0 !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    font-weight: normal !important;
}

.woocommerce-checkout-review-order-table .product-name .variation dt,
.woocommerce-checkout-review-order-table .product-name .variation dd,
.woocommerce-checkout-review-order-table .product-name .variation dd p {
    font-size: 15px !important;
}

.woocommerce-checkout-review-order-table .product-name .variation dt,
.woocommerce-checkout-review-order-table .product-name .variation dd {
    display: inline !important;
    float: none !important;
    clear: none !important;
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    font-weight: normal !important;
}

.woocommerce-checkout-review-order-table .product-name .variation dd p {
    display: inline !important;
    margin: 0 !important;
    padding: 0 !important;
}

.woocommerce-checkout-review-order-table .product-name .variation dd:not(:last-of-type)::after {
    content: " · " !important;
}

.woocommerce-checkout-review-order-table .product-name .variation dt {
    color: #333 !important;
    font-weight: 500 !important;
}

.woocommerce-checkout-review-order-table .product-name .variation dt::after {
    content: " " !important;
}

/* Campos del checkout */
body.woocommerce-js form.woocommerce-checkout .input-text,
body.woocommerce-js form.woocommerce-checkout .select2-container .select2-selection--single {
    min-height: 47px;
    border-radius: 5px;
    border-color: #b5b2b2;
}

/* Checkout - tipografía general */
body.woocommerce-js form.woocommerce-checkout {
    font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 1rem;
    font-weight: 300 !important;
}

/* Select2 */
body.woocommerce-js form.woocommerce-checkout .select2-container .select2-selection--single: .option:focus {
    background-color: #ffe200;
}

/* Botones del checkout */
@media screen and (min-width: 768px) {
    body.woocommerce .wpmc-nav-wrapper button.button,
    body.woocommerce .woocommerce-checkout button.button {
        font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
        font-size: 1rem;
        background-color: #ffe200;
        color: #313130;
        border-radius: 5px;
    }
}


/* Métodos de pago */
.woocommerce-checkout #payment {
    background: #fff;
    border-width: 1px;
    border-style: solid;
    border-color: #ebe9eb;
    border-radius: 5px;
}

.woocommerce-checkout #payment ul.payment_methods {
    border-bottom: 0;
}

/* Botón final del checkout */
@media screen and (min-width: 768px) {
    .woocommerce-checkout #payment div.form-row button.button {
        background: #029ee0;
        color: #fff;
        border-radius: 5px;
        font-size: 1.1rem;
        min-height: 47px;
        font-weight: 400 !important;
    }
}

/* Términos y condiciones */
body .woocommerce-terms-and-conditions-checkbox-text {
    font-weight: 400;
}

body .woocommerce-terms-and-conditions-wrapper a {
    color: royalblue;
}

/* ============================================================
   RESUMEN DEL PEDIDO - PRODUCTOS EN CAJAS
   ============================================================ */
@media (min-width: 768px) {

    .woocommerce-checkout-review-order-table{
        display: block !important;
        width: 100% !important;
    }

    .woocommerce-checkout-review-order-table tbody{
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .woocommerce-checkout-review-order-table tbody tr.cart_item{
        display: grid !important;
        grid-template-columns: 1fr auto;
        align-items: center;

        border: 1px solid #d9d9d9 !important;
        border-radius: 4px;
        background: #fff !important;

        padding: 14px 12px;
        box-sizing: border-box;
    }

    .woocommerce-checkout-review-order-table tbody tr.cart_item td{
        border: 0 !important;
        padding: 0 !important;
    }

}

/* Eliminar borde exterior del resumen */
.woocommerce-checkout-review-order-table{
    border: 0 !important;
    box-shadow: none !important;
}


/* ============================================================
   TOTALES DEL CHECKOUT EN CAJA INDEPENDIENTE
   ============================================================ */
@media (min-width: 768px) {

    .woocommerce-checkout-review-order-table tfoot{
        display: block;
        width: 100%;
        margin-top: 16px;
    }

    .woocommerce-checkout-review-order-table tfoot tr{
        display: grid !important;
        grid-template-columns: 1fr auto;
        width: 100%;
        box-sizing: border-box;
        background: #fff;
    }

    .woocommerce-checkout-review-order-table tfoot tr td,
    .woocommerce-checkout-review-order-table tfoot tr th{
        border: 0 !important;
        padding: 14px 16px;
    }

    .woocommerce-checkout-review-order-table tfoot{
        border: 1px solid #d9d9d9;
        border-radius: 4px;
        overflow: hidden;
        background: #fff;
    }

}

/* ============================================================
   VISTA GENERAL DEL PEDIDO
   ============================================================ */
@media (min-width: 768px) {

    .woocommerce-checkout-review-order-table tfoot{
        display:block !important;
        width:100% !important;
        margin-top:16px !important;

        border:1px solid #d9d9d9 !important;
        border-radius:4px;
        overflow:hidden;

        background:#fff;
        box-sizing:border-box;
    }

    .woocommerce-checkout-review-order-table tfoot::before{
        content:"Vista general del pedido";
        display:block;

        padding:24px 24px 20px;

        font-size:24px;
        font-weight:700;
        line-height:1.2;
        color:#000;
    }

    .woocommerce-checkout-review-order-table tfoot tr{
        display:grid !important;
        grid-template-columns:1fr auto;

        width:100%;
        padding:0 24px;

        background:#fff;
    }

    .woocommerce-checkout-review-order-table tfoot th,
    .woocommerce-checkout-review-order-table tfoot td{
        padding:10px 0 !important;

        font-size:16px !important;
        font-weight:400 !important;

        color:#222 !important;

        border:0 !important;
    }

/* Separador encima del Total */
.woocommerce-checkout-review-order-table tfoot tr.order-total{
    position: relative;
    border-top: 0 !important;
}

.woocommerce-checkout-review-order-table tfoot tr.order-total::before{
    content: "";
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    border-top: 1px solid #d9d9d9;
}


    .woocommerce-checkout-review-order-table tfoot tr.order-total th{
        font-weight:700 !important;
        color:#000 !important;
    }

    .woocommerce-checkout-review-order-table
    tfoot tr.order-total
    .woocommerce-Price-amount{
        color:#000 !important;
        font-size:22px !important;
        font-weight:700 !important;
    }

.pontraga-help-row{
    position: relative;
    border-top: 0 !important;
}

.pontraga-help-row::before{
    content: "";
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    border-top: 1px solid #d9d9d9;
}
    .pontraga-help-row td{
        padding:24px 0 !important;
    }

    .pontraga-help-title{
        font-size:18px;
        font-weight:700;
        color:#000;

        margin-bottom:12px;
    }

    .pontraga-help-phone{
        font-size:28px;
        font-weight:700;
        line-height:1.2;

        color:#000;

        margin-bottom:12px;
    }

    .pontraga-help-hours{
        font-size:15px;
        line-height:1.5;
        color:#222;
    }

}