/* ============================================
          CUSTOM PRICE MARKERS - ESTILO AIRBNB
          ============================================ */

.custom-price-marker {
    position: absolute;
    cursor: pointer;
    transform: translate(-50%, -100%);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.price-marker-content {
    background: white;
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    border-radius: 28px;
    padding: 10px 16px; /* Más grande */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: flex;
    align-items: center;
    gap: 8px; /* Espacio entre icono y precio */
}

.marker-category-icon {
    font-size: 16px; /* Tamaño del icono */
    color: #0a0a0a; /* Color naranja */
    transition: color 0.2s ease;
    line-height: 1;
}

.price-text {
    font-size: 16px; /* Texto más grande */
    font-weight: 700;
    color: #222;
    white-space: nowrap;
    line-height: 1;
}

.price-marker-arrow {
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid white;
    position: absolute;
    left: 50%;
    bottom: -5px;
    transform: translateX(-50%);
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.1));
}

/* Hover State - Estilo Airbnb */
.custom-price-marker.hover {
    z-index: 2;
    transform: translate(-50%, -100%) scale(1.1);
}

.custom-price-marker.hover .price-marker-content {
    background: #222;
    border-color: #222;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.custom-price-marker.hover .price-text {
    color: white;
}

.custom-price-marker.hover .marker-category-icon {
    color: white; /* Icono blanco en hover */
}

.custom-price-marker.hover .price-marker-arrow {
    border-top-color: #222;
}

/* Active State - Color Naranja */
.custom-price-marker.active {
    z-index: 3;
    transform: translate(-50%, -100%) scale(1.15);
}

.custom-price-marker.active .price-marker-content {
    background: linear-gradient(135deg, #fe6701 0%, #ff7f24 100%);
    border-color: #fe6701;
    box-shadow: 0 6px 16px rgba(254, 103, 1, 0.4);
}

.custom-price-marker.active .price-text {
    color: white;
}

.custom-price-marker.active .marker-category-icon {
    color: white; /* Icono blanco cuando está activo */
}

.custom-price-marker.active .price-marker-arrow {
    border-top-color: #fe6701;
}

/* ============================================
   INFO WINDOW STYLES
   ============================================ */

.gm-style .gm-style-iw-c {
    padding: 0 !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25) !important;
    overflow: hidden !important;
    max-width: 350px !important;
}

.gm-style .gm-style-iw-d {
    overflow: hidden !important;
    padding: 0 !important;
    max-height: none !important;
}

.gm-style .gm-style-iw-t::after {
    background: white;
    box-shadow: -2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* Hide default close button */
.gm-style-iw button[title="Close"],
.gm-style-iw button[title="Cerrar"],
.gm-style-iw button[aria-label="Close"],
.gm-style-iw button[aria-label="Cerrar"],
.gm-style-iw-chr {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

.custom-marker-popup-full {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    width: 100%;
    background: white;
    position: relative;
    overflow: hidden;
}

/* Botón cerrar - DERECHA */
.marker-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 100;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    color: #333;
    font-size: 16px;
}

.marker-close-btn:hover {
    background: white;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    color: #fe6701;
}

.marker-image-wrapper {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
}

.marker-image-full {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.marker-image-wrapper:hover .marker-image-full {
    transform: scale(1.08);
}

.marker-overlay-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 100%);
    pointer-events: none;
}

/* Precio - IZQUIERDA */
.marker-price-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    background: linear-gradient(135deg, #fe6701 0%, #ff7f24 100%);
    color: white;
    padding: 8px 14px;
    border-radius: 24px;
    font-weight: 700;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(254, 103, 1, 0.5);
    display: flex;
    align-items: center;
    gap: 6px;
    animation: pricePulse 2s ease-in-out infinite;
}

@keyframes pricePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.marker-content-full {
    padding: 18px;
    background: white;
}

.marker-header {
    margin-bottom: 12px;
}

.marker-title-full {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.marker-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #fff5f0 0%, #ffe8db 100%);
    color: #fe6701;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid #fed7c4;
}

.marker-business-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 10px;
    font-size: 14px;
    color: #555;
    font-weight: 500;
}

.marker-business-info i {
    color: #fe6701;
    font-size: 16px;
}

.marker-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 14px 0;
    padding: 10px 0;
    border-top: 1px solid #f0f0f0;
}

.marker-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
}

.marker-rating i {
    color: #FFB800;
    font-size: 15px;
}

.marker-rating .rating-value {
    font-size: 14px;
    color: #333;
    font-weight: 600;
    margin-left: 4px;
}

.marker-rating-empty {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #999;
    font-style: italic;
}

.marker-duration {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #666;
    font-weight: 500;
    background: #f8f9fa;
    padding: 6px 10px;
    border-radius: 8px;
}

.marker-duration i {
    color: #fe6701;
}

.marker-btn-full {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #fe6701 0%, #ff7f24 100%);
    color: white;
    padding: 14px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 4px 12px rgba(254, 103, 1, 0.3);
    margin-top: 14px;
    position: relative;
    overflow: hidden;
}

.marker-btn-full:hover {
    background: linear-gradient(135deg, #e55a00 0%, #ff7f24 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(254, 103, 1, 0.45);
    color: white;
}

.marker-btn-full i:last-child {
    transition: transform 0.3s ease;
}

.marker-btn-full:hover i:last-child {
    transform: translateX(5px);
}

/* ============================================
   CUSTOM LOCATION BUTTON
   ============================================ */

.custom-map-control {
    margin: 0 10px 20px 0;
}

.location-btn {
    background: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.location-btn:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transform: scale(1.05);
}

.location-icon {
    width: 20px;
    height: 20px;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiM1NjYiIHN0cm9rZS13aWR0aD0iMiI+PGNpcmNsZSBjeD0iMTIiIGN5PSIxMiIgcj0iMyIvPjxwYXRoIGQ9Ik0xMiAyYTEwIDEwIDAgMCAwIDAgMTkgMTAgMTAgMCAwIDAgMC0xOSIvPjxwYXRoIGQ9Ik0xMiAydjIiLz48cGF0aCBkPSJNMTIgMjB2MiIvPjxwYXRoIGQ9Im0yIDEyIDIgLjAxIi8+PHBhdGggZD0ibTIwIDEyIDIgLjAxIi8+PC9zdmc+');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.location-icon.loading {
    animation: spin 1s linear infinite;
}

.location-icon.active {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSIjNDI4NUY0IiBzdHJva2U9IiM0Mjg1RjQiIHN0cm9rZS13aWR0aD0iMiI+PGNpcmNsZSBjeD0iMTIiIGN5PSIxMiIgcj0iMyIvPjwvc3ZnPg==');
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   MAP WRAPPER & RESPONSIVE
   ============================================ */

.map-wrapper {
    display: flex;
    height: calc(100vh - 150px);
    position: relative;
}

.items-content {
    background: #f8f9fa;
    padding: 16px;
    overflow-y: auto;
    width: 100%;
}

.map-content {
    display: none;
    width: 100%;
    height: 100%;
    position: relative;
}

#mapCanvasTwo {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

@media (min-width: 768px) {
    .items-content {
        padding: 20px;
    }
}

@media (min-width: 1200px) {
    .items-content {
        width: 38% !important;
        height: calc(100vh - 150px) !important;
        overflow-y: auto !important;
        border-right: 1px solid #e0e0e0;
    }

    .map-content {
        display: block !important;
        width: 62% !important;
    }
}

.results-badge {
    background: linear-gradient(135deg, #fe6701 0%, #ff7f24 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 14px;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(254, 103, 1, 0.25);
}

.items-content::-webkit-scrollbar {
    width: 8px;
}

.items-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.items-content::-webkit-scrollbar-thumb {
    background: #fe6701;
    border-radius: 4px;
}

/* =====================================================
POPUP AGRUPADO - SERVICIOS (UX PREMIUM)
Blanco dominante | Naranja acción | Azul mínimo
===================================================== */

.custom-marker-popup-full.multiple-services {
    width: 100%;
    max-width: 360px;
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ---------- HEADER (AZUL SOLO AQUÍ) ---------- */
.marker-header-multiple {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #ffffff;
    padding: 16px;
    border-bottom: 1px solid #eef1f4;
}

.marker-header-multiple .marker-title-full {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #047abc;
}

.marker-header-multiple .marker-subtitle {
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.marker-price-range {
    margin-top: 10px;
    background: #fff5f0;
    padding: 6px 14px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 13px;
    display: inline-block;
    color: #fe6701;
}

/* ---------- CONTENEDOR CON SCROLL MEJORADO ---------- */
.services-list-container {
    max-height: 340px;
    overflow-y: auto;
    padding: 12px 12px 14px;
    background: #f9fafb;

    /* sensación de scroll suave */
    scroll-behavior: smooth;
    overscroll-behavior: contain;
}

/* Sombra sutil arriba/abajo (sensación de contenido) */
.services-list-container::before,
.services-list-container::after {
    content: "";
    position: sticky;
    left: 0;
    right: 0;
    height: 10px;
    pointer-events: none;
    z-index: 5;
}

.services-list-container::before {
    top: 0;
    background: linear-gradient(to bottom, rgba(249, 250, 251, 1), rgba(249, 250, 251, 0));
}

.services-list-container::after {
    bottom: 0;
    background: linear-gradient(to top, rgba(249, 250, 251, 1), rgba(249, 250, 251, 0));
}

/* Scrollbar minimal */
.services-list-container::-webkit-scrollbar {
    width: 6px;
}

.services-list-container::-webkit-scrollbar-track {
    background: transparent;
}

.services-list-container::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 6px;
}

.services-list-container::-webkit-scrollbar-thumb:hover {
    background: #fe6701;
}

/* ---------- CARD DE SERVICIO ---------- */
.service-list-item {
    display: flex;
    gap: 12px;
    background: #ffffff;
    border-radius: 14px;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #eef1f4;
    transition: all 0.25s ease;
}

.service-list-item:last-child {
    margin-bottom: 0;
}

.service-list-item:hover {
    border-color: #fe6701;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

/* Imagen */
.service-list-image {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

/* Contenido */
.service-list-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.service-list-title {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

/* Meta */
.service-list-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: #6b7280;
}

.service-list-category {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f3f4f6;
    color: #374151;
    padding: 4px 10px;
    border-radius: 14px;
    font-weight: 600;
}

.small-rating {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
}

/* Footer */
.service-list-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
}

.service-list-price {
    font-weight: 700;
    font-size: 14px;
    color: #fe6701;
}

/* Acción */
.service-list-btn {
    font-size: 13px;
    font-weight: 700;
    color: #fe6701;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.service-list-btn:hover {
    color: #e55a00;
    transform: translateX(3px);
}