/* Carrito */
.woocommerce-checkout #payment .payment_method_payway_gateway .form-row select {
    padding-top: 0.2em;
    padding-bottom: 0.2em;
    width: 100%;
    height: auto;
}

.woocommerce-checkout #payment .payment_method_payway_gateway .form-row label {
    display: block !important;
    visibility: visible !important;
    position: static !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    height: auto !important;
    width: auto !important;
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    margin-bottom: 4px;
    padding: 0;
}

.woocommerce-checkout #payment .payment_method_payway_gateway .form-row label + br {
    display: none;
}

#payment div.form-row {
    padding: 0 0 0.2em !important;
}

/* detalles de compra */
.woocommerce-checkout p#kl_newsletter_checkbox_field {
    display: none !important;
}

#billing_dni_field {
    clear: both;
}

.payment_method_payway_gateway input {
  width: 100%;
  max-width: 900px !important;
}

.woocommerce-billing-fields .form-row label,
.woocommerce-shipping-fields .form-row label,
.woocommerce-additional-fields .form-row label,
.woocommerce-checkout-payment .form-row label {
    display: block !important;
    position: static !important;
    transform: none !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    width: auto !important;
    background: none !important;
    padding: 0 !important;
    margin: 0 0 8px 0 !important;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    pointer-events: auto;
}

.woocommerce-checkout .form-row .input-text,
.woocommerce-checkout .form-row select,
.woocommerce-checkout .form-row .select2-selection {
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    padding: 12px !important;
    height: 48px !important;
    width: 100% !important;
    background-color: #ffffff !important;
    transition: all 0.2s ease;
    font-size: 16px;
    color: #333;
}

.woocommerce-checkout .woocommerce-additional-fields textarea.input-text {
    height: 100px !important;
}

.woocommerce-checkout .form-row .input-text:focus,
.woocommerce-checkout .form-row textarea:focus,
.woocommerce-checkout .select2-container--focus .select2-selection--single {
    border-color: #046bd2 !important;
    box-shadow: 0 0 0 3px rgba(4, 107, 210, 0.15) !important;
    outline: none !important;
}

.woocommerce-checkout .form-row input[type="text"]::placeholder,
.woocommerce-checkout .form-row input[type="email"]::placeholder,
.woocommerce-checkout .form-row input[type="tel"]::placeholder,
.woocommerce-checkout .form-row textarea::placeholder {
   font-size: 16px !important;
   color: #adb5bd;
   opacity: 1;
}

.woocommerce-checkout .select2-selection__rendered {
    line-height: 24px !important;
    padding: 0 !important;
}
.woocommerce-checkout .select2-selection__arrow {
    top: 12px !important;
}

#billing_country_field strong,
#shipping_country_field strong {
    display: block;
    padding: 13px 12px;
    background-color: #f3f4f6;
    border-radius: 6px;
    color: #4b5563;
    border: 1px solid #e5e7eb;
}

#gift_title_field {
    margin-bottom: 0.5em !important;
}

#gift_field,
h3#ship-to-different-address {
    border-radius: 8px;
    padding: 1.25em 1em !important;
    margin-bottom: 0;
}

#gift_field {
    background-color: #fffbeb;
    border: 1px solid #046bd2;
    padding: 1.8em 1.6em !important;
}

h3#ship-to-different-address {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    margin: 0 !important;
}

#gift_field br, 
h3#ship-to-different-address br {
    display: none;
}

#gift_field > span > label,
h3#ship-to-different-address > label {
    display: flex !important;
    align-items: center;
    margin: 0 !important; 
    line-height: 2;
    font-weight: 700;
    font-size: .9rem;
    color: #334155;
    
}

.woocommerce-checkout .input-checkbox {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 1.25em;
    height: 1.25em;
    border: 2px solid #adb5bd;
    border-radius: 4px;
    margin-right: 0.8em;
    cursor: pointer;
    flex-shrink: 0;
}

.woocommerce-checkout .input-checkbox:checked {
    background-color: #046bd2;
    border-color: #046bd2;
}

.woocommerce-checkout .input-checkbox:checked::before {
    content: '✔';
    display: block;
    color: white;
    font-size: 0.8em;
    text-align: center;
    line-height: 1.4em;
}

.wc_payment_method > label[for="payment_method_payway_gateway"] {
    position: relative;
    padding-right: 85px;
    min-height: 24px;
}

.wc_payment_method > label[for="payment_method_payway_gateway"] img {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 24px;
}

.payment_method_payway_gateway > .input-radio {
    margin-top: 8px !important;
}

fieldset#payway_gateway-cc-form {
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

.ast-back-to-cart {
  margin-bottom: 2rem;
}


@media (max-width: 921px) {
    .woocommerce-checkout .col2-set {
        flex-direction: column;
    }
    .woocommerce-checkout .col-1,
    .woocommerce-checkout .col-2,
    #order_review_heading,
    #order_review {
        width: 100% !important;
        float: none !important;
        margin-right: 0 !important;
    }
    #order_review_heading, #order_review {
    margin-top: 2em;
    padding: 0px 10px !important;
    }
}

@media (max-width: 768px) {

    .woocommerce-page.woocommerce-checkout #payment div.payment_box, .woocommerce.woocommerce-checkout #payment div.payment_box {
      margin: 3em 0;
    }


    .woocommerce-checkout .form-row-first,
    .woocommerce-checkout .form-row-last {
        width: 100% !important;
        float: none !important;
    }
    .woocommerce-checkout #payment .payment_method_payway_gateway .fields-wrapper {
        flex-direction: column;
        gap: 0;
    }
    .woocommerce-checkout #payment .payment_method_payway_gateway .form-row {
        width: 100% !important;
        margin-bottom: 1em;
    }
    .entry-content .elementor-element-6c49c6c > .e-con-inner {
        padding: 15px !important;
    }
    .woocommerce-checkout h3 {
        font-size: 20px;
    }
    ul#shipping_method li label {
        font-size: 15px !important;
        line-height: 1.4 !important;
    }
    .wc_payment_method > label[for="payment_method_payway_gateway"] {
        padding-right: 0;
    }
    .wc_payment_method > label[for="payment_method_payway_gateway"] img {
        position: static;
        transform: none;
        margin-top: 8px;
    }
}

/* --- Cambiar texto de "Transferencia Bancaria" en el checkout --- */

.woocommerce-checkout #payment ul.payment_methods li.payment_method_bacs > label {
    font-size: 0; 
    color: transparent; 
    line-height: 1; 
}

.woocommerce-checkout #payment ul.payment_methods li.payment_method_bacs > label::after {
    content: "Pagando en transferencia (5% off de descuento)";
    font-size: 15px; 
    color: #111827; 
    font-weight: 500; 
    line-height: 1.5; 
}

.woocommerce-checkout form .wc-gateway-payway .form-row.woocommerce-validated.woocommerce-invalid input.input-text,
.woocommerce-checkout form .wc-gateway-payway .form-row.woocommerce-validated.woocommerce-invalid select {
  border: 2px solid red !important;
  background-color: #ffe6e6 !important;
}

.woocommerce-checkout form .wc-gateway-payway .form-row.woocommerce-validated:not(.woocommerce-invalid) input.input-text,
.woocommerce-checkout form .wc-gateway-payway .form-row.woocommerce-validated:not(.woocommerce-invalid) select {
  border: 2px solid green !important;
  background-color: #e6ffe6 !important;
}

.wc_payment_method.payment_method_payway_gateway img {
	width: auto !important; 
	height: auto !important;     
	max-height: inherit !important;
    max-width: inherit !important;
	float: none !important;
	transform: none !important;
}



