/* ============================================================
   COMPLEJO RESERVAS — Estilos Frontend
   ============================================================ */

.cr-widget {
    font-family: inherit;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

/* ---- PASOS ---- */
.cr-step { margin-bottom: 2rem; }
.cr-titulo-paso {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

/* ---- SELECTOR DE FECHAS ---- */
.cr-fechas-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}
.cr-campo { display: flex; flex-direction: column; gap: 0.3rem; flex: 1; min-width: 140px; }
.cr-campo label { font-size: 0.85rem; font-weight: 600; color: #374151; }
.cr-campo input[type="date"],
.cr-campo input[type="number"] {
    padding: 0.6rem 0.8rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    background: #fff;
    color: #111827;
    transition: border-color 0.2s;
}
.cr-campo input:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
.cr-campo-boton { justify-content: flex-end; }

/* ---- BOTONES ---- */
.cr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.4rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.2s, transform 0.1s;
    text-decoration: none;
}
.cr-btn:hover { transform: translateY(-1px); }
.cr-btn:active { transform: translateY(0); }

.cr-btn-buscar   { background: #6366f1; color: #fff; width: 100%; }
.cr-btn-buscar:hover { background: #4f46e5; }

.cr-btn-reservar { background: #10b981; color: #fff; width: 100%; margin-top: 0.8rem; }
.cr-btn-reservar:hover { background: #059669; }

.cr-btn-reservar-complejo { background: #f59e0b; color: #fff; width: 100%; margin-top: 0.8rem; }
.cr-btn-reservar-complejo:hover { background: #d97706; }

.cr-btn-confirmar { background: #10b981; color: #fff; padding: 0.75rem 2rem; }
.cr-btn-confirmar:hover { background: #059669; }

.cr-btn-secondary { background: #f3f4f6; color: #374151; padding: 0.75rem 1.2rem; }
.cr-btn-secondary:hover { background: #e5e7eb; }

.cr-btn-disabled { background: #e5e7eb; color: #9ca3af; cursor: not-allowed; width: 100%; margin-top: 0.8rem; }
.cr-btn-disabled:hover { transform: none; }

/* ---- AVISOS DE DISPONIBILIDAD ---- */
.cr-aviso {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 1rem 1.2rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.5;
}
.cr-aviso-ok      { background: #ecfdf5; color: #065f46; border: 1px solid #6ee7b7; }
.cr-aviso-warning { background: #fffbeb; color: #92400e; border: 1px solid #fcd34d; }
.cr-aviso-error   { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }

.cr-aviso-ok .cr-aviso-icono::before      { content: '✅'; }
.cr-aviso-warning .cr-aviso-icono::before { content: '⚠️'; }
.cr-aviso-error .cr-aviso-icono::before   { content: '🚫'; }

/* ---- CARDS ---- */
.cr-opcion-complejo { margin-bottom: 1.5rem; }

.cr-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.2s;
}
.cr-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); }

.cr-card-complejo {
    border-color: #fcd34d;
    background: linear-gradient(135deg, #fffbeb 0%, #fff 100%);
    padding: 1.2rem 1.4rem;
}

.cr-lista-alojamientos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(520px, 1fr));
    gap: 1.2rem;
}

.cr-card-alojamiento { display: flex; flex-direction: column; }
.cr-card-ocupado { opacity: 0.7; }

.cr-card-thumb img {
    width: 100%;
    height: 240px;
    cursor: zoom-in;
    object-fit: cover;
    display: block;
}

.cr-card-body { padding: 1rem 1.2rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }

.cr-card-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.cr-card-header h4 { margin: 0; font-size: 1rem; font-weight: 700; color: #111827; }

.cr-card-desc { font-size: 0.88rem; color: #6b7280; margin: 0; }

.cr-card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #6b7280;
}

.cr-card-precio {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    margin-top: auto;
}
.cr-precio-label { font-size: 0.85rem; color: #6b7280; }
.cr-precio-valor { font-size: 1.2rem; font-weight: 700; color: #111827; }

/* ---- BADGES ---- */
.cr-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.cr-badge-disponible { background: #d1fae5; color: #065f46; }
.cr-badge-ocupado    { background: #fee2e2; color: #991b1b; }
.cr-badge-exclusivo  { background: #fef3c7; color: #92400e; }

/* ---- FORMULARIO ---- */
.cr-resumen-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem 1.2rem;
    margin-bottom: 1.5rem;
}
.cr-resumen-fila {
    display: flex;
    justify-content: space-between;
    padding: 0.35rem 0;
    font-size: 0.9rem;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
}
.cr-resumen-fila:last-child { border-bottom: none; }
.cr-resumen-total { font-weight: 700; font-size: 1rem; color: #111827; }

.cr-formulario-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.cr-campo-full { grid-column: 1 / -1; }

.cr-input {
    width: 100%;
    padding: 0.65rem 0.8rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    color: #111827;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.cr-input:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.15); }

textarea.cr-input { resize: vertical; min-height: 80px; }

.cr-formulario-acciones {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* ---- CONFIRMACIÓN ---- */
.cr-confirmacion-ok, .cr-confirmacion-error {
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    font-size: 1rem;
    font-weight: 500;
}
.cr-confirmacion-ok    { background: #ecfdf5; color: #065f46; border: 1px solid #6ee7b7; }
.cr-confirmacion-error { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }

/* ---- LOADER ---- */
.cr-loader {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    border-radius: 10px;
    z-index: 10;
}
.cr-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: cr-spin 0.7s linear infinite;
}
@keyframes cr-spin { to { transform: rotate(360deg); } }

.cr-loader-text { font-size: 0.9rem; color: #6b7280; font-weight: 500; }

/* ---- RESPONSIVE ---- */
@media (max-width: 600px) {
    /* Buscador compacto: 2 campos por línea, centrado, con Bebés y edades visibles */
    .cr-fechas-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 10px 12px;
        justify-items: stretch;
        text-align: center;
    }
    .cr-fechas-grid .cr-campo { width: 100%; min-width: 0; }
    .cr-fechas-grid .cr-campo label {
        display: block;
        font-size: 0.78rem;
        line-height: 1.25;
        text-align: center;
        white-space: normal;
    }
    .cr-fechas-grid .cr-campo input { width: 100%; box-sizing: border-box; text-align: center; }
    .cr-fechas-grid .cr-campo-boton { grid-column: 1 / -1; }
    .cr-fechas-grid .cr-campo-boton .cr-btn-buscar { width: 100%; }
    .cr-formulario-grid { grid-template-columns: 1fr; }
    .cr-lista-alojamientos { grid-template-columns: 1fr; }
    .cr-formulario-acciones { flex-direction: column; }
    .cr-btn-secondary { order: 2; }
    .cr-btn-confirmar { order: 1; }
}

/* ---- GALERÍA Y VÍDEO (frontend) ---- */
.cr-card-galeria {
    display: flex;
    gap: 6px;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}
.cr-card-galeria img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
}
.cr-card-video {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #6366f1;
    text-decoration: none;
}
.cr-card-video:hover { text-decoration: underline; }

/* ---- EXTRAS Y DESGLOSE (frontend) ---- */
.cr-extras-box {
    margin: 0.6rem 0;
    padding: 0.6rem 0.8rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}
.cr-extras-titulo { font-weight: 700; margin: 0 0 0.4rem; font-size: 0.9rem; }
.cr-extra-opt {
    display: block;
    padding: 0.25rem 0;
    font-size: 0.9rem;
    cursor: pointer;
}
.cr-extra-precio { color: #059669; font-weight: 600; }
.cr-resumen-deposito { font-weight: 700; color: #b45309; }

/* ============================================================
   LISTADO DE COMPLEJOS
   ============================================================ */
.cr-listado { max-width: 1200px; margin: 0 auto; }

.cr-listado-buscador {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
}
.cr-listado-buscador .cr-campo { flex: 1; min-width: 120px; }
.cr-listado-buscador .cr-btn-buscar { width: auto; padding-left: 2rem; padding-right: 2rem; }

.cr-listado-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(540px, 1fr));
    gap: 1.5rem;
}

.cr-complejo-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s, transform .1s;
}
.cr-complejo-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.1); transform: translateY(-2px); }

.cr-complejo-img img { width: 100%; height: 260px; cursor: zoom-in; object-fit: cover; display: block; }
.cr-complejo-body { padding: 1.2rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.cr-complejo-titulo { margin: 0; font-size: 1.2rem; font-weight: 700; color: #111827; }
.cr-complejo-desc { margin: 0; font-size: 0.9rem; color: #6b7280; }
.cr-complejo-meta { display: flex; flex-wrap: wrap; gap: 1rem; font-size: 0.85rem; color: #374151; }
.cr-complejo-precio { font-size: 1rem; color: #111827; margin-top: auto; }
.cr-complejo-precio strong { color: #059669; font-size: 1.15rem; }
.cr-complejo-card .cr-btn-reservar { margin-top: 0.6rem; text-align: center; }
.cr-complejo-sinurl { font-size: 0.82rem; color: #b91c1c; }

.cr-listado-loader { display: flex; justify-content: center; padding: 2rem; }

/* ---- CARACTERÍSTICAS (chips) ---- */
.cr-card-carac { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.4rem; }
.cr-carac-chip {
    display: inline-block;
    background: #eef2ff;
    color: #4338ca;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 99px;
}

@media (max-width: 600px) {
    .cr-listado-buscador { flex-direction: column; }
    .cr-listado-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   COMPLEJO COMPLETO: capacidad + buscador de fechas libres
   ============================================================ */
.cr-complejo-capacidad {
    display: flex;
    gap: 1.2rem;
    font-size: 0.9rem;
    color: #374151;
    margin: 0.4rem 0 0.6rem;
    font-weight: 600;
}

.cr-completo-buscador { margin-top: 1rem; }
.cr-btn-link {
    background: none;
    border: none;
    color: #6366f1;
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    padding: 0.4rem 0;
    text-decoration: underline;
}
.cr-btn-link:hover { color: #4f46e5; }
.cr-btn-link:disabled { opacity: 0.5; cursor: default; }

@media (max-width: 600px) {
}

/* ============================================================
   CALENDARIO Y SELECCIÓN MÚLTIPLE
   ============================================================ */
.cr-calendario-bloque { margin-top: 0.6rem; }
.cr-calendario-wrap {
    margin-top: 0.8rem;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem;
    background: #fff;
}
.cr-cal-controles {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 0.8rem;
}
.cr-cal-controles select { padding: 0.4rem; border: 1px solid #d1d5db; border-radius: 6px; }
.cr-cal-leyenda { display: flex; gap: 1rem; font-size: 0.82rem; color: #374151; }
.cr-cal-leyenda span { display: inline-flex; align-items: center; gap: 0.3rem; }
.cr-cal-punto { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.cr-cal-libre { background: #10b981; }
.cr-cal-ocupado { background: #ef4444; }

.cr-cal-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.6rem;
}
.cr-cal-nav button {
    background: #f3f4f6;
    border: none;
    width: 32px; height: 32px;
    border-radius: 6px;
    font-size: 1.2rem;
    cursor: pointer;
}
.cr-cal-mes-label { font-weight: 700; min-width: 160px; text-align: center; }

.cr-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.cr-cal-dow { text-align: center; font-size: 0.75rem; font-weight: 700; color: #6b7280; padding: 4px 0; }
.cr-cal-dia {
    text-align: center;
    padding: 0.5rem 0;
    border-radius: 6px;
    font-size: 0.85rem;
}
.cr-cal-vacio { background: transparent; }
.cr-cal-libre-d { background: #d1fae5; color: #065f46; cursor: pointer; }
.cr-cal-libre-d:hover { background: #6ee7b7; }
.cr-cal-ocupado-d { background: #fee2e2; color: #991b1b; text-decoration: line-through; }
.cr-cal-pasado { background: #f9fafb; color: #d1d5db; }
.cr-cal-sel { background: #6366f1 !important; color: #fff !important; font-weight: 700; }
.cr-cal-en-rango { background: #c7d2fe; color: #3730a3; }
.cr-cal-ayuda { font-size: 0.8rem; color: #6b7280; margin: 0.6rem 0 0; }

/* Barra selección múltiple */
.cr-multi-check {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #4338ca;
    cursor: pointer;
}
.cr-multi-bar {
    position: sticky;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: #111827;
    color: #fff;
    padding: 0.8rem 1.2rem;
    border-radius: 10px;
    margin-top: 1.2rem;
    box-shadow: 0 6px 20px rgba(0,0,0,.2);
}
.cr-multi-info { font-weight: 600; }
.cr-btn-reservar-multi { background: #10b981; color: #fff; }
.cr-btn-reservar-multi:hover { background: #059669; }

.cr-multi-room {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.9rem 1.1rem;
    margin-bottom: 0.8rem;
}
.cr-multi-room h4 { margin: 0 0 0.5rem; font-size: 1rem; }

/* ============================================================
   LIGHTBOX, MODAL DE ALOJAMIENTO Y OPCIONES DE PAGO
   ============================================================ */
.cr-card-galeria img { cursor: zoom-in; }

.cr-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.85);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}
.cr-lightbox img {
    max-width: 92vw;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,.5);
}
.cr-lightbox-cerrar {
    position: absolute;
    top: 14px; right: 22px;
    color: #fff;
    font-size: 2.4rem;
    line-height: 1;
    cursor: pointer;
    user-select: none;
}

.cr-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}
.cr-modal {
    position: relative;
    background: #fff;
    border-radius: 14px;
    max-width: 640px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    padding: 1.6rem 1.8rem;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.cr-modal h3 { margin: 0 0 0.8rem; font-size: 1.4rem; }
.cr-modal-cerrar {
    position: absolute;
    top: 10px; right: 14px;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #6b7280;
    cursor: pointer;
    line-height: 1;
}
.cr-modal-galeria {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
    margin-bottom: 0.9rem;
}
.cr-modal-galeria img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    cursor: zoom-in;
}
.cr-modal-desc { color: #4b5563; font-size: 0.95rem; line-height: 1.6; }
.cr-modal-meta { color: #374151; font-weight: 600; font-size: 0.92rem; }
.cr-modal-sub { font-weight: 700; margin: 0.8rem 0 0.3rem; }
.cr-modal-extras { margin: 0 0 0.6rem 1.2rem; list-style: disc; font-size: 0.9rem; color: #4b5563; }
.cr-modal-precio {
    font-size: 1.4rem;
    font-weight: 800;
    color: #059669;
    margin: 0.8rem 0 0.6rem;
}
.cr-modal-precio small { font-size: 0.8rem; color: #6b7280; font-weight: 500; }
.cr-modal-nodisp { color: #b91c1c; font-size: 1rem; }
.cr-modal .cr-modal-reservar { width: 100%; }

.cr-pago-opciones {
    background: #f0f9ff;
    border: 1px solid #7dd3fc;
    border-radius: 8px;
    padding: 0.6rem 0.9rem;
    margin: 0.6rem 0;
}
.cr-pago-opciones label {
    display: block;
    padding: 0.2rem 0;
    font-size: 0.92rem;
    cursor: pointer;
    font-weight: 600;
    color: #0c4a6e;
}

/* ============================================================
   AJUSTES v1.18: calendario, tarjetas, responsive, mensajes
   ============================================================ */
.cr-cal-titulo { font-weight: 700; font-size: 1rem; margin: 1rem 0 0.4rem; color: #111827; }

/* Flechas del calendario bien centradas en su recuadro */
.cr-cal-nav button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    line-height: 1;
    font-size: 1.3rem;
    background: #eef2ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    cursor: pointer;
}
.cr-cal-nav button:hover { background: #e0e7ff; }

/* Imágenes más grandes en tarjetas */
.cr-complejo-img img { height: 280px; }

/* Confirmación destacada */
.cr-confirmacion-destacada {
    background: #ecfdf5;
    border: 2px solid #10b981;
    border-radius: 14px;
    padding: 1.6rem 1.8rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 16px rgba(16,185,129,.15);
}
.cr-confirmacion-destacada .cr-conf-icono { font-size: 2.2rem; line-height: 1; }
.cr-confirmacion-destacada p {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #065f46;
    line-height: 1.5;
}

/* Rango de fechas destacado en el resumen */
.cr-resumen-fechas {
    background: #eef2ff;
    color: #3730a3;
    font-weight: 800;
    font-size: 1.05rem;
    text-align: center;
    padding: 0.55rem 0.8rem;
    border-radius: 8px;
    margin-bottom: 0.7rem;
}

/* Responsive de las rejillas grandes */
@media (max-width: 1024px) {
    .cr-lista-alojamientos { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)) !important; }
    .cr-listado-grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)) !important; }
}
@media (max-width: 640px) {
    .cr-lista-alojamientos, .cr-listado-grid { grid-template-columns: 1fr !important; }
    .cr-card-thumb img, .cr-complejo-img img { height: 210px; }
}

/* ============================================================
   v1.22: tarjetas de complejos y alojamientos más grandes
   ============================================================ */
.cr-card-thumb img { height: 300px; }
.cr-complejo-img img { height: 320px; }
.cr-card-body { padding: 1.4rem 1.5rem; }
.cr-complejo-body { padding: 1.4rem 1.5rem; }
.cr-card-header h4 { font-size: 1.25rem; }
.cr-complejo-titulo { font-size: 1.35rem; }
.cr-card-desc, .cr-complejo-desc { font-size: 1rem; }
.cr-precio-valor { font-size: 1.35rem; }
.cr-complejo-precio strong { font-size: 1.35rem; }

@media (max-width: 1024px) {
    .cr-card-thumb img, .cr-complejo-img img { height: 250px; }
}

/* ============================================================
   v1.24: opciones de pago en tarjetas + bloque complejo completo
   ============================================================ */
.cr-pago-titulo { font-weight: 800; font-size: 0.98rem; margin: 0 0 0.6rem; color: #0c4a6e; }
.cr-pago-opciones { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; background: none; border: none; padding: 0.4rem 0; }
.cr-pago-opciones .cr-pago-titulo { grid-column: 1 / -1; }
.cr-widget .cr-pago-opciones {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 1rem !important;
    padding: 0.5rem 0 !important;
}
.cr-widget .cr-pago-opciones .cr-pago-titulo { grid-column: 1 / -1; }
.cr-widget .cr-pago-card,
.cr-widget label.cr-pago-card {
    position: relative;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    text-align: center !important;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    padding: 1.6rem 1.6rem 1.7rem !important;
    margin: 0 !important;
    cursor: pointer;
    background: #fff;
    box-shadow: 0 1px 3px rgba(16, 24, 40, .05);
    transition: border-color .15s, background .15s, box-shadow .15s, transform .1s;
    letter-spacing: normal !important;
    word-spacing: normal !important;
    line-height: 1.5 !important;
}
.cr-widget .cr-pago-card:hover {
    border-color: #7dd3fc;
    box-shadow: 0 4px 12px rgba(14, 165, 233, .12);
    transform: translateY(-1px);
}
.cr-widget .cr-pago-card.cr-pago-sel {
    border-color: #0ea5e9;
    background: #f0f9ff;
    box-shadow: 0 4px 14px rgba(14, 165, 233, .18);
}
/* Marca de selección en la esquina */
.cr-widget .cr-pago-card.cr-pago-sel::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 12px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #0ea5e9;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 22px;
    text-align: center;
}
.cr-widget .cr-pago-card input { position: absolute; opacity: 0; }

/* Cada línea en bloque con sus propios márgenes: se separan aunque el tema anule el gap */
.cr-widget .cr-pago-card > span {
    display: block !important;
    width: 100%;
}
.cr-widget .cr-pago-nombre {
    font-weight: 800;
    font-size: 1.02rem !important;
    color: #111827;
    margin: 0 0 10px !important;
    letter-spacing: .01em !important;
}
.cr-widget .cr-pago-importe {
    font-weight: 800;
    font-size: 1.7rem !important;
    line-height: 1.15 !important;
    color: #059669;
    margin: 0 0 12px !important;
}
.cr-widget .cr-pago-nota {
    font-size: 0.84rem !important;
    line-height: 1.55 !important;
    color: #6b7280;
    max-width: 32ch;
    margin: 0 auto !important;
    padding: 0 4px;
}
@media (max-width: 560px) {
    .cr-widget .cr-pago-opciones { grid-template-columns: 1fr; }
}
@media (max-width: 640px) { .cr-pago-opciones { grid-template-columns: 1fr; } }

.cr-completo-box {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 12px;
    padding: 1.1rem 1.3rem;
    margin-top: 1.2rem;
}
.cr-completo-cab { display: flex; gap: 0.9rem; align-items: flex-start; margin-bottom: 0.8rem; }
.cr-completo-icono { font-size: 1.8rem; line-height: 1; }
.cr-completo-titulo { margin: 0 0 0.25rem; font-weight: 800; font-size: 1.05rem; color: #92400e; }
.cr-completo-texto { margin: 0 0 0.5rem; font-size: 0.92rem; color: #78350f; line-height: 1.55; }
.cr-card-complejo .cr-completo-texto { color: #4b5563; }

/* ============================================================
   v1.26: mínimo/máximo de noches y huéspedes extra
   ============================================================ */
.cr-noches-aviso {
    margin: 0.6rem 0 0;
    font-size: 0.88rem;
    color: #0c4a6e;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 0.5rem 0.8rem;
    display: inline-block;
}
.cr-extra-hue {
    color: #6b7280;
    font-size: 0.82rem;
    font-weight: 600;
}

/* ============================================================
   v1.27: precio por día en el calendario y extras incluidos
   ============================================================ */
.cr-cal-dia {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    min-height: 46px;
    padding: 3px 2px;
}
.cr-cal-num { font-weight: 700; line-height: 1.1; }
.cr-cal-precio {
    font-size: 0.66rem;
    font-weight: 700;
    color: #059669;
    line-height: 1;
    white-space: nowrap;
}
.cr-cal-ocupado-d .cr-cal-precio, .cr-cal-pasado .cr-cal-precio { display: none; }
.cr-cal-sel .cr-cal-precio, .cr-cal-en-rango .cr-cal-precio { color: #fff; }
.cr-extra-incluido { color: #0369a1 !important; font-weight: 700; }
@media (max-width: 480px) {
    .cr-cal-precio { font-size: 0.58rem; }
    .cr-cal-dia { min-height: 40px; }
}

/* Descuento del complejo completo */
.cr-dto-complejo {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: #b45309;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 6px;
    padding: 3px 8px;
    margin-top: 4px;
}

/* Editor de personas en el resumen */
.cr-personas-editor {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: center;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.6rem 0.9rem;
    margin-bottom: 0.7rem;
}
.cr-personas-editor .cr-extras-titulo { margin: 0; width: 100%; }
.cr-personas-editor label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
}
.cr-personas-editor input {
    width: 64px;
    padding: 4px 6px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    text-align: center;
}

.cr-personas-nota {
    width: 100%;
    margin: 2px 0 0;
    font-size: 0.78rem;
    color: #6b7280;
}

/* ============================================================
   Cabecera del complejo: texto, mapa y galería/vídeo
   ============================================================ */
.cr-comp-cabecera {
    margin-bottom: 1.6rem;
}
.cr-comp-nombre {
    font-size: 1.7rem;
    font-weight: 800;
    margin: 0 0 0.7rem;
    color: #111827;
}
.cr-comp-texto {
    font-size: 1rem;
    line-height: 1.65;
    color: #374151;
    margin-bottom: 1.1rem;
}
.cr-comp-mapa { margin-bottom: 1.1rem; }
.cr-comp-direccion {
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.5rem;
}
.cr-comp-mapa { margin-bottom: 0; }
.cr-comp-mapa iframe {
    width: 100%;
    height: 260px;
    border: 0;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(16,24,40,.12);
}
.cr-comp-columnas {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 1.6rem;
    align-items: start;
}
.cr-comp-col-texto { min-width: 0; }
.cr-comp-col-media {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
/* Si no hay descripción, la media ocupa todo el ancho */
.cr-comp-columnas > .cr-comp-col-media:only-child { grid-column: 1 / -1; }
.cr-leer-mas {
    background: none;
    border: none;
    padding: 0;
    color: #2271b1;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: underline;
}
.cr-leer-mas:hover { color: #135e96; }
.cr-comp-galeria {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.6rem;
}
.cr-comp-galeria img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 10px;
    cursor: zoom-in;
    transition: transform .15s ease;
}
.cr-comp-galeria img:hover { transform: scale(1.03); }
.cr-comp-video iframe, .cr-comp-video video {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 12px;
    background: #000;
}
@media (max-width: 782px) {
    .cr-comp-columnas { grid-template-columns: 1fr; gap: 1.1rem; }
    .cr-comp-mapa iframe { height: 240px; }
    .cr-comp-galeria { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
    .cr-comp-galeria img { height: 100px; }
}

/* Botón "Ver más fotos" de la galería del complejo */
.cr-ver-mas-fotos {
    display: block;
    width: 100%;
    margin-top: 0.6rem;
    background: #f3f4f6;
    color: #1f2937;
    border: 1px solid #d1d5db;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.55rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: background .15s;
}
.cr-ver-mas-fotos:hover { background: #e5e7eb; }

/* Fila de la fianza en el resumen */
.cr-fila-fianza { color: #92400e; background: #fffbeb; border-radius: 6px; padding: 4px 8px; }

/* Día con ocupación parcial: quedan pocas habitaciones */
.cr-cal-parcial { background: #fef3c7 !important; }
.cr-cal-parcial .cr-cal-num { color: #92400e; }
.cr-cal-punto-parcial { background: #f59e0b; }

/* Columnas configurables en la lista de habitaciones */
.cr-widget .cr-lista-alojamientos.cr-cols-1 { grid-template-columns: 1fr; }
.cr-widget .cr-lista-alojamientos.cr-cols-2 { grid-template-columns: repeat(2, 1fr); }
.cr-widget .cr-lista-alojamientos.cr-cols-3 { grid-template-columns: repeat(3, 1fr); }
.cr-widget .cr-lista-alojamientos.cr-cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 782px) {
    .cr-widget .cr-lista-alojamientos.cr-cols-2,
    .cr-widget .cr-lista-alojamientos.cr-cols-3,
    .cr-widget .cr-lista-alojamientos.cr-cols-4 { grid-template-columns: 1fr; }
}

/* Botón-enlace del banner: bajar a las habitaciones */
.cr-btn-link {
    display: block;
    width: 100%;
    margin-top: 0.5rem;
    background: none;
    border: none;
    color: #0c4a6e;
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: underline;
    cursor: pointer;
    padding: 0.4rem 0;
}
.cr-btn-link:hover { color: #075985; }

/* Fila de extra elegido en el resumen */
.cr-fila-extra { color: #065f46; }
.cr-fila-extra span:last-child { font-weight: 700; }

/* Los datos de la tarjeta (habitaciones, baños, niños) respiran en rejillas densas */
.cr-widget .cr-card-meta { flex-wrap: wrap; row-gap: 0.35rem; column-gap: 0.9rem; }
.cr-widget .cr-card-meta span { white-space: normal; overflow-wrap: anywhere; }
.cr-widget .cr-lista-alojamientos.cr-cols-3 .cr-card-meta,
.cr-widget .cr-lista-alojamientos.cr-cols-4 .cr-card-meta {
    font-size: 0.8rem;
    column-gap: 0.6rem;
    row-gap: 0.3rem;
}
.cr-widget .cr-lista-alojamientos.cr-cols-4 .cr-card { padding: 1rem 1.1rem; }
.cr-widget .cr-lista-alojamientos.cr-cols-3 .cr-card h4,
.cr-widget .cr-lista-alojamientos.cr-cols-4 .cr-card h4 { font-size: 1rem; }

/* Validación en vivo y errores sin perder el formulario */
.cr-widget .cr-input.cr-input-error { border-color: #ef4444 !important; background: #fef2f2; }
.cr-widget .cr-error-inline { display: block; color: #b91c1c; font-size: 0.78rem; font-weight: 700; margin-top: 3px; }
.cr-widget .cr-form-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 14px;
    font-weight: 600;
    font-size: 0.92rem;
    line-height: 1.5;
}
.cr-widget .cr-form-error a { color: #b91c1c; text-decoration: underline; margin-left: 6px; white-space: nowrap; }

/* Rango de precios del día en el calendario */
.cr-widget .cr-cal-precio-rango { font-size: 0.62rem; letter-spacing: -0.2px; }

/* Casilla de términos y condiciones */
.cr-widget .cr-campo-terminos { margin: 14px 0 4px; }
.cr-widget .cr-terminos-label { display: flex; align-items: flex-start; gap: 8px; font-size: 0.92rem; color: #374151; cursor: pointer; }
.cr-widget .cr-terminos-label input { margin-top: 3px; }
.cr-widget .cr-terminos-label a { color: #0ea5e9; text-decoration: underline; }
.cr-widget .cr-campo-terminos.cr-terminos-error .cr-terminos-label { color: #b91c1c; }

/* Ayuda del calendario: visible y centrada */
.cr-widget .cr-cal-ayuda {
    text-align: center !important;
    font-size: 1rem !important;
    font-weight: 700;
    color: #075985 !important;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 10px;
    padding: 10px 16px;
    margin: 10px auto 14px;
    max-width: 560px;
    line-height: 1.5;
}
.cr-widget .cr-cal-ayuda-icono { font-size: 1.1rem; margin-right: 4px; }


/* Botón "Ver disponibilidad" bajo el calendario */
.cr-widget .cr-cal-boton-wrap { text-align: center; margin: 12px 0 4px; }
.cr-widget .cr-cal-boton-wrap .cr-btn-buscar { min-width: 240px; }
@media (max-width: 600px) {
    .cr-widget .cr-cal-boton-wrap .cr-btn-buscar { width: 100%; min-width: 0; }
}

/* Política de cancelación visible antes de reservar */
.cr-widget .cr-politica-cancelacion { margin: 14px 0 6px; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 10px; padding: 10px 14px; }
.cr-widget .cr-politica-cancelacion summary { cursor: pointer; font-weight: 700; color: #075985; font-size: 0.92rem; }
.cr-widget .cr-politica-cancelacion table { width: 100%; border-collapse: collapse; margin: 10px 0 6px; font-size: 0.88rem; }
.cr-widget .cr-politica-cancelacion th, .cr-widget .cr-politica-cancelacion td { padding: 6px 10px; border-bottom: 1px solid #e5e7eb; text-align: left; }
.cr-widget .cr-politica-cancelacion p { margin: 6px 0 2px; color: #6b7280; font-size: 0.8rem; line-height: 1.45; }

/* Desglose por noches en el resumen */
.cr-widget .cr-resumen-desglose { margin: 4px 0 8px; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; padding: 8px 12px; }
.cr-widget .cr-resumen-desglose summary { cursor: pointer; font-size: 0.85rem; font-weight: 700; color: #075985; }
.cr-widget .cr-desglose-fila { display: flex; justify-content: space-between; font-size: 0.85rem; color: #374151; padding: 4px 2px; border-bottom: 1px dashed #e5e7eb; }
.cr-widget .cr-desglose-fila:last-of-type { border-bottom: none; }
.cr-widget .cr-desglose-nota { margin: 6px 0 0; font-size: 0.75rem; color: #6b7280; }
