/* ============================================================
   Detalle de paquete combinado — Sistema de diseño Nautilus
   Marca: #3276d8 / #3e71b7 · acento #c0336d · éxito #28a745
   Base = mobile (360px+) · Desktop = @media (min-width: 992px)
   ============================================================ */

:root {
    --pkg-blue: #3276d8;
    --pkg-blue-dark: #3e71b7;
    --pkg-magenta: #c0336d;
    --pkg-success: #28a745;
    --pkg-warning: #f5a623;
    --pkg-ink: #1a1a2e;
    --pkg-text: #333;
    --pkg-muted: #666;
    --pkg-muted-2: #718096;
    --pkg-border: #eef0f4;
    --pkg-card-radius: 14px;
    --pkg-card-shadow: 0 2px 14px rgba(0, 0, 0, .06);
}

/* ============================================================
   SUMMARY (sidebar ~360px) — compacto y vertical
   ============================================================ */
.pkg-summary {
    color: var(--pkg-text);
    background: #fff;
}

.pkg-summary-header {
    background: linear-gradient(135deg, var(--pkg-blue) 0%, #16213e 100%);
    color: #fff;
    padding: 20px 18px 16px;
}

.pkg-summary-title {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.15;
    margin: 0;
    color: #fff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, .18);
}

.pkg-trip-stats {
    display: flex;
    justify-content: space-around;
    gap: 8px;
    margin-top: 14px;
    padding: 12px 8px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 12px;
    backdrop-filter: blur(8px);
}

.pkg-trip-stat {
    text-align: center;
    flex: 1;
    min-width: 0;
}

.pkg-trip-stat i {
    display: block;
    font-size: 1.25rem;
    margin-bottom: 4px;
    opacity: .9;
}

.pkg-trip-num {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.1;
}

.pkg-trip-num--date {
    font-size: .9rem;
    font-weight: 700;
}

.pkg-trip-stat small {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .4px;
    opacity: .85;
}

.pkg-summary-body {
    padding: 16px;
}

.pkg-summary-subtitle {
    font-size: 14px;
    font-weight: 700;
    color: var(--pkg-ink);
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pkg-summary-subtitle i {
    color: var(--pkg-blue);
}

/* Lista de productos */
.pkg-product-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pkg-product {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: #f7f9fc;
    border: 1px solid var(--pkg-border);
    border-left: 4px solid var(--pkg-blue);
    border-radius: 10px;
    transition: box-shadow .2s ease, transform .2s ease;
}

.pkg-product:hover {
    box-shadow: 0 4px 12px rgba(50, 118, 216, .12);
}

.pkg-product-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6e9ad7 0%, var(--pkg-blue) 100%);
    border-radius: 10px;
    color: #fff;
    font-size: 1.15rem;
}

.pkg-product-icon--img {
    background: #fff;
    border: 1px solid var(--pkg-border);
    padding: 5px;
}

.pkg-product-icon--img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pkg-product-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pkg-product-name {
    font-weight: 700;
    color: var(--pkg-ink);
    font-size: 14px;
    line-height: 1.25;
}

.pkg-product-detail {
    font-size: 12px;
    color: var(--pkg-muted-2);
    line-height: 1.35;
}

.pkg-product-detail i {
    color: var(--pkg-blue);
    width: 12px;
}

.pkg-product-stars {
    color: var(--pkg-warning);
}

/* Viajeros */
.pkg-travelers {
    margin-top: 16px;
    background: linear-gradient(135deg, #6e9ad7 0%, var(--pkg-blue) 100%);
    color: #fff;
    border-radius: 12px;
    padding: 14px 16px;
}

.pkg-travelers-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pkg-travelers-head i {
    font-size: 1.1rem;
    opacity: .9;
}

.pkg-travelers-label {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    font-size: 13px;
}

.pkg-travelers-count {
    margin-left: auto;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
}

.pkg-travelers-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: 8px;
    font-size: 13px;
    opacity: .95;
}

/* Badge de pago */
.pkg-payment-badge {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #edf2f7;
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    padding: 14px 16px;
}

.pkg-payment-badge > i {
    color: var(--pkg-blue);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.pkg-payment-badge p {
    color: var(--pkg-ink);
    margin: 0;
    font-weight: 700;
    font-size: 13px;
}

.pkg-payment-badge small {
    color: var(--pkg-muted-2);
    font-size: 12px;
}

/* Botones de acción */
.pkg-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 16px;
}

.pkg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 10px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .2s ease;
}

.pkg-btn:active {
    transform: scale(.98);
}

.pkg-btn--modify {
    background: linear-gradient(135deg, #6e9ad7 0%, var(--pkg-blue) 100%);
    color: #fff;
}

.pkg-btn--modify:hover {
    box-shadow: 0 6px 16px rgba(50, 118, 216, .3);
    color: #fff;
}

.pkg-btn--whatsapp {
    background: #25D366;
    color: #fff;
}

.pkg-btn--whatsapp:hover {
    box-shadow: 0 6px 16px rgba(37, 211, 102, .3);
    color: #fff;
}


/* ============================================================
   FORM "Modificar paquete" (modal)
   ============================================================ */
.currency-toggle {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    padding: 4px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    gap: 0;
}

.currency-toggle label {
    flex: 1;
    padding: 10px 18px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    border-radius: 50px;
    transition: all 0.3s ease;
    margin: 0;
}

.currency-toggle input[type="radio"] {
    display: none;
}

.currency-toggle input[type="radio"]:checked + label {
    background: white;
    color: var(--pkg-blue);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.form-step-header {
    background: linear-gradient(135deg, #6e9ad7 0%, var(--pkg-blue) 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-step-header i {
    background: rgba(255, 255, 255, .25);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.form-label {
    font-weight: 700;
    color: #2c3e50;
    font-size: 14px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-label-icon {
    color: var(--pkg-blue);
}

/* Campos del form: BS5 form-control / form-select, estética de marca */
.pkg-field {
    border: 2px solid #e0e6ed;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 15px;
    transition: border-color .25s, box-shadow .25s;
    background-color: #fff;
}

.pkg-field:focus {
    border-color: var(--pkg-blue);
    box-shadow: 0 0 0 3px rgba(50, 118, 216, 0.12);
    outline: none;
}

textarea.pkg-field {
    resize: vertical;
    min-height: 84px;
}

/* Estado de error (compatible con Parsley / BS validation) */
.pkg-field.is-invalid,
.form-input.is-invalid {
    border-color: #dc3545;
}

/* Compatibilidad: estilos heredados de .form-input por si quedan usos */
.form-input {
    border: 2px solid #e0e6ed;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 15px;
    transition: all 0.3s;
    background: white;
    width: 100%;
}

.form-input:focus {
    border-color: var(--pkg-blue);
    box-shadow: 0 0 0 3px rgba(50, 118, 216, 0.1);
    outline: none;
}

.form-textarea {
    border: 2px solid #e0e6ed;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 14px;
    transition: all 0.3s;
    background: white;
    resize: none;
    width: 100%;
}

.form-textarea:focus {
    border-color: var(--pkg-blue);
    box-shadow: 0 0 0 3px rgba(50, 118, 216, 0.1);
    outline: none;
}

.form-pax-container {
    background: white;
    border: 2px solid #e0e6ed;
    border-radius: 10px;
    padding: 12px;
}

.form-label-optional {
    color: #6c757d;
    font-weight: 400;
    font-size: 12px;
}

.pkg-switch .form-check-input {
    width: 2.4em;
    height: 1.3em;
    cursor: pointer;
}

.pkg-switch .form-check-input:checked {
    background-color: var(--pkg-blue);
    border-color: var(--pkg-blue);
}

.pkg-switch .form-check-input:focus {
    border-color: var(--pkg-blue);
    box-shadow: 0 0 0 .2rem rgba(50, 118, 216, .2);
}

.form-switch-label {
    color: #6c757d;
    font-size: 13px;
    cursor: pointer;
}

.form-btn-submit {
    width: 100%;
    background: linear-gradient(135deg, #ab5c7d 0%, var(--pkg-magenta) 100%);
    color: white;
    border: none;
    font-weight: 800;
    font-size: 17px;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(192, 51, 109, 0.35);
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.form-btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(192, 51, 109, 0.45);
    color: #fff;
}

.form-trust-indicators {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 12px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.form-trust-item {
    text-align: center;
}

.form-trust-icon {
    color: var(--pkg-success);
    font-size: 18px;
}

.form-trust-text {
    color: #6c757d;
    font-size: 10px;
    margin: 4px 0 0 0;
    font-weight: 500;
}

/* ============================================================
   Layout responsive del detalle (combined)
   - Mobile: contenido apilado; el box de precio va inline en el sidebar
     (mismo formato que desktop, debajo de modificar/contactar)
   - Desktop (>=992px): 2 columnas, sidebar sticky
   ============================================================ */


/* ============================================================
   Refinamiento desktop (>=992px)
   ============================================================ */
@media (min-width: 992px) {
    .detail-row {
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }

    /* La columna de servicios respira con tarjetas uniformes */
    .detail-main .detail-card {
        background: #fff;
        border-radius: var(--pkg-card-radius);
        box-shadow: var(--pkg-card-shadow);
        border: 1px solid var(--pkg-border);
        margin-bottom: 18px;
        overflow: hidden;
    }

    /* Resumen del paquete: caja sticky en sidebar estrecho */
    .detail-summary-box {
        border-radius: var(--pkg-card-radius);
        box-shadow: var(--pkg-card-shadow);
        border: 1px solid var(--pkg-border);
        overflow: hidden;
    }

    /* Sidebar sticky: acompaña el scroll de la columna de servicios */
    .detail-sidebar {
        position: sticky;
        top: 20px;
    }

    .detail-price-box {
        box-shadow: 0 10px 30px rgba(50, 118, 216, 0.25);
    }

    /* Título del destino más generoso en desktop */
    .pkg-summary-title {
        font-size: 1.8rem;
    }
}

/* ====================================================================
   Estilos extraídos de inline estáticos (combined/detail.html)
   ==================================================================== */

/* --- Banner "bookeable" (seña / facilidad de pago) --- */
.detail-bookeable-banner {
    background: linear-gradient(135deg, #fff8e1 0%, #fff3cd 100%);
    border: 2px dashed #f5a623;
    border-radius: 14px;
    padding: 18px 20px;
    text-align: center;
    margin-top: 14px;
    position: relative;
    overflow: hidden;
}

.detail-bookeable-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: linear-gradient(135deg, #f5a623, #ff8c00);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 4px 14px 4px 14px;
    border-radius: 0 12px 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-bookeable-emoji {
    font-size: 28px;
    margin-bottom: 6px;
}

.detail-bookeable-headline {
    font-size: 16px;
    font-weight: 800;
    color: #1a1a2e;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.detail-bookeable-pill {
    display: inline-block;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: #fff;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 18px;
}

.detail-bookeable-sub {
    font-size: 13px;
    color: #555;
    margin: 8px 0 0 0;
    line-height: 1.5;
}

.detail-bookeable-sub-icon {
    color: #28a745;
}

.detail-bookeable-strong {
    color: #1a1a2e;
}

/* --- Banner de precio (desktop) --- */
.detail-price-banner {
    background: linear-gradient(135deg, #6e9ad7 0%, #3276d8 100%);
    border-radius: 14px;
    padding: 32px 20px;
    position: relative;
    overflow: hidden;
    margin-top: 14px;
}

.detail-price-circle-tl {
    position: absolute;
    top: -30px;
    left: -30px;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    z-index: 0;
}

.detail-price-circle-br {
    position: absolute;
    bottom: -40px;
    right: -40px;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    z-index: 0;
}

.detail-price-inner {
    position: relative;
    z-index: 1;
}

.detail-price-single {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.detail-price-label {
    color: rgba(255, 255, 255, 0.85);
    font-size: 12px;
    font-weight: 600;
    margin: 0 0 8px 0;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.detail-price-discount {
    margin-bottom: 12px;
}

.detail-price-original {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin: 0;
    text-decoration: line-through;
}

.detail-price-save {
    display: inline-block;
    background: rgba(255, 107, 107, 0.9);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    margin-top: 4px;
}

.detail-price-amount {
    color: white;
    margin: 8px 0 0 0;
    font-weight: 800;
    font-size: 42px;
    line-height: 1;
}

.detail-price-pax {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    margin: 8px 0 24px 0;
    font-weight: 500;
}

.detail-price-pax-alt {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    margin: 8px 0;
}

.detail-price-btn {
    background: white;
    color: #667eea;
    border: none;
    font-weight: 700;
    font-size: 16px;
    padding: 14px 24px;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.detail-price-label-center {
    color: rgba(255, 255, 255, 0.85);
    font-size: 12px;
    font-weight: 600;
    margin: 0 0 20px 0;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align: center;
}

.detail-currency-row {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    align-items: center;
    justify-content: center;
}

.detail-price-multi {
    text-align: center;
    margin-bottom: 24px;
}

.detail-price-save-multi {
    display: inline-block;
    background: rgba(255, 107, 107, 0.9);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    margin: 4px 0;
}

/* --- Mapa modal --- */
.detail-map-canvas {
    width: 100%;
    height: 100%;
}

/* --- Modal modificar paquete --- */
.detail-quote-modal-body {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 24px;
}

/* Visibilidad inicial de los bloques de precio por moneda */
.detail-price-hidden {
    display: none;
}

/* ============================================================
   HEADER de la página (breadcrumb + h1 + facts) — full-width
   ============================================================ */
.detail-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
    color: var(--pkg-muted, #6c757d);
    padding: 14px 4px 6px;
}

.detail-breadcrumb a {
    color: var(--pkg-muted, #6c757d);
    text-decoration: none;
}

.detail-breadcrumb a:hover {
    color: var(--pkg-blue, #3276d8);
}

.detail-breadcrumb__sep {
    font-size: 9px;
    opacity: .5;
}

.detail-breadcrumb__current {
    color: var(--pkg-ink, #212529);
    font-weight: 600;
}

.detail-hero {
    padding: 2px 4px 14px;
}

.detail-hero__title {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--pkg-ink, #212529);
    margin: 0 0 10px;
}

.detail-hero__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}

.detail-hero__fact {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--pkg-muted, #6c757d);
}

.detail-hero__fact i {
    color: var(--pkg-blue, #3276d8);
}

/* ============================================================
   Orden de productos
   - Mobile: orden de DOM (vuelo, banner, transfer, …) — sin cambios
   - Desktop: hotel → vuelo → traslados → auto → tour → home → circuito
   ============================================================ */
.detail-main {
    display: flex;
    flex-direction: column;
}

.detail-sec--banner {
    margin-top: 1rem;
}

@media (min-width: 992px) {
    .detail-sec--housing  { order: 1; }
    .detail-sec--banner   { order: 2; }
    .detail-sec--flight   { order: 3; }
    .detail-sec--transfer { order: 4; }
    .detail-sec--car      { order: 5; }
    .detail-sec--tour     { order: 6; }
    .detail-sec--home     { order: 7; }
    .detail-sec--circuit  { order: 8; }

    .detail-hero__title { font-size: 30px; }
}

/* Formas de pago dentro del sidebar (debajo del box de precio) */
.detail-sidebar-payments {
    margin-top: 16px;
}

/* ============================================================
   Modales a pantalla completa
   base.css fija .modal-dialog a width/height:100% y margin:0, pero NO resetea
   max-width, así que BS5 los dejaba en max-width:500px (800px en .modal-lg)
   pegados a la izquierda. Reseteamos max-width para que ocupen toda la pantalla.
   ============================================================ */
.modal-dialog {
    max-width: none;
}

/* Desktop (>=992px): los modales NO van a pantalla completa, sino ventana centrada (BS5) */
@media (min-width: 992px) {
    .modal {
        overflow-y: auto !important;
    }
    .modal-dialog {
        width: auto;
        height: auto;
        max-width: 500px;
        margin: 1.75rem auto;
    }
    .modal-dialog.modal-lg {
        max-width: 800px;
    }
    .modal-content {
        height: auto;
        border-radius: .5rem;
    }
    .modal-body {
        overflow-y: auto !important;
    }
}

/* ============================================================
   Panel "Modificar paquete"
   - Desktop: reemplaza el resumen del paquete en el sidebar (con botón Volver)
   - Mobile: se muestra como modal (overlay full-screen)
   ============================================================ */
.detail-quote-panel {
    display: none;
}

.detail-sidebar.is-quoting .detail-quote-panel {
    display: block;
}

.detail-quote-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.detail-quote-panel__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--pkg-ink, #212529);
    margin: 0;
}

.detail-quote-panel__title i {
    color: var(--pkg-blue, #3276d8);
}

.detail-quote-panel__close {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid var(--pkg-border, #e3e6ec);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--pkg-muted, #6c757d);
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}

.detail-quote-panel__close:hover {
    background: var(--pkg-blue, #3276d8);
    color: #fff;
    border-color: transparent;
}

/* Desktop: el form ocupa el lugar del resumen dentro del sidebar */
@media (min-width: 992px) {
    .detail-sidebar.is-quoting .detail-summary-box {
        display: none;
    }
    .detail-quote-panel {
        background: #fff;
        border: 1px solid var(--pkg-border, #e3e6ec);
        border-radius: var(--pkg-card-radius, 16px);
        box-shadow: var(--pkg-card-shadow, 0 2px 12px rgba(0, 0, 0, .06));
        padding: 20px;
    }
}

/* Mobile: el form se muestra como modal full-screen (overlay) */
@media (max-width: 991.98px) {
    .detail-sidebar.is-quoting .detail-quote-panel {
        position: fixed;
        inset: 0;
        z-index: 1040;
        background: #fff;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 16px;
    }
    .detail-quote-panel__header {
        position: sticky;
        top: 0;
        background: #fff;
        padding: 6px 0 12px;
        z-index: 1;
    }
    body.quote-open {
        overflow: hidden;
    }
}
