/* sidebartiendas.css - Estilos para el sidebar de tiendas */

/* Sidebar de Tiendas - Estilo desktop (sticky) */
.tiendas-sidebar {
    position: sticky;
    top: 20px;
    width: 280px;
    height: calc(100vh - 40px);
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #e8e8e8;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Header */
.tiendas-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: white;
    border-bottom: 1px solid #f0f0f0;
}

.tiendas-header h3 {
    margin: 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333;
}

.tiendas-header h3 i {
    color: #ff6b35;
}

.close-tiendas {
    background: none;
    border: none;
    color: #999;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    display: none;
}

.close-tiendas:hover {
    background: #f5f5f5;
    color: #ff6b35;
}

/* Buscador */
.tiendas-search {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    background: white;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper i {
    position: absolute;
    left: 12px;
    color: #999;
    font-size: 14px;
}

.search-tiendas-input {
    width: 100%;
    padding: 10px 12px 10px 38px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    background: #fafafa;
}

.search-tiendas-input:focus {
    border-color: #ff6b35;
    background: white;
    box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.1);
}

.clear-tienda-search {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 14px;
    display: none;
    padding: 0;
    transition: color 0.3s;
}

.clear-tienda-search:hover {
    color: #ff6b35;
}

/* Lista de tiendas */
.tiendas-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.tienda-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.tienda-item:hover {
    background: #fef5f2;
}

.tienda-item.active {
    background: linear-gradient(90deg, #fff5f0, transparent);
    border-left-color: #ff6b35;
}

.tienda-info {
    display: flex;
    gap: 12px;
    align-items: center;
    flex: 1;
}

.tienda-icon {
    width: 40px;
    height: 40px;
    background: #f8f9fa;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff6b35;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.tienda-item:hover .tienda-icon {
    background: #ff6b35;
    color: white;
}

.tienda-item.active .tienda-icon {
    background: #ff6b35;
    color: white;
}

.tienda-details {
    flex: 1;
}

.tienda-nombre {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.tienda-direccion {
    font-size: 0.7rem;
    color: #999;
    display: flex;
    align-items: center;
    gap: 4px;
}

.tienda-direccion i {
    font-size: 0.65rem;
}

.tienda-count {
    background: #f0f0f0;
    color: #666;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.tienda-item.active .tienda-count {
    background: #ff6b35;
    color: white;
}

/* Overlay para móvil */
.tiendas-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: none;
}

.tiendas-overlay.show {
    display: block;
}

/* Botón móvil para tiendas */
.mobile-tiendas-toggle {
    position: fixed;
    bottom: 30px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    z-index: 999;
    transition: all 0.3s;
}

.mobile-tiendas-toggle:hover {
    transform: scale(1.05);
}

/* Scrollbar personalizado */
.tiendas-list::-webkit-scrollbar {
    width: 4px;
}

.tiendas-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.tiendas-list::-webkit-scrollbar-thumb {
    background: #ff6b35;
    border-radius: 4px;
}

/* ========== VERSIÓN MÓVIL ========== */
@media (max-width: 992px) {
    .tiendas-sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        z-index: 1001;
        border-radius: 0;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
        transition: left 0.3s ease;
    }
    
    .tiendas-sidebar.open {
        left: 0;
    }
    
    .close-tiendas {
        display: flex;
    }
    
    .tiendas-header {
        background: linear-gradient(135deg, #ff6b35, #ff8c42);
        color: white;
    }
    
    .tiendas-header h3 {
        color: white;
    }
    
    .tiendas-header h3 i {
        color: white;
    }
    
    .close-tiendas {
        color: white;
    }
    
    .close-tiendas:hover {
        background: rgba(255,255,255,0.2);
        color: white;
    }
    
    .mobile-tiendas-toggle {
        display: flex;
    }
    
    .tienda-item {
        padding: 12px 16px;
    }
    
    .tienda-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

/* ========== VERSIÓN DESKTOP ========== */
@media (min-width: 993px) {
    .tiendas-overlay {
        display: none !important;
    }
}