/* ══ CARRITO FLOTANTE MÁS TRAVESÍA ══════════════════════════════════════════ */

/* Botón flotante */
#mt-carrito-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--mt-primary, #1A4E8A);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(26,78,138,0.4);
    z-index: 2147483647;
    transition: all 0.3s;
    font-size: 24px;
}
#mt-carrito-fab:hover,
#mt-carrito-fab.mt-carrito-fab-active {
    background: #1A6B1A;
    transform: scale(1.08);
}
#mt-carrito-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #E53935;
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

/* Panel lateral */
#mt-carrito-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 24px rgba(0,0,0,0.15);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
#mt-carrito-panel.mt-carrito-panel-open {
    transform: translateX(0);
}
#mt-carrito-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 9999;
}

/* Header del panel */
.mt-carrito-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 12px;
    border-bottom: 1px solid #E8EDF4;
    background: var(--mt-primary, #1A4E8A);
    color: white;
}
.mt-carrito-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: white;
}
#mt-carrito-cerrar {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}
#mt-carrito-cerrar:hover { background: rgba(255,255,255,0.35); }

.mt-carrito-subheader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background: #F4F7FB;
    border-bottom: 1px solid #E8EDF4;
}
#mt-carrito-count { font-size: 13px; color: #666; font-weight: 600; }
#mt-carrito-vaciar {
    background: none;
    border: none;
    color: #E53935;
    font-size: 12px;
    cursor: pointer;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
}
#mt-carrito-vaciar:hover { background: #FEE; }

/* Items */
#mt-carrito-items {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
}
.mt-carrito-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}
.mt-carrito-empty p { margin: 4px 0; font-size: 14px; }
.mt-carrito-empty p:first-child { font-size: 16px; font-weight: 600; color: #666; }

.mt-carrito-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #F0F4F8;
}
.mt-carrito-item:last-child { border-bottom: none; }
.mt-carrito-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}
.mt-carrito-item-tipo {
    font-size: 11px;
    font-weight: 700;
    color: var(--mt-primary, #1A4E8A);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.mt-carrito-item-titulo {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mt-carrito-item-detalle {
    font-size: 11px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mt-carrito-item-precio {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.mt-carrito-item-precio span {
    font-size: 14px;
    font-weight: 700;
    color: #1A6B1A;
    white-space: nowrap;
}
.mt-carrito-quitar {
    background: none;
    border: none;
    color: #CCC;
    cursor: pointer;
    font-size: 12px;
    padding: 2px 4px;
    border-radius: 4px;
    transition: all 0.2s;
}
.mt-carrito-quitar:hover { background: #FEE; color: #E53935; }

/* Footer */
.mt-carrito-footer {
    padding: 16px 20px;
    border-top: 2px solid #E8EDF4;
    background: white;
}
.mt-carrito-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 15px;
    font-weight: 600;
}
#mt-carrito-total { color: #1A6B1A; font-size: 18px; font-weight: 800; }
.mt-carrito-nota {
    font-size: 11px;
    color: #999;
    margin: 0 0 12px;
    line-height: 1.4;
}
#mt-carrito-btn-cotizar {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    font-weight: 700;
    border: none;
    cursor: pointer;
}
#mt-carrito-btn-cotizar:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Modal cotización */
#mt-carrito-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.mt-carrito-modal-box {
    background: white;
    border-radius: 12px;
    padding: 28px 32px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}
.mt-carrito-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #F4F7FB;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
}
.mt-carrito-modal-box h3 {
    color: var(--mt-primary, #1A4E8A);
    margin-bottom: 6px;
    font-size: 20px;
    padding-right: 40px;
}
.mt-carrito-modal-box > p {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

/* Resumen en modal */
.mt-carrito-resumen-lista {
    background: #F4F7FB;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
}
.mt-carrito-resumen-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
    color: #444;
    border-bottom: 1px solid #E8EDF4;
}
.mt-carrito-resumen-item:last-of-type { border-bottom: none; }
.mt-carrito-resumen-total {
    display: flex;
    justify-content: space-between;
    padding: 10px 0 0;
    font-size: 15px;
    margin-top: 6px;
    border-top: 2px solid var(--mt-primary, #1A4E8A);
    color: var(--mt-primary, #1A4E8A);
}

/* Notificación */
.mt-carrito-notif {
    position: fixed;
    bottom: 100px;
    right: 30px;
    background: #1A6B1A;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10002;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
    max-width: 300px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.mt-carrito-notif-show {
    opacity: 1;
    transform: translateY(0);
}

/* Botón agregar en cards de tours */
.mt-btn-agregar-carrito {
    background: #1A6B1A;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
}
.mt-btn-agregar-carrito:hover { background: #155215; transform: translateY(-1px); }

@media (max-width: 600px) {
    #mt-carrito-panel { width: 100%; right: -100%; }
    #mt-carrito-fab { bottom: 20px; right: 20px; width: 54px; height: 54px; font-size: 20px; }
}
