.cta-desktop {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-left: 3px solid #16a34a;
    border-radius: 12px;
    padding: 16px 20px;
}

.cta-desktop-text strong {
    display: block;
    font-size: .88rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 3px;
}

.cta-desktop-text span {
    font-size: .78rem;
    color: #6b7280;
    line-height: 1.4;
}

.cta-desktop .btn-cta {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #16a34a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 600;
    padding: 9px 18px;
    white-space: nowrap;
    transition: background .15s, transform .15s;
    box-shadow: 0 1px 4px rgba(22, 163, 74, .2);
}

.cta-desktop .btn-cta:hover {
    background: #15803d;
    transform: translateY(-1px);
}

.cta-mobile {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 14px 16px;
}

.cta-mobile-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    background: #dcfce7;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #16a34a;
    font-size: 1.1rem;
}

.cta-mobile-body {
    flex: 1;
    min-width: 0;
}

.cta-mobile-body strong {
    display: block;
    font-size: .84rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 2px;
}

.cta-mobile-body span {
    display: block;
    font-size: .76rem;
    color: #6b7280;
}

.cta-mobile .btn-cta-ghost {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: transparent;
    color: #16a34a;
    border: 1px solid #16a34a;
    border-radius: 8px;
    font-size: .78rem;
    font-weight: 600;
    padding: 7px 13px;
    white-space: nowrap;
    transition: background .15s, color .15s;
}

.cta-mobile .btn-cta-ghost:hover {
    background: #f0fdf4;
}

/* =============================================
MODAL PEDIDO – estilos nuevos
============================================= */

/* Fondo con blur suave */
#modalPedido .modal-dialog {
    max-width: 480px;
}

#modalPedido .modal-content {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .18);
}

/* Header con gradiente de marca */
#modalPedido .modal-header-custom {
    background: linear-gradient(135deg, #14532d 0%, #166534 60%, #15803d 100%);
    padding: 28px 28px 24px;
    position: relative;
}

#modalPedido .modal-header-custom::after {
    content: '';
    position: absolute;
    bottom: -40px;
    right: -40px;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(255, 255, 255, .06) 0%, transparent 65%);
    pointer-events: none;
}

#modalPedido .modal-header-custom .modal-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, .12);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    flex-shrink: 0;
    backdrop-filter: blur(4px);
}

#modalPedido .modal-header-custom .modal-title-main {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
    margin: 0;
}

#modalPedido .modal-header-custom .modal-subtitle {
    font-size: .8rem;
    color: rgba(255, 255, 255, .72);
    margin: 4px 0 0;
    line-height: 1.4;
}

#modalPedido .btn-close-modal {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, .15) url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/10px no-repeat;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background .15s;
    opacity: 1;
}

#modalPedido .btn-close-modal:hover {
    background-color: rgba(255, 255, 255, .25);
}

/* Cuerpo del modal */
#modalPedido .modal-body-custom {
    padding: 28px;
    background: #fff;
}

/* Trust badge */
#modalPedido .trust-badge {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
}

#modalPedido .trust-badge i {
    color: #16a34a;
    font-size: 1.1rem;
    flex-shrink: 0;
}

#modalPedido .trust-badge p {
    font-size: .8rem;
    color: #166534;
    margin: 0;
    line-height: 1.4;
}

/* Campos del formulario */
#modalPedido .form-label-modal {
    font-size: .78rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
    display: block;
}

#modalPedido .form-control-modal,
#modalPedido .form-select-modal {
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: .88rem;
    color: #111827;
    background: #fafafa;
    transition: border-color .18s, box-shadow .18s, background .18s;
    width: 100%;
}

#modalPedido .form-control-modal:focus,
#modalPedido .form-select-modal:focus {
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, .12);
    background: #fff;
    outline: none;
}

#modalPedido textarea.form-control-modal {
    resize: none;
    min-height: 76px;
}

/* Botón submit del modal */
#modalPedido .btn-submit-modal {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-weight: 700;
    font-size: .92rem;
    padding: 13px;
    width: 100%;
    letter-spacing: .01em;
    transition: opacity .18s, transform .15s, box-shadow .18s;
    box-shadow: 0 4px 14px rgba(22, 163, 74, .3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}

#modalPedido .btn-submit-modal:hover {
    opacity: .92;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(22, 163, 74, .38);
}

#modalPedido .btn-submit-modal:active {
    transform: translateY(0);
}

#modalPedido .btn-submit-modal:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
}

/* Footer disclaimer */
#modalPedido .modal-disclaimer {
    text-align: center;
    font-size: .72rem;
    color: #9ca3af;
    margin-top: 12px;
    line-height: 1.5;
}

/* Animación de entrada del modal */
#modalPedido.fade .modal-dialog {
    transform: scale(.95) translateY(10px);
    transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), opacity .2s ease;
}

#modalPedido.show .modal-dialog {
    transform: scale(1) translateY(0);
}

/* Select2 dentro del modal – compatibilidad */
#modalPedido .select2-container .select2-selection--single {
    height: 42px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    background: #fafafa;
    transition: border-color .18s, box-shadow .18s;
}

#modalPedido .select2-container--default.select2-container--focus .select2-selection--single,
#modalPedido .select2-container--default.select2-container--open .select2-selection--single {
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, .12);
}

#modalPedido .select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 40px;
    padding-left: 14px;
    font-size: .88rem;
    color: #111827;
}

#modalPedido .select2-container .select2-selection--single .select2-selection__arrow {
    height: 40px;
}

/* Mobile: modal ocupa más pantalla */
@media (max-width: 575.98px) {
    #modalPedido .modal-dialog {
        margin: 0;
        max-width: 100%;
        height: 100%;
        display: flex;
        align-items: flex-end;
    }

    #modalPedido .modal-content {
        border-radius: 20px 20px 0 0;
        max-height: 95dvh;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    #modalPedido .modal-header-custom {
        position: sticky;
        top: 0;
        z-index: 10;
    }
}

/* =============================================
   FAB – BOTÓN FLOTANTE CONSULTAR REPUESTO
   Agregar al final de filtro.css
   ============================================= */

/* --- Contenedor raíz --- */
#fabRepuesto {
    position: fixed;
    right: 24px;
    bottom: 28px;
    z-index: 1040;
    /* Bajo los modales Bootstrap (1050) pero sobre todo lo demás */
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    /* Safe-area iPhone (home indicator) */
    bottom: max(28px, calc(env(safe-area-inset-bottom) + 16px));
}

/* --- Burbuja de mensaje --- */
.fab-bubble {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 9px 12px 9px 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .10);
    white-space: nowrap;
    font-size: .8rem;
    font-weight: 600;
    color: #111827;

    /* Animación de entrada */
    animation: fabBubbleIn .35s cubic-bezier(.34, 1.56, .64, 1) both;
    transform-origin: bottom right;
}

.fab-bubble.fab-bubble--hidden {
    animation: fabBubbleOut .22s ease forwards;
    pointer-events: none;
}

/* Triángulo inferior apuntando al botón */
.fab-bubble::after {
    content: '';
    position: absolute;
    right: 18px;
    bottom: -7px;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 7px solid #fff;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .08));
    pointer-events: none;
}

/* Necesitamos position:relative en la burbuja para el pseudo */
.fab-bubble {
    position: relative;
}

.fab-bubble-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    color: #6b7280;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .15s, color .15s;
    line-height: 1;
}

.fab-bubble-close:hover {
    background: #e5e7eb;
    color: #374151;
}

/* --- Botón principal --- */
.fab-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(22, 163, 74, .40);
    transition: transform .2s cubic-bezier(.34, 1.56, .64, 1),
        box-shadow .2s ease,
        background .15s ease;
    animation: fabBtnIn .4s cubic-bezier(.34, 1.56, .64, 1) .1s both;
    -webkit-tap-highlight-color: transparent;
    outline-offset: 3px;
}

/* Fondo blanco circular detrás del logo */
.fab-btn::before {
    content: '';
    position: absolute;
    width: 54px;
    height: 54px;
    background: #fff;
    border: 2px solid #16a34a;
    border-radius: 50%;
    z-index: 0;
}

/* Logo por encima del círculo */
.fab-img-icon {
    position: relative;
    z-index: 1;
    height: 16px;
    width: auto;
    object-fit: contain;
}

.fab-btn:hover {
    transform: translateY(-3px) scale(1.06);
    box-shadow: 0 8px 28px rgba(22, 163, 74, .50);
    background: linear-gradient(135deg, #15803d 0%, #166534 100%);
}

.fab-btn:active {
    transform: scale(.94);
    box-shadow: 0 2px 10px rgba(22, 163, 74, .35);
}

/* Ocultar SVGs redundantes, usar Bootstrap Icons (bi bi-tools) */
.fab-icon {
    display: none;
}

.fab-bi-icon {
    font-size: 1.35rem;
    line-height: 1;
    pointer-events: none;
}

/* --- Punto de pulso (notificación) --- */
.fab-pulse {
    position: absolute;
    top: 1px;
    right: 1px;
    width: 13px;
    height: 13px;
    background: #fbbf24;
    border: 2px solid #fff;
    border-radius: 50%;
    animation: fabPulse 2.4s ease-in-out 1.2s infinite;
}

.fab-pulse--hidden {
    display: none;
}

/* --- Estado: modal abierto → FAB se opaca levemente --- */
.modal-open #fabRepuesto {
    /* El z-index sigue bajo el modal (1050), ya cubre Bootstrap.
       Sólo bajamos opacidad para dar foco al modal. */
    opacity: .45;
    pointer-events: none;
    transition: opacity .2s ease;
}

/* --- Animaciones --- */
@keyframes fabBtnIn {
    from {
        opacity: 0;
        transform: scale(.5) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes fabBubbleIn {
    from {
        opacity: 0;
        transform: scale(.85) translateY(6px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes fabBubbleOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }

    to {
        opacity: 0;
        transform: scale(.88) translateY(4px);
    }
}

@keyframes fabPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: .5;
    }
}

/* --- Responsive --- */

/* Mobile: botón y burbuja más compactos */
@media (max-width: 575.98px) {
    #fabRepuesto {
        right: 16px;
        bottom: max(20px, calc(env(safe-area-inset-bottom) + 12px));
    }

    .fab-btn {
        width: 52px;
        height: 52px;
    }

    .fab-bi-icon {
        font-size: 1.25rem;
    }

    .fab-bubble {
        font-size: .76rem;
        padding: 8px 10px 8px 12px;
    }

    #modalPedido .form-control-modal,
    #modalPedido .form-select-modal,
    #modalPedido textarea.form-control-modal,
    #modalPedido .select2-container .select2-selection--single .select2-selection__rendered {
        font-size: 16px !important;
    }
}

/* Desktop: margen derecho un poco mayor cuando hay scrollbar */
@media (min-width: 992px) {
    #fabRepuesto {
        right: 32px;
    }
}

/* Reducir movimiento (accesibilidad) */
@media (prefers-reduced-motion: reduce) {

    .fab-btn,
    .fab-bubble,
    .fab-pulse {
        animation: none !important;
        transition: none !important;
    }
}