/**
Copyright © 2026 SIGESAD
Todos los derechos reservados.
Software protegido por derechos de autor.
Uso sujeto a licencia.
Prohibida la copia, distribución,
modificación o reutilización del código
sin autorización expresa de SIGESAD.
Estilo CSS 100% MCBO - Checkout
Creado: 22-07-2026
Ultima Modificación: 23-07-2026
Usuario: Frank Blanco
Email: soporte@sigesad.com
*/

/* =========================================
   1. RESET Y VARIABLES GLOBALES
   ========================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* =========================================
   2. UTILIDADES DE ESPACIADO (Bootstrap-like)
   ========================================= */

/* Margen bottom */
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }

/* Margin top */
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }

/* Margin end (right) */
.me-3 { margin-right: 1rem !important; }

/* Padding bottom */
.pb-3 { padding-bottom: 1rem !important; }

/* Padding top */
.pt-3 { padding-top: 1rem !important; }

/* My-5 */
.my-5 {
    margin-top: 3rem !important;
    margin-bottom: 3rem !important;
}

/* =========================================
   3. UTILIDADES DE FLEXBOX
   ========================================= */

.d-flex {
    display: flex !important;
}

.flex-grow-1 {
    flex-grow: 1 !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

.align-items-center {
    align-items: center !important;
}

.flex-wrap {
    flex-wrap: wrap !important;
}

/* =========================================
   4. UTILIDADES DE TEXTO
   ========================================= */

.text-muted {
    color: #6c757d !important;
}

.text-danger {
    color: var(--rojo, #CF142B) !important;
}

.text-primary {
    color: var(--azul, #0047AB) !important;
}

.text-white {
    color: #ffffff !important;
}

.small {
    font-size: 0.875rem !important;
}

/* =========================================
   5. UTILIDADES DE BORDES
   ========================================= */

.border-bottom {
    border-bottom: 1px solid #dee2e6 !important;
}

.border-top {
    border-top: 1px solid #dee2e6 !important;
}

/* =========================================
   6. UTILIDADES DE IMAGEN
   ========================================= */

.img-thumbnail {
    padding: 0.25rem;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    max-width: 100%;
    height: auto;
}

/* =========================================
   7. UTILIDADES DE POSICIONAMIENTO
   ========================================= */

.sticky-top {
    position: sticky;
    top: 0;
    z-index: 1020;
}

/* =========================================
   8. UTILIDADES DE ANCHO
   ========================================= */

.w-100 {
    width: 100% !important;
}

/* =========================================
   9. CONTENEDOR Y SISTEMA DE GRID
   ========================================= */

.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -15px;
    margin-right: -15px;
}

/* Columnas base */
.col-12 {
    flex: 0 0 100%;
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
}

/* Columnas desktop */
.col-lg-7 {
    flex: 0 0 65%;
    max-width: 65%;
    padding-left: 15px;
    padding-right: 15px;
}

.col-lg-5 {
    flex: 0 0 35%;
    max-width: 35%;
    padding-left: 15px;
    padding-right: 15px;
}

/* Columnas tablet */
.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding-left: 15px;
    padding-right: 15px;
}

/* =========================================
   10. TARJETAS (CARDS)
   ========================================= */

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: #fff;
    background-clip: border-box;
    border: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 0.375rem;
    margin-bottom: 1.5rem;
}

.card-header {
    padding: 1rem 1.5rem;
    margin-bottom: 0;
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

.card-body {
    flex: 1 1 auto;
    padding: 1.5rem;
}

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.bg-primary {
    background-color: #F3F1ED !important;
    border: 1px solid #E0DDD6;
}

.text-titulo-carrito {
    color: var(--amarillo, #242222) !important;
    font-weight: 700;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.text-titulo-carrito i {
    color: var(--amarillo, #FFC925);
    font-size: 1.3rem;
}

/* =========================================
   11. FORMULARIOS
   ========================================= */

.form-label {
    display: inline-block;
    font-weight: 600;
    color: var(--negro, #242222);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    color: #212529;
    background-color: #fff;
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* Form check (radio buttons y checkboxes) */
.form-check {
    display: block;
    min-height: 1.5rem;
    padding-left: 1.5em;
    margin-bottom: 0.125rem;
}

.form-check-input {
    float: left;
    margin-left: -1em;
    width: 1em;
    height: 1em;
    margin-top: 0.25em;
    vertical-align: top;
    background-color: #fff;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    border: 1px solid rgba(0, 0, 0, 0.25);
    appearance: none;
    cursor: pointer;
}

.form-check-input[type="radio"] {
    border-radius: 50%;
}

.form-check-input:checked {
    background-color: var(--azul, #0047AB);
    border-color: var(--azul, #0047AB);
}

.form-check-input[type="radio"]:checked {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e");
}

.form-check-label {
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--gris-oscuro, #666666);
}

.form-check-label strong {
    color: var(--negro, #242222);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check-label strong i {
    color: var(--azul, #0047AB);
    font-size: 1.2rem;
}

.form-text {
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #6c757d;
}

/* =========================================
   12. BOTONES
   ========================================= */

.btn {
    display: inline-block;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    background-color: transparent;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    border-radius: 0.375rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.btn-primary {
    color: #fff;
    background-color: var(--azul, #0047AB);
    border-color: var(--azul, #0047AB);
}

.btn-primary:hover {
    color: #fff;
    background-color: #003d91;
    border-color: #003d91;
}

.btn-link {
    font-weight: 400;
    color: var(--azul, #0047AB);
    text-decoration: none;
}

.btn-link:hover {
    color: #003d91;
}

.btn-lg {
    padding: 0.5rem 1rem;
    font-size: 1.25rem;
    border-radius: 0.5rem;
}

.btn-close {
    box-sizing: content-box;
    width: 1em;
    height: 1em;
    padding: 0.25em 0.25em;
    color: #000;
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
    border: 0;
    border-radius: 0.375rem;
    opacity: 0.5;
    cursor: pointer;
}

.btn-close:hover {
    opacity: 0.75;
}

/* Botón personalizado de confirmar */
.btn-confimar {
    background: var(--negro, #242222) !important;
    color: var(--blanco, #ffffff) !important;
    border: none !important;
    border-radius: 0px !important;
    padding: 16px !important;
    font-weight: 700 !important;
    font-size: 1.1rem !important;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 15px rgba(36, 34, 34, 0.3) !important;
}

.btn-confimar:hover {
    background: var(--rojo, #CF142B) !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(207, 20, 43, 0.4) !important;
}

.btn-confimar:disabled {
    background: #94a3b8 !important;
    transform: none !important;
    cursor: not-allowed;
}

/* =========================================
   13. ALERTAS
   ========================================= */

.alert {
    position: relative;
    padding: 1rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.375rem;
}

.alert-warning {
    color: #664d03;
    background-color: #fff3cd;
    border-color: #ffecb5;
}

.alert-info {
    color: #055160;
    background-color: #cff4fc;
    border-color: #b6effb;
}

.alert-dismissible {
    padding-right: 3rem;
}

.alert-dismissible .btn-close {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    padding: 1.25rem 1rem;
}

.fade {
    transition: opacity 0.15s linear;
}

.show {
    opacity: 1;
}

/* =========================================
   14. ESTILOS ESPECÍFICOS DEL CHECKOUT
   ========================================= */

/* Contenedor Principal */
.cart-checkout {
    padding-top: 110px;
    padding-bottom: 4rem;
}

.cart-checkout h2 {
    font-size: 2rem;
    color: var(--negro, #242222);
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.cart-checkout h2 i {
    color: var(--rojo, #CF142B);
}

/* Tarjetas Modernizadas */
.cart-checkout .card {
    border: none !important;
    border-radius: 3px !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06) !important;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cart-checkout .card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
}

/* Encabezados de las tarjetas */
.cart-checkout .card-header.bg-primary {
    background: var(--negro, #242222) !important;
    border-bottom: 3px solid var(--amarillo, #FFC925) !important;
    padding: 1.2rem 1.5rem !important;
}

/* Formularios y Campos de Entrada */
.cart-checkout .form-control {
    border-radius: 10px !important;
    border: 1.5px solid #e2e8f0 !important;
    padding: 12px 16px !important;
    font-size: 0.95rem !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    background-color: #fafafa !important;
}

.cart-checkout .form-control:focus {
    border-color: var(--azul, #0047AB) !important;
    background-color: var(--blanco, #ffffff) !important;
    box-shadow: 0 0 0 4px rgba(0, 71, 171, 0.1) !important;
    outline: none !important;
}

/* Opciones de Entrega y Pago */
.cart-checkout .form-check {
    background: #fafafa;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem 1.2rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.cart-checkout .form-check:hover {
    border-color: var(--azul, #0047AB);
    background: #f0f7ff;
}

/* Sección de Comprobante de Pago */
#comprobante-pago .alert-info {
    background-color: rgba(0, 71, 171, 0.08);
    border: 1px solid rgba(0, 71, 171, 0.2);
    color: var(--azul, #0047AB);
    border-radius: 10px;
    padding: 1rem;
}

#comprobante-pago .alert-info i {
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

#preview-comprobante img {
    border-radius: 12px;
    border: 2px dashed #cbd5e1;
    padding: 4px;
    background: var(--blanco, #ffffff);
}

/* Resumen del Pedido */
.cart-checkout .sticky-top {
    top: 0px !important;
    z-index: 100;
}

.cart-checkout .card-body {
    padding: 1rem;
}

/* Lista de productos en el resumen */
.cart-checkout .img-thumbnail {
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    object-fit: cover;
}

.cart-checkout .border-bottom {
    border-color: #f1f5f9 !important;
}

/* Totales */
.cart-checkout .pt-3 {
    background: #fafafa;
    border-radius: 0px;
    padding-top: 0.5rem !important;
    margin-top: 1rem;
}

#total-final {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--rojo, #CF142B) !important;
}

.text-total{
    font-size: 1.8rem;
    font-weight: 900;
}

/* =========================================
   15. RESUMEN DE PRODUCTOS
   ========================================= */

/* Contenedor de cada producto en el resumen */
.cart-checkout .d-flex.mb-3.pb-3.border-bottom {
    display: flex !important;
    align-items: flex-start !important;
    gap: 1rem;
    margin-bottom: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    border-bottom: 1px solid #e9ecef !important;
}

/* Imagen del producto */
.cart-checkout .img-thumbnail {
    width: 70px !important;
    height: 70px !important;
    object-fit: cover !important;
    border-radius: 10px !important;
    border: 1px solid #dee2e6 !important;
    flex-shrink: 0;
}

/* Contenedor de información */
.cart-checkout .flex-grow-1 {
    flex-grow: 1 !important;
    min-width: 0;
}

/* Nombre del producto */
.cart-checkout .flex-grow-1 h6 {
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: var(--negro, #242222) !important;
    margin-bottom: 0.1rem !important;
    line-height: 1.3;
}

/* Contenedor de cantidad y precio unitario */
.cart-checkout .flex-grow-1 .d-flex.justify-content-between {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100%;
}

/* Textos pequeños (cantidad y precio) */
.cart-checkout .flex-grow-1 small.text-muted {
    font-size: 0.85rem !important;
    color: var(--gris-oscuro, #666666) !important;
}

/* Total del producto */
.cart-checkout .flex-grow-1 .mt-1 {
    margin-top: 0rem !important;
}

.cart-checkout .flex-grow-1 strong.text-primary {
    font-size: 1.15rem !important;
    font-weight: 800 !important;
    color: var(--azul, #0047AB) !important;
}

/* =========================================
   16. RESPONSIVE
   ========================================= */

/* Tablet */
@media (max-width: 991px) {
    .cart-checkout .card {
        width: 98%;
        margin: 0 auto;
    }
    
    .cart-checkout {
        padding-top: 0px;
    }
    
    .cart-checkout .sticky-top {
        position: relative !important;
        top: 0 !important;
        margin-top: 2rem;
    }
    
    .cart-checkout h2 {
        font-size: 1.5rem;
    }
    
    .cart-checkout .form-check {
        padding: 0.8rem 1rem;
    }
    
    .col-lg-7,
    .col-lg-5 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Móvil */
@media (max-width: 576px) {
    .cart-checkout .card-header.bg-primary {
        padding: 1rem !important;
    }
    
    .text-titulo-carrito {
        font-size: 1rem;
    }
    
    #total-final {
        font-size: 1.5rem;
    }
    
    .cart-checkout .img-thumbnail {
        width: 60px !important;
        height: 60px !important;
    }
    
    .cart-checkout .flex-grow-1 h6 {
        font-size: 0.95rem !important;
    }
    
    .cart-checkout .flex-grow-1 small.text-muted {
        font-size: 0.8rem !important;
    }
    
    .cart-checkout .flex-grow-1 strong.text-primary {
        font-size: 1.05rem !important;
    }
    
    .cart-checkout .d-flex.mb-3.pb-3.border-bottom {
        gap: 0.8rem;
    }
}