/* ========================================================= */
/* 1. CORRECCIÓN: Botón Proceder al Pago Seguro (.btn-success) */
/* ========================================================= */

/* Sobrescribe el color del texto de Bootstrap en hover para mantenerlo blanco */
.btn-success:hover,
a.btn-success:hover {
    color: #FFFFFF !important;
}


/* ========================================================= */
/* 2. ESTILO PERSONALIZADO: Botón Aceptar/Cierre */
/* ========================================================= */

.btn-personalizado-aceptar {
    /* Estilos base: Transparente con borde y texto gris */
    background-color: transparent;
    border: 2px solid #555555;
    color: #555555;
    padding: 8px 20px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    /* Transición suave para el hover */
    text-align: center;
    display: inline-block;
    text-decoration: none;
}

.btn-personalizado-aceptar:hover {
    /* Estilos hover: Invertir a fondo gris y texto blanco */
    background-color: #555555;
    color: #FFFFFF;
    border-color: #555555;
}




















/* ==========================================================================
   AJUSTE PARA TABLET (Aprox 800px) - TÍTULO Y CHECKBOXES
   ========================================================================== */
@media screen and (min-width: 768px) and (max-width: 1024px) {

    /* 1. TÍTULO: Centrado y en una sola línea */
    #modalCarritocompras .modal-header {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        height: 45px !important;
    }

    #modalCarritocompras .modal-title {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
    }

    #modalCarritocompras .modal-title span {
        font-size: 15px !important;
        white-space: nowrap !important;
        color: white !important;
        margin-left: 10px !important;
        text-transform: uppercase;
    }

    /* 2. CHECKBOXES: Subirlos y ajustar el texto rojo */
    #modalCarritocompras .px-4.py-2.border-top {
        padding-top: 5px !important;
        /* Reduce el espacio arriba del total */
        padding-bottom: 5px !important;
        /* Reduce el espacio abajo de los checks */
        margin-top: -10px !important;
        /* Empuja toda la sección hacia arriba */
    }

    /* Ajuste específico para las etiquetas de los checks */
    #modalCarritocompras .form-check-label {
        font-size: 13px !important;
        /* Tamaño legible para tablet */
        line-height: 1.2 !important;
    }

    /* El texto rojo de cotización extra */
    #modalCarritocompras label[for="requiereCotizacionExtra"] {
        margin-top: 2px !important;
        display: inline-block;
    }

    /* 3. TABLA: Le damos un poco más de espacio si es necesario */
    #contenedorTablaScroll {
        height: 350px !important;
        margin-bottom: 5px !important;
    }
}







/* ==========================================================================
   2. AJUSTE CRÍTICO PARA CELULAR (Modal Carrito) - VERSIÓN FINAL COMPACTA
   ========================================================================== */
@media screen and (max-width: 767px) {

    #modalCarritocompras .modal-dialog {
        max-width: 98% !important;
        margin: 5px auto !important;
    }

    /* HEADER: Altura mínima y centrado total */
    #modalCarritocompras .modal-header {
        height: 35px !important;
        /* Más delgado aún */
        min-height: 35px !important;
        padding: 0 10px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        /* Centra el contenido horizontalmente */
    }

    /* TÍTULO: Forzado a una sola línea y centrado */
    #modalCarritocompras .modal-title {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        margin: 0 !important;
    }

    #modalCarritocompras .modal-title span {
        font-size: 10.5px !important;
        /* Tamaño justo para una línea */
        white-space: nowrap !important;
        /* Prohíbe el salto de línea */
        letter-spacing: -0.2px !important;
        /* Junta un poco las letras si es necesario */
        text-align: center !important;
        margin-left: 5px !important;
    }

    #modalCarritocompras .modal-title i {
        font-size: 1rem !important;
    }

    /* TABLA Y CONTENIDO: Recuperamos espacio */
    #contenedorTablaScroll {
        height: 300px !important;
        overflow-y: auto !important;
    }

    /* FOOTER: Reducción drástica de altura (Solución a image_2b3478.png) */
    #modalCarritocompras .modal-footer {
        height: 45px !important;
        /* Altura mínima funcional */
        min-height: 45px !important;
        padding: 0 10px !important;
        /* Eliminamos padding vertical */
        background: #f8f9fa;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    /* BOTONES: Más compactos para el nuevo footer */
    .btn-finalizar-compra-personalizado,
    .btn-cerrar-personalizado {
        width: 48% !important;
        height: 32px !important;
        /* Altura reducida */
        font-size: 11px !important;
        margin: 0 !important;
        padding: 0 !important;
        line-height: 32px !important;
    }

    /* ÁREA DE TOTAL Y CHECKBOXES */
    #modalCarritocompras .px-4.py-2.border-top {
        padding: 4px 10px !important;
        /* Reducimos el colchón de aire */
    }
}