/* CSS del Store Locator Frontend */

:root {
    --latbit-primary-color: #DFA31C;
    --latbit-primary-hover: #C4871A;
    --latbit-primary-light: #FDF4E6;
    --latbit-primary-alpha: rgba(223, 163, 28, 0.1);
}

.latbit-store-locator-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Buscador */
.store-search-container {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.search-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.search-controls input[type="text"] {
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    min-width: 300px;
    transition: border-color 0.3s ease;
}

.search-controls input[type="text"]:focus {
    outline: none;
    border-color: var(--latbit-primary-color);
    box-shadow: 0 0 0 2px var(--latbit-primary-alpha);
}

.search-controls button {
    padding: 12px 24px;
    background: var(--latbit-primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-controls button:hover {
    background: var(--latbit-primary-hover);
}

.search-controls button#clear-search-btn {
    background: #6c757d;
    margin-left: 10px;
}

.search-controls button#clear-search-btn:hover {
    background: #5a6268;
}

/* Contenido principal */
.store-locator-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

/* Lista de tiendas */
.store-list-container {
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.store-list {
    max-height: 600px;
    overflow-y: auto;
}

.store-item {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.3s ease;
    cursor: pointer;
}

.store-item:hover {
    background: #f8f9fa;
}

.store-item:last-child {
    border-bottom: none;
}

.store-item.active {
    background: var(--latbit-primary-light);
    border-left: 4px solid var(--latbit-primary-color);
}

.store-thumbnail {
    margin-bottom: 15px;
}

.store-thumbnail img {
    width: 100%;
    max-width: 200px;
    height: auto;
    border-radius: 6px;
    object-fit: cover;
}

.store-title {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

.store-info p {
    margin: 8px 0;
    color: #555;
    font-size: 14px;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 8px;
}

.store-info a {
    color: var(--latbit-primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.store-info a:hover {
    color: var(--latbit-primary-hover);
    text-decoration: underline;
}

/* Iconos */
.store-info .icon-location::before {
    content: "📍";
}

.store-info .icon-phone::before {
    content: "📞";
}

.store-info .icon-email::before {
    content: "✉️";
}

.store-info .icon-website::before {
    content: "🌐";
}

.store-hours,
.store-services {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.store-hours strong,
.store-services strong {
    color: #2c3e50;
    font-size: 14px;
    display: block;
    margin-bottom: 8px;
}

.store-hours p,
.store-services p {
    margin: 0;
    color: #666;
    font-size: 13px;
    line-height: 1.5;
}

.store-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.show-on-map-btn {
    padding: 8px 16px;
    background: var(--latbit-primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.show-on-map-btn:hover {
    background: var(--latbit-primary-hover);
}

/* Mapa */
.store-map-container {
    position: sticky;
    top: 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    overflow: hidden;
}

#store-locator-map {
    border-radius: 8px;
}

/* Popup del mapa */
.store-popup {
    font-family: inherit;
    max-width: 250px;
}

.store-popup h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
}

.store-popup p {
    margin: 5px 0;
    color: #555;
    font-size: 13px;
    line-height: 1.4;
}

.store-popup a {
    color: var(--latbit-primary-color);
    text-decoration: none;
}

.store-popup a:hover {
    text-decoration: underline;
}

/* Sin resultados */
.no-stores-found {
    padding: 40px 20px;
    text-align: center;
    color: #6c757d;
}

.no-stores-found p {
    margin: 0;
    font-size: 16px;
}

/* Loading */
.loading {
    padding: 40px 20px;
    text-align: center;
    color: #6c757d;
}

/* Responsive */
@media (max-width: 768px) {
    .latbit-store-locator-container {
        padding: 15px;
    }

    .store-locator-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .search-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .search-controls input[type="text"],
    .search-controls button {
        min-width: auto;
        width: 100%;
    }

    .store-list {
        max-height: 400px;
    }

    .store-map-container {
        position: static;
        order: -1;
    }

    #store-locator-map {
        height: 300px !important;
    }
}

@media (max-width: 480px) {
    .store-item {
        padding: 15px;
    }

    .store-title {
        font-size: 16px;
    }

    .store-info p {
        font-size: 13px;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.store-item {
    animation: fadeIn 0.3s ease-out;
}

/* Custom scrollbar para la lista */
.store-list::-webkit-scrollbar {
    width: 6px;
}

.store-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.store-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.store-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}