:root {
    --primary-color: #2c3e50;
    --secondary-color: #BBD74A;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --gray-50: #F9FAFB;
    --gray-200: #E5E7EB;
    --gray-500: #6B7280;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,500;1,14..32,500&display=swap');

@font-face {
    font-family: Obviously;
    src: url('fonts/ObviouslyCond-Bold.otf');
}

body {
    background-color: #eee8e3;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.header {
    background: white;
    color: #2c3e50;
    padding: 2rem 0;
    text-align: left;
}

.header .container h1 {
    color: #000;
    font-family: Obviously;
    font-size: 64px;
    font-style: normal;
    font-weight: 370;
    line-height: normal;
    letter-spacing: -0.704px;
    text-transform: uppercase;
}

.search-container {
    background: white;
    border-radius: 15px;
    padding: 0.25rem 1.5rem;
    margin-bottom: 2rem;
}

.search-input {
    border-radius: 8px;
    border: 1px solid var(--gray-200, #E5E7EB);
    background: var(--gray-50, #F9FAFB);
    padding: 4px 3px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.suggestion-item {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.2s ease;
}

.suggestion-item:hover {
    background-color: #f8f9fa;
}

.stores-container {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    max-height: 300px;
    overflow-y: hidden;
    border: 1px solid #e9ecef;
}

#storesGrid{
    padding: 5px 0px;
    background: #f8f9fa;
    border-radius: 10px;
    max-height: 250px;
    overflow-y: auto;
    margin-right: -6px;
}

#storesGrid::-webkit-scrollbar-track {
    border-radius: 10px;
    background-color: white;
    border: #C7C7C7 1px solid;  
}

#storesGrid::-webkit-scrollbar {
    width: 14px;
}

#storesGrid::-webkit-scrollbar-thumb {
    border-radius: 10px;
    -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
    background-color: #A9A9A9;
    border: transparent 3px solid ;
    background-clip: content-box;

}

.store-card {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.store-card:hover {
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.store-card.selected {
    border-color: var(--success-color);
    background-color: #f8fff9;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.2);
}

.store-logo-card {
    width: 60px !important;
    height: 60px !important;
    border-radius: 6px;
    object-fit: cover;
}

.store-card-content {
    flex-grow: 1;
}

.store-card h6 {
    font-size: 0.9rem !important;
    line-height: 1.2 !important;
    margin-bottom: 0.25rem;
}

.store-card small {
    font-size: 0.75rem;
}

.map-container {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    position: relative;
    min-height: 600px;
}

.floor-tabs {
    font-family: "Inter", sans-serif;
    font-optical-sizing: auto;
    font-weight: 500;
    font-style: normal;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.floor-tabs-container {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
    padding-bottom: 5px;
}

.floor-tabs-container::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.floor-tab {
    background: none;
    border: none;
    padding: 12px 20px;
    margin-right: 8px;
    border-radius: 25px;
    font-weight: 600;
    color: #6c757d;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
    font-size: 14px;
    min-width: fit-content;
}

.floor-tab.active {
    background: var(--secondary-color);
    color: #000;
    /* box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3); */
}

.floor-tab:hover:not(.active) {
    background: #e9ecef;
    color: var(--primary-color);
    transform: translateY(-1px);
}

.floor-tab i {
    margin-right: 6px;
    font-size: 12px;
}

/* Indicadores de scroll para móvil */
.scroll-indicator {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #dee2e6;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.scroll-indicator:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.scroll-indicator.left {
    left: 5px;
}

.scroll-indicator.right {
    right: 5px;
}

.scroll-indicator i {
    font-size: 12px;
    color: #495057;
}

/* Responsive para tablets */
@media (max-width: 992px) {
    .floor-tab {
        padding: 10px 16px;
        font-size: 13px;
        margin-right: 6px;
    }

    .floor-tab i {
        font-size: 11px;
        margin-right: 4px;
    }

    .scroll-indicator {
        display: flex;
    }
}

/* Responsive para móviles */
@media (max-width: 768px) {

    .floor-tabs {
        margin-bottom: 1.5rem;
        border-bottom: 1px solid #e9ecef;
    }

    .floor-tab {
        padding: 8px 12px;
        font-size: 12px;
        margin-right: 4px;
        border-radius: 20px;
    }

    .floor-tab i {
        font-size: 10px;
        margin-right: 3px;
    }

    .scroll-indicator {
        width: 25px;
        height: 25px;
    }

    .scroll-indicator i {
        font-size: 10px;
    }
}

/* Móviles pequeños */
@media (max-width: 480px) {
        .container {
        padding: 0px;
    }

    .header .container h1 {
        padding: 0 1rem;
        font-size: 55px;
    }
    
    .map-container {
        padding: 1rem;
    }

    .search-container{
        padding: 0.25rem 0px 0px 0.75rem
    }

    .input-group-text{
        padding: .375rem .45rem;
    }

    .floor-tabs-container {
        padding: 0 35px;
        /* Espacio para los indicadores */
    }

    .floor-tab {
        padding: 6px 10px;
        font-size: 11px;
        margin-right: 3px;
    }

    .floor-tab i {
        display: none;
        /* Ocultar iconos en pantallas muy pequeñas */
    }

    .row {
        --bs-gutter-x: 1rem;
        --bs-gutter-y: 0;
    }

    .row > * {
        padding-left: calc(var(--bs-gutter-x) * 0.15);
        padding-right: calc(var(--bs-gutter-x) * 0.15);
    }

    .scroll-indicator {
        display: flex;
        width: 22px;
        height: 22px;
    }
}

/* Animación suave para el scroll */
.floor-tabs-container.scrolling {
    scroll-behavior: smooth;
}

/* Estilo para tab activo con indicador */
.floor-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 2px;
    display: none;
}

@media (max-width: 768px) {
    .floor-tab.active::after {
        display: block;
        bottom: -1px;
        height: 2px;
        width: 15px;
    }
}

.map-svg-container {
    position: relative;
    width: 100%;
    height: 600px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
    touch-action: none;
    user-select: none;
}

.map-viewport {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    cursor: grab;
    background: #eee8e3;
}

.map-viewport:active {
    cursor: grabbing;
}

.map-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 1000px;
    height: 600px;
    transform-origin: 0 0;
    transition: transform 0.1s ease-out;
}

.floor-map {
    width: 125%;
    height: 90%;
    position: absolute;
    top: 0;
    left: 0;
    display: none;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: 0 0;
}

.floor-map.active {
    display: block;
}

/* Mapas PNG reales */
#map-subsuelo {
    background-image: url('/maps_ap/maps/subsuelo.svg');
}

#map-planta-baja {
    background-image: url('/maps_ap/maps/planta_baja.svg');
}

#map-primer-piso {
    background-image: url('/maps_ap/maps/piso_1.svg');
}

#map-segundo-piso {
    background-image: url('/maps_ap/maps/piso_2.svg');
}

#map-tercer-piso {
    background-image: url('/maps_ap/maps/piso_3.svg');
}

#map-entrepiso {
    background-image: url('/maps_ap/maps/entrepiso.svg');
}

.store-marker {
    position: absolute;
    width: 1.5rem;
    height: 2rem;
    background-image: url('/maps_ap/img/marker.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    transform-origin: center bottom;
}

.store-marker:hover {
    transform: scale(1.2);
    filter: brightness(1.1);
}

.store-marker.highlighted {
    background-image: url('/maps_ap/img/marker_active.svg');
    transform: scale(1.3);
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: scale(1.3) translateY(0);
    }

    40% {
        transform: scale(1.3) translateY(-10px);
    }

    60% {
        transform: scale(1.3) translateY(-5px);
    }
}

.zoom-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.zoom-btn {
    width: 40px;
    height: 40px;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    color: #495057;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.zoom-btn:hover {
    background: #f8f9fa;
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.zoom-btn:active {
    transform: scale(0.95);
}

.coordinates-display {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    z-index: 50;
    font-family: monospace;
}

.store-info-popup {
    position: absolute;
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 100;
    min-width: 200px;
    max-width: 220px;
    display: none;
}

.store-logo {
    width: 40px !important;
    height: 40px !important;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 10px;
}

.category-badge {
    background: var(--secondary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.floor-indicator {
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 1rem;
    display: inline-block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .store-card {
        height: 80px !important;
        padding: 8px !important;
    }

    .store-logo-card {
        width: 30px !important;
        height: 30px !important;
    }

    .store-card h6 {
        font-size: 0.8rem !important;
        line-height: 1.2 !important;
    }

    .store-card small {
        font-size: 0.7rem;
    }

    .map-svg-container {
        height: 400px;
    }

    .zoom-controls {
        top: 5px;
        right: 5px;
    }

    .zoom-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .store-marker {
        width: 28px;
        height: 35px;
    }

    .store-info-popup {
        min-width: 180px;
        max-width: 200px;
        padding: 12px;
    }
}